But before you can use that you have to solve the problem of which pair style (and parameters) you want to use for the interactions between the particles with different pair styles.
I know the “pair_style hybrid” command allows me to define multiple force fields, but the “pair_coeff i j …” command only allows me to define different force fields among different atom types.
However, what I want is something like:
If atoms i and j are in the same molecule → use pair_style 1
If atoms i and j are in different molecules → use pair_style 2
There is no hybrid pair style variant specifically for this. The only way to realize this with the current hybrid pair style would be to use the different atom types in each molecule.
Example: You have atom types 1 and 2 in each molecule and 3 molecules. Then you set atom types 1 and 2 for molecule 1, types 3 and 4 for molecule 2 and types 5 and 6 for molecule 3. Then you have:
@Bo-Kai_Xu a similar request as yours, i.e. to have different pair coeffs for inter- versus intra-molecular interactions came up during the recent LAMMPS Master Class workshop and we discussed how this could be implemented (that was one of the benefits of having the three most prolific contributors to LAMMPS in the same room for several days).
Please have a look at New pair style hybrid/molecular by akohlmey · Pull Request #4191 · lammps/lammps · GitHub which is an attempt to implement the result of our discussions and provides a new pair style hybrid/molecular that works by accepting two pair sub-styles, the first applies to intra-molecular interactions and the second to inter-molecular pairs. Different pair coeffs for the same pair style can be implemented by listing the same pair style twice and then use the proper indexing to the two pair styles in the pair_coeff commands.
This pair style is included in the 27 June 2024 feature release of LAMMPS.
We would really love to get some feedback on its usability and potential issues before we release the next stable version of LAMMPS (probably in mid August).