In which part of the resource codes of LAMMPS Mixing, shift, table, tail correction, restart , rRESPA capabilities are set?

As you know, some pair_styles have the capabilities of Mixing, shift, table, tail correction, restart, and rRESPA. I want to know in which part of the resource codes of LAMMPS these capabilities are set and determined. This is because we are developing a new pair_style which have some similarities with Gay-Berne. So we want to use the Gay-Berne codes as a basis for developing our pair_style. But for the mentioned capabilities we have to know how and where they are introduced in the LAMMPS resource codes.
Any comment will be appreciated.

Within the pair style. Please look for example at the lj/cut pair style (which is a bit like the Drosophila fly for MD simulations. Specifically:

  • mixing is realized in the init_one function (indicated by setflag[i][j] == 0, i.e. unset between types i and j)
  • similarly computing the energy offset for shifting the potential to zero at cutoff (the request is indicated by offset_flag)
  • also the tail correction is computed in that function (see tail_flag)
  • for supporting r-RESPA in general, nothing needs to be done. Only if you want to support multi-cutoff r-RESPA for your pair style. In that case you need to request a r-RESPA style neighbor list in the init_style() function, set the respa_enable flag to 1 in the pair style constructor, and implement the compute_inner(), compute_middle() and compute_outer() functions in addition to the compute() function
  • the pair_modify table option only applies to long-range coulomb. You can study pair style coul/long for that (look for ncoultablebits)
  • for restart capabilities you need to implement the functions for reading and writing global and per-type settings

Many thanks for your nice and prompt answers. :ok_hand:
Lets apply them and back to you if encountered problem.