Continuation of a previous run for Pair_style hydrid/overlay case

Dear Akohlmey:

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?

Dewei

Dewei

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
384 atoms
320 bonds
448 angles
192 dihedrals

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:

read_restart       restart.dreiding.100

pair_style      hybrid/overlay hbond/dreiding/lj 2 6 6.5 90 lj/cut/coul/long 8.50000  11.5
pair_coeff      1    1    lj/cut/coul/long        0.015200000256300         2.846421344984478
pair_coeff      1    2    lj/cut/coul/long        0.001232882795416         2.846421344984478
pair_coeff      1    3    lj/cut/coul/long        0.038019995160237         3.159705878878677
pair_coeff      1    4    lj/cut/coul/long        0.038139744011598         2.939787518071103
pair_coeff      2    2    lj/cut/coul/long     9.99999974737875e-05         2.846421344984478
pair_coeff      2    3    lj/cut/coul/long        0.003083828758188         3.159705878878677
pair_coeff      2    4    lj/cut/coul/long        0.003093541672406         2.939787518071103
pair_coeff      3    3    lj/cut/coul/long        0.095100000500679         3.472990412772877
pair_coeff      3    4    lj/cut/coul/long        0.095399530150179         3.253072051965302
pair_coeff      4    4    lj/cut/coul/long        0.095700003206730         3.033153691157727
pair_coeff      4    4    hbond/dreiding/lj  2  i  4.000    2.750000000000000      4
kspace_style    pppm 0.001

[...]

Dear Akohlmey:

Wonderful, you solved my problem. You are a truly expert.

Thank you so much.

Dewei

No, I am just careful and observant!