Class NCSRestraint

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

public class NCSRestraint extends Object implements 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

    Constructors
    Constructor
    Description
    NCSRestraint(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 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.

    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

      public NCSRestraint(Atom[] atoms, ForceField forceField, Crystal crystal)
      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 parameters
      crystal - the Crystal specifies symmetry and PBCs.
  • 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.