Package ffx.potential
Class ForceFieldEnergyOpenMM.System
java.lang.Object
ffx.potential.ForceFieldEnergyOpenMM.System
- Enclosing class:
ForceFieldEnergyOpenMM
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.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAndersenThermostatForce
(double targetTemp) Add an Andersen thermostat to the system.void
addAndersenThermostatForce
(double targetTemp, double collisionFreq) Add an Andersen thermostat to the system.void
Adds a force that removes center-of-mass motion.void
addMonteCarloBarostatForce
(double targetPressure, double targetTemp, int frequency) Add a Monte Carlo Barostat to the system.int
Calculate the number of degrees of freedom.void
free()
Destroy the system.void
Print current lambda values.void
setLambda
(double lambda) Set the overall lambda value for the system.void
setUpdateBondedTerms
(boolean updateBondedTerms)
-
Method Details
-
addAndersenThermostatForce
public void addAndersenThermostatForce(double targetTemp) Add an Andersen thermostat to the system.- Parameters:
targetTemp
- Target temperature in Kelvins.
-
addAndersenThermostatForce
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
public void addCOMMRemoverForce()Adds a force that removes center-of-mass motion. -
addMonteCarloBarostatForce
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
public int calculateDegreesOfFreedom()Calculate the number of degrees of freedom.- Returns:
- Number of degrees of freedom.
-
free
public void free()Destroy the system. -
printLambdaValues
public void printLambdaValues()Print current lambda values. -
setLambda
public void setLambda(double lambda) Set the overall lambda value for the system.- Parameters:
lambda
- Current lambda value.
-
setUpdateBondedTerms
public void setUpdateBondedTerms(boolean updateBondedTerms)
-