Hello everyone,
I built a TIP4P water model with packmol with 357 molecules in 22x22x22 angstrom box. Then I used Topotools to create the bonds and angles among the molecules. When I ran the simulation in LAMMPS it was giving me non-numeric box dimension when I used NPT ensmble. When I used NVT, it was giving me out of range atoms-can’t compute pppm.
After consulting the previous emails regarding these sorts of problems from LAMMPS user mailing list, I understood that my simulation might be unstable. So, I changed the box dimensions to 5x5x5 angstrom with only 3 molecules of water just to see what I was doing wrong. Still I have the same problems. I used the input parameters from LAMMPS documentation.
I tried SPC water model with 3 molecules in 5x5x5 and 20x20x20 box dimensions. The pressure I got is of the order of 10^34 or NAN. I checked with different timesteps. So, I am stuck with both TIP4P and SPC water model. I am sending you both my input file and screenshot of the errors. I will greatly appreciate someone’s help on this.
TIP4P (3 molecules):
tip4p water
atom_style full
units real
dimension 3
boundary p p p
read_data data.h20_small
group hydrogen type 1
group oxygen type 2
#group all type 1 type 2
set group oxygen charge -1.11
set group hydrogen charge 0.5564
velocity all create 300.0 123456789 dist gaussian mom yes rot yes
neighbor 2.0 bin
neigh_modify delay 0
Define interaction parameters
pair_style lj/cut/tip4p/long 2 1 1 1 0.125 14
pair_modify tail yes
kspace_style pppm/tip4p 1.0e-5
pair_coeff 1 1 0.0 0.0
pair_coeff 1 2 0.0 0.0
pair_coeff 2 2 0.16275 3.16435
bond_style harmonic
bond_coeff 1 0.0 0.9572
angle_style harmonic
angle_coeff 1 0.0 104.52
fix 1 all shake 0.0001 100 1 b 1 a 1
initialize
thermo 10
timestep 0.001
------------- Equilibration and thermalisation ----------------
fix 2 all press/berendsen iso 1.0 1.0 0.1
fix 3 all nvt temp 300.0 300.0 0.1
#fix 3 all npt temp 300.0 300.0 0.1 iso 1.01325 1.01325 1000
dump 2 all xyz 1 water.xyz
run 500
DUMP file:
9
Atoms. Timestep: 0
2 -0.000576 1.52239 3.71945
1 0.758776 0.941048 3.42646
1 0.357216 2.31842 4.20638
2 1.5924 3.46099 3.95979
1 1.82369 2.91375 4.76444
1 0.71911 3.15121 3.58537
2 0.754134 1.1164 4.88936
1 0.456617 0.234294 4.52359
1 1.21872 1.63526 4.17261
9
Atoms. Timestep: 1
2 -377.653 -275.741 -273.393
1 -20.29 -526.907 -398.175
1 -196.759 79.1415 -54.9923
2 379.068 644.728 -159.406
1 467.321 386.103 203.482
1 -18.7762 490.423 -315.206
2 -19.1083 -468.184 282.362
1 -146.438 -863.734 98.8119
1 188.883 -247.404 -55.8088
9
Atoms. Timestep: 2
2 -nan -nan -nan
1 -nan -nan -nan
1 -nan -nan -nan
2 -nan -nan -nan
1 -nan -nan -nan
1 -nan -nan -nan
2 -nan -nan -nan
1 -nan -nan -nan
1 -nan -nan -nan
SPC file 3 molecules (22x22x22 angstrom):
SPC water
atom_style full
units real
dimension 3
boundary p p p
read_data data.lowdensity
group hydrogen type 1
group oxygen type 2
#group all type 1 type 2
set group oxygen charge -0.82
set group hydrogen charge 0.41
#velocity all create 200.0 123456789 dist gaussian mom yes rot yes
velocity all create 298.0 1234
neighbor 2.0 bin
neigh_modify every 1 delay 0 check yes
timestep 2.0
Define interaction parameters
pair_style lj/cut/coul/long 9.8
pair_modify tail yes
kspace_style pppm 1.0e-5
pair_coeff 1 1 0.0 0.0
pair_coeff 1 2 0.0 0.0
pair_coeff 2 2 0.1553 3.166
bond_style harmonic
bond_coeff 1 0.0 1.0
angle_style harmonic
angle_coeff 1 0.0 109.47
fix 1 all shake 0.0001 10 1 b 1 a 1
fix 2 all npt temp 298.0 298.0 1.0 iso 1.01325 1.01325 100
fix 3 all momentum 1 linear 1 1 1
dump 2 all xyz 1 spc.xyz
thermo 100
run 1000
#unfix 2
#reset_timestep 0
#fix 2 all nvt temp 300.0 300.0 0.1
#thermo 10
#run 500
initialize
#thermo_style custom step temp pe ke etotal press vol density cpu
------------- Equilibration and thermalisation ----------------
#fix 2 all press/berendsen iso 1.0 1.0 0.1
Regards,
Baig