Position of timestep command in input file

LAMMPS Users-

I have an input file with the general format:

  1. Create box (p p p with atom_style atomic and units metal)

  2. Build atoms

  3. Energy Minimization (min_style cg)

  4. Assign temperature and pressure via fix NPT

  5. Run equilibration MD

  6. Deform the lattice at a constant temperature and shear stress via fix NPT

  7. Run production MD

I want to run my code with a timestep 0.001 and then again with a timestep 0.002 to check the dependence on step size. If I place the timestep command before step 1, my deformation response in step 6 shows a major dependence on the timestep size (not good). However, if I place my timestep command before steps 4 and 5, without making any other changes to my code, then my deformation response in step 6 is independent of the timestep size (good).

I know that some energy minimization routines require a timestep to be specified, but as far as I understand, min_style cg is not one of them.

Any thoughts on what I might be doing wrong? It’s been a while since I have been stumped by LAMMPS!

Thanks,

-Doug

LAMMPS Users-

I have an input file with the general format:

1) Create box (p p p with atom_style atomic and units metal)

2) Build atoms

3) Energy Minimization (min_style cg)

4) Assign temperature and pressure via fix NPT

5) Run equilibration MD

6) Deform the lattice at a constant temperature and shear stress via fix
NPT

7) Run production MD

I want to run my code with a timestep 0.001 and then again with a timestep
0.002 to check the dependence on step size. If I place the timestep
command before step 1, my deformation response in step 6 shows a major
dependence on the timestep size (not good). However, if I place my
timestep command before steps 4 and 5, without making any other changes to
my code, then my deformation response in step 6 is independent of the
timestep size (good).

I know that some energy minimization routines require a timestep to be
specified, but as far as I understand, min_style cg is not one of them.

Any thoughts on what I might be doing wrong? It’s been a while since I
have been stumped by LAMMPS!

​i don't think that this is a LAMMPS issue, but rather the change in
timestep is exposing a weakness in your simulation protocol.

running equilibration directly with fix npt i​s rarely a good idea. it is
easy and fast for a system to expand, but it can take a very long time to
shrink to an equilibrium density. thus i would always start equilibration
with fix nvt, or if it has to be fix npt, start with a significantly too
high pressure and gradually reduce it to the desired value, so that the
system cannot overexpand which would require a longer equilibration time.

so i would recommend to compare the density after equilibration with the
different time steps to see, if the scenario described above applies and
thus you may be comparing apples and oranges. mind you, due to low
compressibility of condensed matter, even small differences in density may
result in significant differences in behavior.

axel.

Thanks for the idea Axel. I’ll add “density” to my thermos_style output.

However, I’m not sure this answers the main part of my question. With my given protocol, why would moving the position of the “timestep xxxx” command in the input file even matter? Min_style CG is not using the timestep command in any way (or it shouldn’t be). So from a pure programming standpoint, I still don’t see why moving the command from before step (1) to between steps (4) and (5) causes any effect on results.

Best,

-Doug

Thanks for the idea Axel. I’ll add “density” to my thermos_style output.

However, I’m not sure this answers the main part of my question. With my
given protocol, why would moving the position of the “timestep xxxx”
command in the input file even matter? Min_style CG is not using the
timestep command in any way (or it shouldn’t be). So from a pure
programming standpoint, I still don’t see why moving the command from
before step (1) to between steps (4) and (5) causes any effect on results.

​it is difficult to give specific advice on a rather vague description.
you just need to observe carefully at which step you are seeing divergence
of the trajectories and by how much.

please also keep in mind, that your ​results may be subject to some kind of
metastability that is randomly triggered.

axel.

Greetings,

Is it alright to share your input script for detail?

Adrian-

I will send privately. Thanks,

DES