[lammps-users] NPT fails after minimization and NVT

Hello all,

Following is the input file I created to run a minimization, nvt and npt for the peptide in the lammps examples section.

units real
neigh_modify delay 2 every 1
atom_style full
bond_style harmonic
angle_style charmm
dihedral_style charmm
improper_style harmonic
pair_style lj/charmm/coul/long 8 10
pair_modify mix arithmetic
kspace_style pppm 1e-4
read_data data.peptide
special_bonds charmm
min_style cg #This is the default. Indicated for clarity.
minimize 1.0e-4 100 1000
thermo 1
thermo_style multi
timestep 1
restart 10 dataminim.restart1 dataminim.restart2
dump 1 all atom 10 dataminim.dump
dump_modify 1 image yes scale yes

End of Minimization. Begining NVT

fix 1 all nvt 275.0 275.0 100.0
fix 2 all shake 0.0001 10 100 b 4 6 8 10 12 14 18 a 31

velocity all create 0.0 12345678 dist uniform
thermo 100
thermo_style multi
timestep 1
restart 10 datanvt.restart1 datanvt.restart2
dump 2 all atom 10 datanvt.dump
dump_modify 2 image yes scale yes
run 10000

End of NVT. Begining NPT

fix 3 all npt 275.0 275.0 100.0 xyz 1.0 1.0 1000.0 #Performing a NPT simulation with an isotropic pressure of 1atm.
thermo 1
thermo_style multi
timestep 1
restart 10 datanpt.restart1 datanpt.restart2
dump 3 all atom 10 datanpt.dump
dump_modify 3 image yes scale yes
run 20

Following is the output I got…
PPPM initialization …
G vector = 0.268725
grid = 15 15 15
RMS precision = 4.85953e-05
brick FFT buffer size/proc = 10648 3375 5808
Memory usage per processor = 19.8619 Mbytes
Step Temp E_pair E_mol TotEng Press
0 190.08718 -6442.7656 70.391457 -5237.4557 20368.349
96 190.08718 -8644.3786 499.33865 -7010.1215 20368.349
Loop time of 33.2691 on 1 procs for 100 steps with 2004 atoms

Minimization stats:
E initial, next-to-last, final = -6372.37 -8144.41 -8145.04
Gradient 2-norm init/final= 1059.36 30.2441
Gradient inf-norm init/final= 58.6026 9.45785
Iterations = 96
Force evaluations = 353
.
.
.
---------------- Step 100 ----- CPU = 0.4142 (sec) ----------------
TotEng = -7683.1056 KinEng = 0.9780 Temp = 0.2431
PotEng = -7684.0836 E_bond = 5.3974 E_angle = 8.5483
E_dihed = 10.5501 E_impro = 0.0872 E_vdwl = 1006.8575
E_coul = 25203.7728 E_long = -33919.2969 Press = -3548.1608
SHAKE stats (type/ave/delta) on step 200
4 1.111 4.22323e-07
6 0.997 5.9652e-08
8 1.08 4.14227e-08
10 1.111 1.50259e-08
12 1.08 3.33095e-08
14 0.96 0
18 0.9572 1.37e-06
31 104.52 0.000103274
.
.
.
---------------- Step 10099 ----- CPU = 0.3181 (sec) ----------------
TotEng = -5314.6396 KinEng = 1143.1326 Temp = 284.1445
PotEng = -6457.7722 E_bond = 14.0841 E_angle = 20.4752
E_dihed = 14.2131 E_impro = 0.8314 E_vdwl = 644.2920
E_coul = 26753.3137 E_long = -33904.9818 Press = -19546.5594
Volume = 20506.3172
SHAKE stats (type/ave/delta) on step 10100
4 1.10657 0.0177904
6 0.988234 0.0129708
8 1.07508 0.0131734
10 1.10905 0.0127183
12 1.0756 0.011401
14 0.956341 0
18 0.945594 0.112877
31 104.789 11.3552
---------------- Step 10100 ----- CPU = 0.5103 (sec) ----------------
TotEng = -4515.9580 KinEng = 1647.1192 Temp = 409.4187
PotEng = -6163.0771 E_bond = 14.7211 E_angle = 21.4911
E_dihed = 14.1678 E_impro = 1.0336 E_vdwl = 639.7163
E_coul = 27052.3297 E_long = -33906.5367 Press = 62704.5703
Volume = 20505.9821
---------------- Step 10101 ----- CPU = 0.6695 (sec) ----------------
TotEng = 517.7304 KinEng = 7731.9595 Temp = 1921.9062
PotEng = -7214.2292 E_bond = 16.4958 E_angle = 23.8416
E_dihed = 14.4167 E_impro = 1.4070 E_vdwl = 671.1836
E_coul = 25959.3555 E_long = -33900.9294 Press = -249024.8820
Volume = 20506.7001
---------------- Step 10102 ----- CPU = 0.8749 (sec) ----------------
TotEng = nan KinEng = nan Temp = nan
PotEng = -3837.9466 E_bond = 19.8407 E_angle = 26.4321
E_dihed = 14.7870 E_impro = 1.6216 E_vdwl = 630.8032
E_coul = 29364.8711 E_long = -33896.3023 Press = nan
Volume = 20503.2360
ERROR: Out of range atoms - cannot compute PPPM

You're not doing an "unfix" between the NVT and NPT runs.
Hence, you are running both an nvt and npt fix at the same time,
which you don't want to do. In LAMMPS, fixes stay in
effect forever (from run to run), unless you unfix them.

Steve