Class COMRestraint

java.lang.Object
ffx.potential.nonbonded.COMRestraint
All Implemented Interfaces:
LambdaInterface

public class COMRestraint extends Object implements LambdaInterface
Restrain molecules to their center of mass.
Since:
1.0
Author:
Julia Park
  • Constructor Summary

    Constructors
    Constructor
    Description
    COMRestraint(MolecularAssembly molecularAssembly)
    This COMRestraint is based on the unit cell parameters and symmetry operators of the supplied crystal.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Get the 2nd partial derivative of the energy with respect to lambda.
    double
    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 field lambdaTerm.

    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

      public COMRestraint(MolecularAssembly molecularAssembly)
      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 interface LambdaInterface
      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 interface LambdaInterface
      Parameters:
      lambda - a double.
    • getd2EdL2

      public double getd2EdL2()
      Get the 2nd partial derivative of the energy with respect to lambda.
      Specified by:
      getd2EdL2 in interface LambdaInterface
      Returns:
      d2EdL2
    • getdEdL

      public double getdEdL()
      Get the partial derivative of the energy with respect to lambda.
      Specified by:
      getdEdL in interface LambdaInterface
      Returns:
      dEdL
    • getdEdXdL

      public void getdEdXdL(double[] gradient)
      Get the gradient of dEdL with respect to each parameter.
      Specified by:
      getdEdXdL in interface LambdaInterface
      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 field lambdaTerm.
      Parameters:
      lambdaTerm - a boolean.