OpenMM TI using Gromacs input
ghost.top: the topology file used in Gromacs thermodynamic integration.
solv_ions.gro: the coonfiguration in Gromacs thermodynamic integration, with the very last two particle Na+ and Cl- as the alchemical particles.
ti.py: the OpenMM codes that do thermodynamic integration. ParmEd is used to read .top and .gro files. You need to edit the path of your gromacs top library.
ti.txt: The derivatives dG/dlambda in each ietration and the delta G.
Comb_rule = 3 for OPLS-AA force field .top. ParmEd generates two force objects, one "NonBondedForce" object with all coulomb parameters and the other "CustomNonbondedForce" object with all L-J parameters. In the "NonBondedForce" object, "epsilon" and "sigma" for all the atoms have the same values, and are not correct. Instead, the "CustomNonbondedForce" object keeps all the correct parameters.
If you don't use OPLS-AA force field, then you need to delete the "CustomNonbondedForce" object CustomLJbyParmed and read the parameters from the "NonBondedForce" object directly.
The L-J parameters in the "CustomNonbondedForce" object are not the same as the values in the OPLS-AA forcefield, which means ParmEd "translates" the parameters and stores them in its own comb_rule. Not very sure about the exact translation rule though. See below how ParmEd define the "CustomNonbondedForce" object.
NB_cus.getEnergyFunction()
Based on the description of soft-core potential in Gromacs manual https://manual.gromacs.org/2019.1/reference-manual/functions/free-energy-interactions.html, the soft-core potential has been modified using the function form of the "CustomNonbondedForce" object that ParmEd generates.