Implement support for decoupled electrostatics with exact PME and GROMACS-type direct-space PME
See original GitHub issueI’m looking to perform some alchemical free energy calculations and recently started using OpenMM to do this. You’ve all done some nice work here, so I don’t want to re-invent the wheel, but I initially set out to try and make these calculations work without openmmtools.alchemy, mainly to deepen my own understanding of how this all works.
Just to clearly define the problem, I want to take a particular molecule and decouple it from the rest of the system, leaving all direct-space intramolecular interactions on. From what I understand, this is what GROMACS achieves (someone please correct me here if necessary), and so I’ve been checking potential energies at different states against calculations from GROMACS.
This is relatively straight-forward in terms of sterics, as there is no reciprocal space term to deal with. However, electrostatics is a different story. Ideally, the coupled state includes all direct and reciprocal space interactions while the uncoupled state includes direct and reciprocal space interactions for the system minus the alchemical molecule and the direct-space interactions for the molecule with itself. I think I figured out a way to do this with OpenMM, and it mostly matches with GROMACS, but it doesn’t seem to match any of the options for handling electrostatics provided by AbsoluteAlchemicalFactory. In my approach, I use the following scheme:
-
NonbondedForce using PME with all electrostatics (except 1-4 terms and with all alchemical/alchemical terms set to zero with exceptions), and all non-alchemical/non-alchemical sterics (LJ)
-
CustomNonbondedForce using CutoffPeriodic implementing a soft-core potential for alchemical/non-alchemical sterics
-
NonbondedForce using PME with ONLY exceptions (zero for all particle charges and epsilons), including 1-4 terms and other alchemical/alchemical non-bonded interactions
Is this doing what I think it is? And for the options you have in AbsoluteAlchemicalFactory, what are the exact end states (coupled molecule with lambda of say 0, to uncoupled molecule with lambda of 1)? In terms of the potential energy function?
In my tests, I have set up the alchemical system with the following code:
alchFactory = alchemy.AbsoluteAlchemicalFactory(consistent_exceptions=False,
alchemical_pme_treatment='coulomb',
disable_alchemical_dispersion_correction=False,
split_alchemical_forces=True
)
alchemicalRegion = alchemy.AlchemicalRegion(alchemical_atoms=soluteIndices,
annihilate_electrostatics=False,
softcore_alpha=0.5,
softcore_a=1, softcore_b=1, softcore_c=1,
softcore_beta=0.0,
softcore_d=1, softcore_e=1, softcore_f=1
)
Obviously consistent_exceptions plays a role here too, but based on other discussions I’ve seen around this point I’m pretty sure I want to keep it as False.
I’m sorry if this is documented and I missed it. I also know there has been a lot of tangentially-related discussion on github, but I’m having difficulty synthesizing it into something cohesive.
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (6 by maintainers)
Top GitHub Comments
Thank you! Sorry for the silence for awhile, but I will fork and take a stab at modifying alchemy.py to include this option when I get the chance. For now it’s been easier for me to just stick with my own code, but you guys have a lot of nice features I eventually want to take advantage of.
I’ve changed the title of this to remind us to implement decoupled electrostatics with exact PME and direct-space PME preserving the reciprocal space during the alchemical transformation.