How to control pressure to 1 atmosphere in npt (Triclinic)

Hello everyone, I need to set up a constant temperature and pressure environment. How can I adjust Tdamp and Pdamp to keep the temperature constant (about 200K) and the pressure stable at 1 atmosphere? I used“ fix 1 all npt temp 200 200 0.04 tri 1.0 1.0 0.04”, but the pressure output fluctuated greatly. After adding drag 2.0, the fluctuation was relatively stable, but the pressure still could not be reduced to 1 atmosphere, which made me very confused.
The output result:
Step TotEng Temp Press Volume
0 -25732.615 200 -45040.553 13945.313
500 -25636.879 206.13919 -3547.0433 14023.881
1000 -25650.797 190.33175 -4138.2455 14032.917
1500 -25653.031 203.33662 -4047.2558 14016.921
2000 -25648.169 202.72322 -5160.478 14027.923
2500 -25646.74 207.46518 -2995.4672 13996.049
3000 -25651.37 200.16861 -6098.3565 14014.066
3500 -25654.207 198.41054 -10242.797 14057.117
4000 -25652.137 198.91511 -1204.8843 14012.415
4500 -25651.993 207.51024 -1249.3837 14000.913
5000 -25652.755 210.46971 -3875.6271 14009.785
5500 -25651.035 192.21651 -4878.9862 14013.94
6000 -25651.481 199.87944 -1077.2026 13995.351
6500 -25650.31 193.05767 -6985.5753 14015.505
7000 -25649.86 203.3804 -9611.3695 14049.695
7500 -25652.395 207.29053 1573.8082 13983.102
8000 -25653.371 201.45278 -1147.7011 14000.409
8500 -25655.015 186.75689 -6975.8209 14029.754
9000 -25650.326 202.24292 -3783.8299 14020.967
9500 -25651.802 206.09912 -4998.6176 14013.496
10000 -25652.225 196.59548 -7296.0029 14019.706
10500 -25654.405 204.93158 -4431.0695 14022.352
11000 -25654.4 204.47045 -6062.786 14029.977
11500 -25653.579 205.26831 -7369.1765 14030.366
12000 -25653.333 194.3787 -1716.119 14007.044
12500 -25654 198.05412 -4326.1081 14015.762
13000 -25650.898 205.5442 -8780.4745 14037.756
13500 -25651.346 202.00497 -3689.4784 14012.109
14000 -25653.815 200.01812 -5570.6344 14009.638

How large is your system? i.e. how many atoms? What kind of material do you have?

The topic or pressure and temperature fluctuations has been discussed here many, many, MANY times. I suggest you review the previous discussions and perhaps have a look into a text book on statistical thermodynamics. :wink:

P.S.: in the future, please post to the correct category.

The system is a 666 barium titanate molecule. We want to simulate the spontaneous polarization of barium titanate and calculate the lattice parameters after phase transition. The in file is as follows, using the coreshell model:
units metal
dimension 3
boundary p p p
atom_style full

fix csinfo all property/atom i_CSID
read_data BTO.predata fix csinfo NULL CS-info
change_box all triclinic
neighbor 2.0 bin
comm_modify vel yes

pair_style born/coul/wolf/cs 0.25 10.0 12.0

A rho sigma C D

pair_coeff * * 0.0 1.000 0.00 0.00 0.00
pair_coeff 4 6 7149.8110 0.3019 0.00 0.0000 0.00 #Ba-O
pair_coeff 5 6 7220.2700 0.2303 0.00 0.0000 0.00 #Ti-O
pair_coeff 6 6 3719.6000 0.3408 0.00 597.1700 0.00 #O-O
bond_style class2

R0 K2 K3 K4

bond_coeff 1 0.0 149.2550 0.0000 0.0000 #Ba core-shell
bond_coeff 3 0.0 18.4650 0.0000 208.3333 #O core-shell
bond_coeff 2 0.0 153.0700 0.0000 20.8333 #Ti core-shell
special_bonds coul 0.0 0.0 0.0

#GROUP DEFINITION
group cores type 1 2 3
group shells type 4 5 6
thermo_style custom step etotal temp press vol
compute CSequ all temp/cs cores shells
thermo_modify temp CSequ
velocity all create 200 983629 dist gaussian mom yes rot no bias yes temp CSequ
velocity all scale 200 temp CSequ

#THERMALIZATION
fix 1 all npt temp 200 200 0.04 tri 0 0 0.4 # 10^5 pa
fix_modify 1 temp CSequ
thermo 500
dump D1 all atom 1000 stab1_*.txt
timestep 0.0004 # dt
run 500000

That is a pretty small system and not compressible to boot. No surprise the pressure is fluctuating.

Try a larger system, e.g. after replicate 2 2 2.

…and read up on the previous discussions on fluctuating property.