read_restart and complex bond_coeff

Dear lammps users and developers:
I used read_data command to define bond pairs and their coeff. When I used read_restart command to read the restart file, an error came up:

ERROR: Bond coeffs are not set (…/bond.cpp:71)

I checked the manual :

Typically these are many-body or tabulated potentials which read
their parameters from separate files. In these cases you will need to re-specify the
pair_coeff*,* bond_coeff*, etc commands in your restart input script.*

I know I need to re-specify the bond_coeff. However, my bond coeff are varied between bond pairs(thoudsands of bond types) that means specificing all the bond coeff in the input file is quite an effort. Best to my knowledge, I cannot use read_data command again in a restart input file.
Could you tell me what can I do?
Thank you in advance!

You could try one of the following:

  1. you could try using write_data and read_data instead of restart files.
  2. you could set up a minimal input script and then write out all XXX_coeff statements to a file with “write_coeff” and then using the “include” command to include those coeff settings after continuing from a restart file
  3. you can write a little python/perl/awk/bash/whatever script/program that processes the XXXCoeff sections of your data file into a file with XXX_coeff statements like in option 2). Most of them implicitly call the corresponding XXX_coeff command with the line of the data file appended. For the PairCoeff section there is only one atom type given, so the atom type has to be duplicated to match the requirements of the pair_coeff command and the mixed terms are automatically generated - like when using the data file - through the selected mixing rule. If you are using a PairIJCoeff section, that this section lists two atom types and has all mixed terms explicitly included, so just prepending pair_coeff would be sufficient.

Options 1) and 2) require that the used styles do support writing to a data file (correctly). This may depend on the LAMMPS version in use and the specific pair/bond/angle/dihedral/improper style.

Axel.

Thank you for your generous help!