I went Lammps the examples directory and tried the case of dreiding. It works for the first run. I cannot make continuation of a previous run with the example code modified. I only add “restart 50 restart.dreiding” at the second last line before “run” command to produce a restart file called “restart.dreiding.100” in the first run. Then I replace “read_data data.dreiding” in the original code by “read_restart restart.dreiding.100” in the continue run. But it does not work. I do not know how to solve this problem since my code used the same pair_style as the dreiding code to deal with hbond and had the same problem for continuation of a previous run.
Would you help me?
First off, a lot of settings do not need to be repeated when reading a restart file (units, atom_style, boundary, dielectric, special_bonds, most pair/bond/angle/dihedral/improper styles).
But please note that when reading the restart you get the following output:
Reading restart file …
restart file = 7 Jan 2022, LAMMPS = 7 Jan 2022
restoring atom style full from restart
orthogonal box = (0 0 0) to (19.99689 19.12816 19.46971)
1 by 1 by 1 MPI processor grid pair style hybrid/overlay stores no restart info
restoring bond style harmonic from restart
restoring angle style harmonic from restart
restoring dihedral style harmonic from restart
So the hybrid/overlay pair style info is not stored and you need to repeat it in the input after reading the restart file. In LAMMPS input files order matters so specifying the style before reading the restart is not sufficient. So the following should work as expected: