Package ffx.potential.openmm
Interface OpenMMPotential
- All Known Implementing Classes:
OpenMMDualTopologyEnergy
,OpenMMEnergy
public interface OpenMMPotential
An interface for classes that provide an OpenMM potential energy implementation.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the Context instance.getOpenMMState
(int mask) Create an immutable OpenMM State.Get a reference to the System instance.boolean
Update active atoms.void
updateContext
(String integratorName, double timeStep, double temperature, boolean forceCreation) Update the OpenMM Context.void
updateParameters
(Atom[] atoms) Update parameters if the Use flags and/or Lambda value has changed.
-
Method Details
-
getContext
OpenMMContext getContext()Returns the Context instance.- Returns:
- context
-
updateContext
void updateContext(String integratorName, double timeStep, double temperature, boolean forceCreation) Update the OpenMM Context.- Parameters:
integratorName
- Integrator to use.timeStep
- Time step.temperature
- Temperature (K).forceCreation
- Force a new Context to be created, even if the existing one matches the request.
-
getOpenMMState
Create an immutable OpenMM State.State.free() must be called to free OpenMM memory.
- Parameters:
mask
- The State mask.- Returns:
- Returns the State.
-
getSystem
OpenMMSystem getSystem()Get a reference to the System instance.- Returns:
- a reference to the OpenMMSystem.
-
setActiveAtoms
boolean setActiveAtoms()Update active atoms.- Returns:
- True if there are inactive atoms.
-
updateParameters
Update parameters if the Use flags and/or Lambda value has changed.- Parameters:
atoms
- Atoms in this list are considered.
-