[lammps-users] Water modeling

Hi All,

Does anyone have experience with modeling H2O by using TIP4P or SPC? I am new to LAMMPS and trying to set up a water model without success. For TIP4p model, I can't to run. For SPC, the simulations collapse after 20 steps and the atoms overlap. The following is my script and data file for tip4p.

Would you please take a look to see what I did wrong. If you have an example water script to share, that would be great. I might be able to figure what I did wrong by studying the right script.

#3d Lennard-Jones settling

units real
atom_style full

pair_style lj/cut/coul/long/tip4p 2 1 1 1 0.125 10.0 10.0
bond_style harmonic
angle_style harmonic
kspace_style pppm/tip4p 0.0001

read_data data.water

# set potentials
pair_coeff 2 2 0 0 10.0
pair_coeff 1 2 0 0 10.0

pair_coeff 1 1 0.1550 3.1536 10.0

# running conditions
neighbor 0.3 bin
neigh_modify every 20 delay 0 check no

velocity all create 300 57287

fix id1 all nvt 300.0 300.0 1.0
fix 1f all shake 0.0001 20 100000 b 1 a 1

fix 1 all rdf 100 rdf.out 100 1 1

fix 3 all coord/original

dump id4 all xyz 100 xyz.dat

restart 2000 restart.water

thermo 1000
thermo_style multi
thermo_modify lost error
thermo_modify norm no

run 20000

The error message is "ERROR on proc 0: TIP4P hydrogen has incorrect atom type". I couldn't figure out why. My data.water looks like,

   water tip4 date for lammmps

  24 atoms
  16 bonds
  8 angles

  2 atom types
  1 bond types
  1 angle types

  -0.5 5.69999981 xlo xhi
  -0.5 5.69999981 ylo yhi
  -0.5 5.69999981 zlo zhi

  Masses

  1 15.9989996
  2 1.00800002

  Bond Coeffs

  1 545 0.957199991

  Angle Coeffs

  1 55 104.519997

  Atoms

  1 1 1 -1.03999996 0.757000029 0.586000025 0.
  2 1 2 0.519999981 0. 0. 0.
  3 1 2 0.519999981 1.51400006 0. 0.
  4 2 1 -1.03999996 0.757000029 0.586000025 2.79999995
  5 2 2 0.519999981 0. 0. 2.79999995
  6 2 2 0.519999981 1.51400006 0. 2.79999995
  7 3 1 -1.03999996 0.757000029 3.38599992 0.
  8 3 2 0.519999981 0. 2.79999995 0.
  9 3 2 0.519999981 1.51400006 2.79999995 0.
  10 4 1 -1.03999996 0.757000029 3.38599992 2.79999995
  11 4 2 0.519999981 0. 2.79999995 2.79999995
  12 4 2 0.519999981 1.51400006 2.79999995 2.79999995
  13 5 1 -1.03999996 3.55699992 0.586000025 0.
  14 5 2 0.519999981 2.79999995 0. 0.
  15 5 2 0.519999981 4.31400013 0. 0.
  16 6 1 -1.03999996 3.55699992 0.586000025 2.79999995
  17 6 2 0.519999981 2.79999995 0. 2.79999995
  18 6 2 0.519999981 4.31400013 0. 2.79999995
  19 7 1 -1.03999996 3.55699992 3.38599992 0.
  20 7 2 0.519999981 2.79999995 2.79999995 0.
  21 7 2 0.519999981 4.31400013 2.79999995 0.
  22 8 1 -1.03999996 3.55699992 3.38599992 2.79999995
  23 8 2 0.519999981 2.79999995 2.79999995 2.79999995
  24 8 2 0.519999981 4.31400013 2.79999995 2.79999995

  Bonds

  1 1 1 2
  2 1 1 3
  3 1 4 5
  4 1 4 6
  5 1 7 8
  6 1 7 9
  7 1 10 11
  8 1 10 12
  9 1 13 14
  10 1 13 15
  11 1 16 17
  12 1 16 18
  13 1 19 20
  14 1 19 21
  15 1 22 23
  16 1 22 24

  Angles

  1 1 1 2 3
  2 1 4 5 6
  3 1 7 8 9
  4 1 10 11 12
  5 1 13 14 15
  6 1 16 17 18
  7 1 19 20 21
  8 1 22 23 24

Shihai