[lammps-users] TIP4P hydrogen has incorrect atom type

Hello:

I was trying to run some test simulations of water using tip4p, and got an “TIP4P hydrogen has incorrect atom type” error. I could not figure out what caused this error. I’d appeciate it very much if some experts can give me some hint.

Thanks,
Hai

below is my input file

water droplet

atom_style full
units real
boundary p p p

bond_style harmonic
angle_style harmonic
pair_style lj/cut/coul/long/tip4p 1 2 1 1 0.1250 12.000

read_data initial.water
timestep 1.0

fix 1 all nvt 300.0 300.0 100.0 drag 2.0
thermo 100
thermo_style multi
group water type 1 2

pair_coeff * * 0 0
pair_coeff 1 1 0.16275 3.16435
kspace_style pppm/tip4p 1.0e-4
fix 2 water shake 0.0001 20 100 b 1 a 1

bond_coeff 1 80 0.9572
angle_coeff 1 200 104.52

dump 1 all atom 10000 dump.water
restart 10000 restart.water
run 100000

My data file is like the following. the atom number starts from 10001 (not from 1), and the molecule number also starts from 10001 (not from 1), Bonds and Angles also start from 10001.

1095 atoms
730 bonds
365 angles
0 dihedrals
0 impropers

2 atom types
1 bond types
1 angle types
0 dihedral types
0 improper types

-12 12 xlo xhi
-12 12 ylo yhi
-12 12 zlo zhi

Masses

1 15.9994
2 1.008

Atoms (the sequence of molecule number is repeating, will this cause problem?)

10001 10001 1 -1.0484 -10 -10 -10
10002 10002 1 -1.0484 -7.5 -7.5 -10
10003 10003 1 -1.0484 -7.5 -10 -7.5

10366 10001 2 0.5242 -9.41412 -9.24305 -10
10367 10002 2 0.5242 -6.91412 -6.74305 -10
10368 10003 2 0.5242 -6.91412 -9.24305 -7.5

10731 10001 2 0.5242 -9.41412 -10.75695 -10
10732 10002 2 0.5242 -6.91412 -8.25695 -10
10733 10003 2 0.5242 -6.91412 -10.75695 -7.5

Bonds

10001 1 10001 10366

Angles

10001 1 10366 10001 10731

(10001 is O, 10366 and 10731 are H)

For the TIP4P pair potential, the 2 H atoms must have IDs
1 and 2 larger than the O atom ID. This is how LAMMPS
"finds" the 2 H atoms associated with the O. So
if atom 10000 is an O in a TIP4P water molecule,
then its 2 H atoms must be 10001 and 10002.

I thought this was documented, but I don't see it. I'll add it
to the doc page for the potential.

Steve