You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is how I plan to add exact treatment of PME electrostatics in alchemy.
Allow the value "exact" for the argument alchemical_pme_treatment in the AbsoluteAlchemicalFactory constructor.
An exception is raised if achemical_pme_treatment is set to "exact", but charges are decoupled and/or if (softcore_beta, softcore_d, softcore_e, softcore_f) != (0, 1, 1, 1).
AbsoluteAlchemicalFactory creates a CustomNonbondedForce with empty interaction groups that permanently store the fully interacting charges of alchemical atoms.
AlchemicalState reads the original charges only once and cache them internally (charges are associated to the standard system hash).
The advantage of this approach is that AlchemicalState completely masks how the lambda_electrostatics parameter is implemented in the OpenMM System. Better ideas for how to keep in memory the original charges are welcomed.
The text was updated successfully, but these errors were encountered:
Some observations for the near-term implementation:
Generally, only a very small number of particles will have their charges change, so we only need to keep track of a dict of which ones are changing
The particles without charges changing in the CustomNonbondedForce can have their reference charges set to zero. Particles with nonzero charges are the ones that are changing.
Longer-term, we should work to see how we can get support for changing charges in OpenMM as context parameters:
This could be simply allowing us to set a parameter that scales some or all charges or energies in NonbondedForce and also specify interaction groups
This is how I plan to add exact treatment of PME electrostatics in
alchemy
."exact"
for the argumentalchemical_pme_treatment
in theAbsoluteAlchemicalFactory
constructor.achemical_pme_treatment
is set to"exact"
, but charges are decoupled and/or if(softcore_beta, softcore_d, softcore_e, softcore_f) != (0, 1, 1, 1)
.AbsoluteAlchemicalFactory
creates aCustomNonbondedForce
with empty interaction groups that permanently store the fully interacting charges of alchemical atoms.AlchemicalState
reads the original charges only once and cache them internally (charges are associated to the standard system hash).The advantage of this approach is that
AlchemicalState
completely masks how thelambda_electrostatics
parameter is implemented in the OpenMMSystem
. Better ideas for how to keep in memory the original charges are welcomed.The text was updated successfully, but these errors were encountered: