Neighbors Lists for specific groups of atoms

I’m trying to compute a free energy of solvation using the ML-IAP potential. This involves integrating over lambda in the expression

lambda * all + (1-lambda)*(solvent + solute)

where ‘all’ is the force generated when all atoms are sent to ML-IAP, ‘solvent’ are the forces generated by ML-IAP when only solvent atoms are sent to ML-IAP, and ‘solute’ are the forces generated by ML-IAP when only solute atoms are sent to ML-IAP.

Is it possible to build ‘subset’ neighbors lists that contain only atoms from a defined group and use those neighbors lists when computing forces?

I am aware of the FEP package, but it will only work on pairwise potentials. Generating neighbors lists for specific groups of atoms would work on a larger class of potentials.

What about the forces between solvent and solute?

This would happen when using a hybrid pair style. LAMMPS will generate “skip lists” that are built from a “master” neighbor list that includes all pairs and then builds a list for only the atoms included in the sub-style. Your lambda case could be represented with the hybrid/scaled pair style. But see my comment from above.

There are currently three ways in LAMMPS of generating the kind of “mixed” interaction using a scaling value (like your lambda), each with their specific restrictions.

  • fix adapt or fix adapt/fep
  • pair style hybrid/scaled
  • fix alchemy

hybrid/scaled is exactly what I want to do, execpt I don’t seen in the documentation any way to make the different potentials act on different groups of atoms. I was looking here and it appears to be all based on atom types:
https://docs.lammps.org/pair_hybrid.html

I’d really like to be able to say sub-style 1 operates on group ‘all’, sub-style 2 operates on group ‘solvent’, and sub-style 3 operates on group ‘solute’.

‘forces between solvent and solute’: This is my understanding of how thermodynamic integration works for free energy of solvation. Start with non-interacting solvent and solute, where atoms are free to pass over eachother because they are non-interacting. slowly turn on the interaction and the solute will begin to make a void for the solvent. Then you integrate over all values of the interaction.

Yes, this is a built in requirement, but not really a restriction, since you can use different atom types for solvent and solute atoms, even if they are the same element. It is a bit convoluted, but it should work out to something like this for a two element system:

pair_style hybrid/scaled v_one mliap model xxx descriptor yyy v_two mliap model xxx descriptor yyy v_three mliap model xxx descriptor yyy
pair_coeff * * mliap 1 A B NULL NULL
pair_coeff * * mliap 2 NULL NULL A B
pair_coeff * * mliap 3 A B A B

You would then have to use atom types 1 and 2 for one group and types 3 and 4 for the other.

Perfect. Amazing. Wonderful. Thank you. Didn’t know about NULL.