Dear Lammps-users,
A simple lammps code to simulate water in a box is as below:
units metal
atom_style full
dimension 3
neighbor 2 bin
neigh_modify every 1 delay 3 check yes
boundary p p p
kspace_style ewald 1e-5
read_data fluid.data
replicate 2 1 1
velocity all create 300.0 482748 dist uniform
dielectric 1.0
pair_style lj/cut/coul/long 10.0 10.0
pair_coeff 1 1 0.000000 0.000000 10.000000
pair_coeff 1 2 0.000000 0.000000 10.000000
pair_coeff 2 2 0.00442314 3.150700 10.000000
bond_style harmonic
bond_coeff 1 450.000000 0.957200
angle_style harmonic
angle_coeff 1 55.000000 104.519997
special_bonds charmm ##amber
fix 1 all shake 0.01 3 50 b 1 a 1
fix 2 all npt 300.0 300.0 0.1 xyz 1.01325 1.01325 1.0 # press in Bar (=1 atm.)
timestep 0.001
thermo 10
thermo_style custom step atoms temp press pe ke
thermo_modify norm yes flush yes
dump 1 all xyz 10 dump.xyz.*
run 100
The result from the above run gives me:
…
…
Ewald initialization …
G vector = 0.307694
vectors: actual 1d max = 22957 35 178955
SHAKE stats (type/ave/delta) on step 0
1 1.42589 52.092
1 103.765 114.055
Memory usage per processor = 69.5827 Mbytes
Step Atoms Temp Press PotEng KinEng
0 30000 450.0075 -3.0362271e+09 0.23480746 0.038776751
10 30000 nan nan nan nan
20 30000 nan nan nan nan
30 30000 nan nan nan nan
40 30000 nan nan nan nan
SHAKE stats (type/ave/delta) on step 50
1 nan nan
1 nan nan
50 30000 nan nan nan nan
60 30000 nan nan nan nan
70 30000 nan nan nan nan
80 30000 nan nan nan nan
90 30000 nan nan nan nan
SHAKE stats (type/ave/delta) on step 100
1 nan nan
1 nan nan
100 30000 nan nan nan nan
Loop time of 13.3385 on 4 procs for 100 steps with 30000 atoms
…
…
But on removing the replicate command and keeping the rest same gives:
…
…
Step Atoms Temp Press PotEng KinEng
0 15000 450.015 190252.43 0.25936314 0.038775458
10 15000 2992.0084 70328.603 0.011623471 0.25780584
20 15000 2812.9159 47242.205 -0.026028382 0.24237437
30 15000 2057.7865 34245.186 -0.038496692 0.17730879
…
…
Any suggestions on why this NAN occurs during the use of replicate command and where should I modify the code would be helpful.
Thank you.
Ganesh
|
From the replicate doc page:
This is done by using the image flag for each atom to "unwrap" it out
of the periodic box before replicating it. This means that molecular
bonds you specify in the original data file that span the periodic box
should be between two atoms with image flags that differ by 1. This
will allow them to be unwrapped appropriately.
Did you do this?
Steve