Interface LambdaInterface

All Known Implementing Classes:
AngleTorsion, ANIEnergy, COMRestraint, DualTopologyEnergy, ForceFieldEnergy, GeneralizedKirkwood, NCSRestraint, OpenMMEnergy, OrthogonalSpaceTempering, ParticleMeshEwald, PiOrbitalTorsion, QuadTopologyEnergy, RealSpaceEnergy, RefinementEnergy, RestrainDistance, RestrainPosition, RestraintTorsion, StretchTorsion, Torsion, TorsionTorsion, VanDerWaals, VanDerWaalsTornado, XRayEnergy

public interface LambdaInterface
The LambdaInterface should be implemented by potential energy terms that can accept a lambda value from [0 .. 1] that defines a twice differentiable path between states 0 and 1.
Since:
1.0
Author:
Michael J. Schnieders
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Returns true if dUdL is guaranteed to be zero at 0 and 1.
    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.
    void
    setLambda(double lambda)
    Set the current value of the state variable.
  • Method Details

    • dEdLZeroAtEnds

      default boolean dEdLZeroAtEnds()
      Returns true if dUdL is guaranteed to be zero at 0 and 1. Default implementation is to return false.
      Returns:
      True if dUdL is guaranteed 0 at endpoints.
    • getLambda

      double getLambda()
      Get the current value of the state variable.
      Returns:
      state
      Since:
      1.0
    • setLambda

      void setLambda(double lambda)
      Set the current value of the state variable. May be ignored if lambda is not being applied.
      Parameters:
      lambda - a double.
      Since:
      1.0
    • getd2EdL2

      double getd2EdL2()
      Get the 2nd partial derivative of the energy with respect to lambda.
      Returns:
      d2EdL2
      Since:
      1.0
    • getdEdL

      double getdEdL()
      Get the partial derivative of the energy with respect to lambda.
      Returns:
      dEdL
      Since:
      1.0
    • getdEdXdL

      void getdEdXdL(double[] gradient)
      Get the gradient of dEdL with respect to each parameter.
      Parameters:
      gradient - - A double array of length the number of parameters in the model (commonly 3 * number of atoms).
      Since:
      1.0