Is that feasible to divide a simulation into two stages and each one uses a different potential?

Hello everyone,

My simulation contains two main stages. In the first stage, the system experiences rapid change. In the second stage, I want the atoms to be relaxed at a constant temperature and run it for a relatively long time to reach the equilibrium state. I want to use ReaxFF potential for the first stage since it can describe the interactions in this stage, and I want to use REBO potential in the second stage.

Since these two potentials are using different units, my plan is that at the end of the first simulation, the configuration of the final state is written into a data file. After that, I need to convert the values of the data file based on the units used by the two different potential. And then load the modified data file into the second simulation and use REBO potential. My question is that is this scheme feasible to be implemented. And are there any fundamental drawbacks to divide a simulation into this kinds of two stages? Could you please give me some advice? I want to be aware of the whole strategy before the simulation starts.

Any help would be much appreciated!

Best Regards,

Wenqiang

Hello everyone,

My simulation contains two main stages. In the first stage, the system
experiences rapid change. In the second stage, I want the atoms to be
relaxed at a constant temperature and run it for a relatively long time
to reach the equilibrium state. I want to use ReaxFF potential for the
first stage since it can describe the interactions in this stage, and I
want to use REBO potential in the second stage.

Since these two potentials are using different units, my plan is that at
the end of the first simulation, the configuration of the final state is
written into a data file. After that, I need to convert the values of
the data file based on the units used by the two different potential.
And then load the modified data file into the second simulation and use
REBO potential. My question is that is this scheme feasible to be
implemented. And are there any fundamental drawbacks to divide a
simulation into this kinds of two stages?

I have not used either of these pair styles. However it is very
common to split a simulation into multiple stages.

I usually use the "write_data" command (or "write_restart" command)
to save the state of the system at the end of the first stage of the
simulation. If something goes wrong during the second stage, you can
use the "read_data" (or "read_restart") command to restore the
simulation from the end of stage 1, instead of starting the simulation
again from the beginning.

Unit conversion:

According to the documentation for REBO:
    "You can use the AIREBO, AIREBO-M or REBO potential with any
LAMMPS units, but you would need to create your own AIREBO or AIREBO-M
potential file with coefficients listed in the appropriate units, if
your simulation does not use “metal” units."
      https://lammps.sandia.gov/doc/pair_airebo.html

According to the documentation for REAX:
   "The potential files provided with LAMMPS in the potentials
directory are parameterized for real units. You can use the ReaxFF
potential with any LAMMPS units, but you would need to create your own
potential file with coefficients listed in the appropriate units if
your simulation does not use “real” units."
      https://lammps.sandia.gov/doc/pair_reaxc.html

   ...So, choose which units you want to use for measuring energy
(Kcal/mole or eV), and convert the other file to those units.
(Fortunately, in both cases, distance is specified in units of
Angstroms. https://lammps.sandia.gov/doc/units.html)

Other suggestions:
I suggest creating two different dump files. This way if you need to
re-run stage 2, you will not accidentally erase your first trajectory
file.

dump dAll all custom 100000 traj_stage1.lammpstrj id type x y z ix iy iz
<RUN_SIMULATION_STAGE_1>
undump dAll
write_data system_stage1.data

dump dAll all custom 100000 traj_stage2.lammpstrj id type x y z ix iy iz
<RUN_SIMULATION_STAGE_2>
undump dAll

Note: The following suggestion is probably not relevant to you. If
you are using "atom_style molecule" or "atom_style full", then I would
use these commands in instead:

dump dAll all custom 100000 traj_stage1.lammpstrj id mol type x y z ix iy iz
:
dump dAll all custom 100000 traj_stage2.lammpstrj id mol type x y z ix iy iz

This extra information ("mol", "ix", "iy", and "iz") makes it easier
to visualize the trajectory (dump file) containing molecules in VMD.

When running the stage 2 simulation, the "reset_timestep" command may be useful.

I don't know if this helped.

Andrew

The major issue will be when reading the velocities from the data file. While the unit of length is the same between real and metal, the unit of time differs by a factor of 1000, and so will the velocities need to be rescaled correspondingly.

It is also advisable to use the nocoeff flag, and the atom style needs to be the same.

Axel

Dear Andrew,

Thank you very much for your very detailed reply! It helps a lot. The suggestions for the dump file and the timesteps are very useful.

Could you please help me with one more question? Do you think I can continue the simulation by using "write_restart"? Since the restart file is binary, it seems I am not able to change the values in that.

Best Regards,

Wenqiang

Dear Axel,

Thank you very much for the advice!

Could you please explain a bit about the nocoeff flag or tell me which command is this related to? Thus I can check the doc page. I have not noticed the nocoeff flag when I read the manual.

One more thing is that, I am not quite confident that whether the simulation result is reliable if two completely different potentials are used for two separate stages. The properties calculated by the two potentials should be more or less different, thus, is that possible that some artifacts would be introduced? Could you please give me some comments? Thanks in advance!

Best Regards,

Wenqiang