Class OpenMMSystem

java.lang.Object
ffx.openmm.System
ffx.potential.openmm.OpenMMSystem

public class OpenMMSystem extends System
Create and manage an OpenMM System.

The definition of a System involves four elements:

The particles and constraints are defined directly by the System object, while forces are defined by objects that extend the Force class. After creating a System, call addParticle() once for each particle, addConstraint() for each constraint, and addForce() for each Force.

In addition, particles may be designated as "virtual sites". These are particles whose positions are computed automatically based on the positions of other particles. To define a virtual site, call setVirtualSite(), passing in a VirtualSite object that defines the rules for computing its position.

  • Constructor Details Link icon

    • OpenMMSystem Link icon

      public OpenMMSystem(OpenMMEnergy openMMEnergy)
      OpenMMSystem constructor.
      Parameters:
      openMMEnergy - ForceFieldEnergyOpenMM instance.
  • Method Details Link icon

    • addForces Link icon

      public void addForces()
      Add forces to the system.
    • removeForce Link icon

      public void removeForce(Force force)
      Remove a force from the OpenMM System. The OpenMM memory associated with the removed Force object is deleted.
    • addAndersenThermostatForce Link icon

      public void addAndersenThermostatForce(double targetTemp)
      Add an Andersen thermostat to the system.
      Parameters:
      targetTemp - Target temperature in Kelvins.
    • addAndersenThermostatForce Link icon

      public void addAndersenThermostatForce(double targetTemp, double collisionFreq)
      Add an Andersen thermostat to the system.
      Parameters:
      targetTemp - Target temperature in Kelvins.
      collisionFreq - Collision frequency in 1/psec.
    • addCOMMRemoverForce Link icon

      public void addCOMMRemoverForce()
      Adds a force that removes center-of-mass motion.
    • addMonteCarloBarostatForce Link icon

      public void addMonteCarloBarostatForce(double targetPressure, double targetTemp, int frequency)
      Add a Monte Carlo Barostat to the system.
      Parameters:
      targetPressure - The target pressure (in atm).
      targetTemp - The target temperature.
      frequency - The frequency to apply the barostat.
    • calculateDegreesOfFreedom Link icon

      public int calculateDegreesOfFreedom()
      Calculate the number of degrees of freedom.
      Returns:
      Number of degrees of freedom.
    • getTemperature Link icon

      public double getTemperature(double kineticEnergy)
    • getForceField Link icon

      public ForceField getForceField()
      Get the ForceField in use.
      Returns:
      ForceField instance.
    • getCrystal Link icon

      public Crystal getCrystal()
      Get the Crystal instance.
      Returns:
      the Crystal instance.
    • getNumberOfVariables Link icon

      public int getNumberOfVariables()
      Get the number of variables.
      Returns:
      the number of variables.
    • free Link icon

      public void free()
      Destroy the system.
    • setUpdateBondedTerms Link icon

      public void setUpdateBondedTerms(boolean updateBondedTerms)
    • updateParameters Link icon

      public 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.
    • updateAtomMass Link icon

      public void updateAtomMass()
      This method sets the mass of inactive atoms to zero.
    • hasAmoebaCavitationForce Link icon

      public boolean hasAmoebaCavitationForce()