Class RestrainGroups

java.lang.Object
ffx.potential.nonbonded.RestrainGroups

public class RestrainGroups extends Object
Apply a restraint between groups.
Since:
1.0
Author:
Michael J. Schnieders
  • Constructor Details

    • RestrainGroups

      public RestrainGroups(MolecularAssembly molecularAssembly)
      Group Restraint Constructor.
      Parameters:
      molecularAssembly - The molecularAssembly to operate on.
  • Method Details

    • getNumberOfGroups

      public int getNumberOfGroups()
      Get the number of groups.
      Returns:
      Returns the number of groups.
    • getGroupMembers

      public int[] getGroupMembers(int group)
      Get group members.
      Parameters:
      group - Group index.
      Returns:
      Returns group members.
    • getGroup1

      public int[] getGroup1()
      Group 1 for each restraint.
      Returns:
      Returns group 1 for each restraint.
    • getGroup2

      public int[] getGroup2()
      Group 2 for each restraint.
      Returns:
      Returns group 2 for each restraint.
    • getForceConstants

      public double[] getForceConstants()
      Force constant for each restraint.
      Returns:
      Returns the force constant for each restraint.
    • getSmallerDistance

      public double[] getSmallerDistance()
      Smaller distance for each restraint.
      Returns:
      Returns the smaller distance for each restraint.
    • getLargerDistance

      public double[] getLargerDistance()
      Larger distance for each restraint.
      Returns:
      Returns the force constant for each restraint.
    • energy

      public double energy(boolean gradient)
      Compute energy and derivatives for group distance restraint terms.
      Parameters:
      gradient - If true, compute the derivative.
      Returns:
      The potential energy.
    • getNumberOfRestraints

      public int getNumberOfRestraints()
      Get the number of group restraints.
      Returns:
      The number of group restraints.