Interface OpenMMPotential

All Known Implementing Classes:
OpenMMDualTopologyEnergy, OpenMMEnergy

public interface OpenMMPotential
An interface for classes that provide an OpenMM potential energy implementation.
  • 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

      OpenMMState getOpenMMState(int mask)
      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

      void updateParameters(@Nullable Atom[] atoms)
      Update parameters if the Use flags and/or Lambda value has changed.
      Parameters:
      atoms - Atoms in this list are considered.