Issue with Restart: Kinetic Energy Drop

Dear Dr. Axel Kohlmeyer and LAMMPS Users,

Hello All. I am conducting an all-atomic MD simulation of P3HT using KSPACE setting where I use the NPT ensemble to equilibrate the P3HT from 1 K to 350 K.

I am experiencing issues with restart.

The original NPT equilibration works fine. However, when I perform a restart (assuming the NPT run terminated or crashed), I noticed that the temperature and the kinetic energy of the P3HT drops suddenly after the first restart timestep.

My original NPT equilibration script is as follows, and lmp_input.inp is the file which contains the coefficients for the bond, angle and dihedral potentials.

I think you should not reset your time step in the restart script, because then your thermostat temperature ramp starts from 1 again.

Dear Mr. Stefan Paquay,

Thank you for your suggestion. I actually tried commenting out reset timestep and made use of the “start” and “stop” option of the run command such that my NPT equilibration (which ramps from 1 K to 350 K) occurs for the duration of 1 million timesteps in increments of 100000 timesteps. The restart files are outputted every 100000 timesteps. However, the temperature is still resetting back to near 1 K. My modified original NPT run is as follows: ##############################################
units real
atom_style full
pair_style lj/cut/coul/long 10.0 # update this, go up if big enough
pair_modify mix arithmetic
bond_style harmonic
angle_style harmonic
dihedral_style opls
improper_style none
kspace_style ewald 1e-5
read_data lammps_input.data # XXX
include lmp_input.inp
neighbor 2.0 bin
neigh_modify delay 0 every 1 check yes
timestep 1
thermo_style custom step temp ke pe etotal ebond eangle edihed epair ecoul vol
partition yes 1 thermo 1
minimize 1.0e-3 1.0e-6 1000 50000
fix 1 all npt temp 1. 350. 100 x 0.0 0.0 1000 y 0.0 0.0 1000 z 0.0 0.0 1000
reset_timestep 0
partition yes 1 thermo 1000
partition yes 1 restart 100000 *.restart
run 100000 start 0 stop 1000000 post yes
run 100000 start 0 stop 1000000 post yes
run 100000 start 0 stop 1000000 post yes
run 100000 start 0 stop 1000000 post yes
run 100000 start 0 stop 1000000 post yes
run 100000 start 0 stop 1000000 post yes
run 100000 start 0 stop 1000000 post yes
run 100000 start 0 stop 1000000 post yes
run 100000 start 0 stop 1000000 post yes
run 100000 start 0 stop 1000000 post yes ##############################################

My restart script is as follows assuming if I want restart at 100000 timesteps to finish my entire simulation: ##############################################
units real
atom_style full
read_restart 100000.restart # XXX
pair_style lj/cut/coul/long 10.0 # update this, go up if big enough
pair_modify mix arithmetic
bond_style harmonic
angle_style harmonic
dihedral_style opls
improper_style none
kspace_style ewald 1e-5
include lmp_input.inp
neighbor 2.0 bin
neigh_modify delay 0 every 1 check yes
timestep 1
thermo_style custom step temp ke pe etotal ebond eangle edihed epair ecoul vol

minimize 1.0e-3 1.0e-6 1000 50000

fix 1 all npt temp 1. 350. 100 x 0.0 0.0 1000 y 0.0 0.0 1000 z 0.0 0.0 1000

reset_timestep 0

partition yes 1 thermo 1000
partition yes 1 restart 100000 *.restart
run 100000 start 100000 stop 1000000 post yes
run 100000 start 100000 stop 1000000 post yes
run 100000 start 100000 stop 1000000 post yes
run 100000 start 100000 stop 1000000 post yes
run 100000 start 100000 stop 1000000 post yes
run 100000 start 100000 stop 1000000 post yes
run 100000 start 100000 stop 1000000 post yes
run 100000 start 100000 stop 1000000 post yes
run 100000 start 100000 stop 1000000 post yes

I think this might just be how the temperature ramp functionality in fix n*t works. I can’t check the source code right now. You could as an alternative define a variable that ramps from 1 to 350 as a function of the time step and feed that to fix npt, that will work when your simulation is split over multiple run commands.

When you restart on step 100000 you are using this command:
run 100000 start 100000 stop 1000000 post yes
along with fix npt temp 1 350.
Which will use a target temp of 1 for the first steps

of the new simulation.

You want start 0 stop 1000000
no matter what timestep (which restart file) you are restarting from.
That way if you are 1/10 of the way thru 1M steps,
fix npt will use a target temp 1/10 of the way from 1 to 350.

Steve

Steve