Package ffx.potential.nonbonded
Class RestrainGroups
java.lang.Object
ffx.potential.nonbonded.RestrainGroups
Apply a restraint between groups.
- Since:
- 1.0
- Author:
- Michael J. Schnieders
-
Constructor Summary
ConstructorDescriptionRestrainGroups
(MolecularAssembly molecularAssembly) Group Restraint Constructor. -
Method Summary
Modifier and TypeMethodDescriptiondouble
energy
(boolean gradient) Compute energy and derivatives for group distance restraint terms.double[]
Force constant for each restraint.int[]
Group 1 for each restraint.int[]
Group 2 for each restraint.int[]
getGroupMembers
(int group) Get group members.double[]
Larger distance for each restraint.int
Get the number of groups.int
Get the number of group restraints.double[]
Smaller distance for each restraint.
-
Constructor Details
-
RestrainGroups
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.
-