Package ffx.potential.nonbonded
Class NCSRestraint
java.lang.Object
ffx.potential.nonbonded.NCSRestraint
- All Implemented Interfaces:
LambdaInterface
Given unit cell parameters and symmetry operators, NCS copies are restrained to the asymmetric
unit atoms.
- Since:
- 1.0
- Author:
- Michael J. Schnieders
-
Constructor Summary
ConstructorDescriptionNCSRestraint
(Atom[] atoms, ForceField forceField, Crystal crystal) This NCSRestraint 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.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
-
NCSRestraint
This NCSRestraint is based on the unit cell parameters and symmetry operators of the supplied crystal.- Parameters:
atoms
- the Atom array to construct this NCSRestraint from.forceField
- the ForceField parameterscrystal
- the Crystal specifies symmetry and PBCs.
-
-
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.
-