[lammps-users] The NPT system

Hi, everyone.
I am using LAMMPS to simulate water. When I use NVE system, it works well. However, when I use the NPT system, the T and P deviate much from the desired values even after 80000 timesteps elasped.
I wonder, are the parameters I used not appropriate?
I woud be grateful if someone could give me some advice.
The inputfile is listed below and the datafile is attached.
input file:
#test programe for SPC water
echo both
log log.water
dimension 3
boundary p p p
units real
atom_style full
read_data water.dat
pair_style lj/cut/coul/long 10 10
pair_coeff 1 1 0.1553 3.166
pair_coeff 2 2 0 0
pair_coeff 1 2 0 0
bond_style harmonic
bond_coeff 1 450 1.0
angle_style harmonic
angle_coeff 1 55 109.47
dihedral_style none
improper_style none
kspace_style ewald 0.0001
neighbor 0.5 bin
neigh_modify delay 5
velocity all create 298.15 2349852
timestep 0.2
thermo_style multi
thermo 50

fix shake must be before fix npt

fix 2 all shake 0.0001 50 50 b 1 a 1
fix 1 all npt 298.15 298.15 1000 xyz 1. 1. 1200
#fix 4 all temp/rescale 1 298.15 298.15 0.05 1.0
#fix 3 all rigid molecule
fix 5 all msd 100 msd.water
fix 6 all rdf 100 rdf.out 100 1 1 1 2 2 1 2 2
#dump 1 all custom 50 dump.water tag x y z
#dump 3 all custom 50 dump.velocity tag vx vy vz
#dump 4 all custom 50 dump.force tag fx fy fz
#dump 2 all bond 1 bond.water
restart 5000 water.restart
run 80000

Best Regards!

water.rar (10.6 KB)

Cong Chen,

Your parameters look fine to me. Pressure fluctuations are a normal
part of MD simulation of liquids. And you're simulating a tiny system
of only 343 waters, which makes matters much worse. My primary
recommendation: simulate a bigger box. That should statistically
dampen the big fluctuations you're seeing. You could also try using a
larger value for Pdamp. That might help as well --- should favor
damping of those big oscillations.

Paul