Package ffx.numerics
Interface Potential
- All Superinterfaces:
OptimizationInterface
- All Known Subinterfaces:
CrystalPotential
- All Known Implementing Classes:
ANIEnergy
,Barostat
,DualTopologyEnergy
,ExtendedSystem
,ForceFieldEnergy
,OpenMMEnergy
,OrthogonalSpaceTempering
,QuadTopologyEnergy
,RealSpaceEnergy
,RefinementEnergy
,XRayEnergy
,XtalEnergy
The Potential interface defines methods required by an optimizer or molecular dynamics.
- Since:
- 1.0
- Author:
- Michael J. Schnieders
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Set the state of the Potential to include FAST varying energy terms, SLOW varying energy terms or BOTH.static enum
Recognized variables currently include Cartesian coordinates and OTHER. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
getAcceleration
(double[] acceleration) getAcceleration.default List
<Constraint> Returns the list of Constraints associated with this Potential.Get the Potential Energy terms that is active.double[]
getMass()
Get the mass of each degree of freedom.double[]
getPreviousAcceleration
(double[] previousAcceleration) getPreviousAcceleration.Get the type of all variables.double[]
getVelocity
(double[] velocity) getVelocity.void
setAcceleration
(double[] acceleration) setAcceleration.void
Set the Potential Energy terms that should be active.void
setPreviousAcceleration
(double[] previousAcceleration) setPreviousAcceleration.void
setVelocity
(double[] velocity) setVelocity.default void
writeAdditionalRestartInfo
(boolean recursive) Writes additional restart information, if any (e.g.Methods inherited from interface ffx.numerics.OptimizationInterface
destroy, energy, energy, energyAndGradient, energyAndGradient, getCoordinates, getNumberOfVariables, getScaling, getTotalEnergy, getUnderlyingPotentials, scaleCoordinates, scaleCoordinatesAndGradient, setScaling, unscaleCoordinates
-
Method Details
-
getAcceleration
double[] getAcceleration(double[] acceleration) getAcceleration.- Parameters:
acceleration
- an array ofinvalid reference
double
- Returns:
- an array of
invalid reference
double
-
getConstraints
Returns the list of Constraints associated with this Potential. The default implementation returns an empty list.- Returns:
- All Constraints.
-
getEnergyTermState
Potential.STATE getEnergyTermState()Get the Potential Energy terms that is active.- Returns:
- the STATE
-
setEnergyTermState
Set the Potential Energy terms that should be active.- Parameters:
state
- include FAST varying energy terms, SLOW varying energy terms or BOTH.
-
getMass
double[] getMass()Get the mass of each degree of freedom. This is required for molecular dynamics.- Returns:
- The mass of each degree of freedom.
-
getPreviousAcceleration
double[] getPreviousAcceleration(double[] previousAcceleration) getPreviousAcceleration.- Parameters:
previousAcceleration
- an array ofinvalid reference
double
- Returns:
- an array of
invalid reference
double
-
getVariableTypes
Potential.VARIABLE_TYPE[] getVariableTypes()Get the type of all variables.- Returns:
- The VARIABLE_TYPE of each variable.
-
getVelocity
double[] getVelocity(double[] velocity) getVelocity.- Parameters:
velocity
- an array ofinvalid reference
double
- Returns:
- an array of
invalid reference
double
-
setAcceleration
void setAcceleration(double[] acceleration) setAcceleration.- Parameters:
acceleration
- an array ofinvalid reference
double
-
setPreviousAcceleration
void setPreviousAcceleration(double[] previousAcceleration) setPreviousAcceleration.- Parameters:
previousAcceleration
- an array ofinvalid reference
double
-
setVelocity
void setVelocity(double[] velocity) setVelocity.- Parameters:
velocity
- an array ofinvalid reference
double
-
writeAdditionalRestartInfo
default void writeAdditionalRestartInfo(boolean recursive) Writes additional restart information, if any (e.g. OST histogram and lambda restart files). The recursive flag should generally only be true for the top-level Potential called.- Parameters:
recursive
- Whether to have all underlying Potentials write additional restart info.
-