Package ffx.potential.nonbonded
Class COMRestraint
java.lang.Object
ffx.potential.nonbonded.COMRestraint
- All Implemented Interfaces:
LambdaInterface
Restrain molecules to their center of mass.
- Since:
- 1.0
- Author:
- Julia Park
-
Constructor Summary
ConstructorDescriptionCOMRestraint
(MolecularAssembly molecularAssembly) This COMRestraint is based on the unit cell parameters and symmetry operators of the supplied crystal. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Get the 2nd partial derivative of the energy with respect to lambda.double
getdEdL()
Get the partial derivative of the energy with respect to lambda.void
getdEdXdL
(double[] gradient) Get the gradient of dEdL with respect to each parameter.double
Get the current value of the state variable.double
residual
(boolean gradient, boolean print) residual.void
setLambda
(double lambda) Set the current value of the state variable.void
setLambdaTerm
(boolean lambdaTerm) Setter for the fieldlambdaTerm
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ffx.potential.bonded.LambdaInterface
dEdLZeroAtEnds
-
Constructor Details
-
COMRestraint
This COMRestraint is based on the unit cell parameters and symmetry operators of the supplied crystal.- Parameters:
molecularAssembly
- The MolecularAssembly to operate on.
-
-
Method Details
-
getLambda
public double getLambda()Get the current value of the state variable.- Specified by:
getLambda
in interfaceLambdaInterface
- Returns:
- state
-
setLambda
public void setLambda(double lambda) Set the current value of the state variable. May be ignored if lambda is not being applied.- Specified by:
setLambda
in interfaceLambdaInterface
- Parameters:
lambda
- a double.
-
getd2EdL2
public double getd2EdL2()Get the 2nd partial derivative of the energy with respect to lambda.- Specified by:
getd2EdL2
in interfaceLambdaInterface
- Returns:
- d2EdL2
-
getdEdL
public double getdEdL()Get the partial derivative of the energy with respect to lambda.- Specified by:
getdEdL
in interfaceLambdaInterface
- Returns:
- dEdL
-
getdEdXdL
public void getdEdXdL(double[] gradient) Get the gradient of dEdL with respect to each parameter.- Specified by:
getdEdXdL
in interfaceLambdaInterface
- Parameters:
gradient
- - A double array of length the number of parameters in the model (commonly 3 * number of atoms).
-
residual
public double residual(boolean gradient, boolean print) residual.- Parameters:
gradient
- a boolean.print
- a boolean.- Returns:
- a double.
-
setLambdaTerm
public void setLambdaTerm(boolean lambdaTerm) Setter for the fieldlambdaTerm
.- Parameters:
lambdaTerm
- a boolean.
-