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
ConstructorsConstructorDescriptionNCSRestraint(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 TypeMethodDescriptiondoubleGet the 2nd partial derivative of the energy with respect to lambda.doublegetdEdL()Get the partial derivative of the energy with respect to lambda.voidgetdEdXdL(double[] gradient) Get the gradient of dEdL with respect to each parameter.doubleGet the current value of the state variable.doubleresidual(boolean gradient, boolean print) residual.voidsetLambda(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, waitMethods 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:
getLambdain 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:
setLambdain interfaceLambdaInterface- Parameters:
lambda- a double.
-
getd2EdL2
public double getd2EdL2()Get the 2nd partial derivative of the energy with respect to lambda.- Specified by:
getd2EdL2in interfaceLambdaInterface- Returns:
- d2EdL2
-
getdEdL
public double getdEdL()Get the partial derivative of the energy with respect to lambda.- Specified by:
getdEdLin interfaceLambdaInterface- Returns:
- dEdL
-
getdEdXdL
public void getdEdXdL(double[] gradient) Get the gradient of dEdL with respect to each parameter.- Specified by:
getdEdXdLin 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.
-