Class TorsionAngle
- java.lang.Object
-
- com.actelion.research.chem.forcefield.mmff.TorsionAngle
-
- All Implemented Interfaces:
EnergyTerm
public class TorsionAngle extends java.lang.Object implements EnergyTerm
Torsional Angle energy term class. This energy term represents the energy associated with the torsional angle formed by four atoms A1..A4: A1 \ A2--A3 \ A4
-
-
Constructor Summary
Constructors Constructor Description TorsionAngle(Tables table, MMFFMolecule mol, int a1, int a2, int a3, int a4)Construct a new torsion angle energy term.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.List<TorsionAngle>findIn(Tables t, MMFFMolecule mol)Helper function that builds a list of TorsionAngles for a molecule.doublegetEnergy(double[] pos)Calculates the torsional energy.voidgetGradient(double[] pos, double[] grad)Calculates the gradient and adds it to the gradients array.booleannonZero()Checks that at least one of the constants is non-zero.
-
-
-
Constructor Detail
-
TorsionAngle
public TorsionAngle(Tables table, MMFFMolecule mol, int a1, int a2, int a3, int a4)
Construct a new torsion angle energy term.- Parameters:
table- The tables parameter object.mol- The molecule.a1- Index of atom 1 in mol.a2- Index of atom 2 in mol.a3- Index of atom 3 in mol.a4- Index of atom 4 in mol.
-
-
Method Detail
-
getEnergy
public double getEnergy(double[] pos)
Calculates the torsional energy.- Specified by:
getEnergyin interfaceEnergyTerm- Parameters:
pos- The atoms current positions array.- Returns:
- The energy.
-
getGradient
public void getGradient(double[] pos, double[] grad)Calculates the gradient and adds it to the gradients array.- Specified by:
getGradientin interfaceEnergyTerm- Parameters:
pos- The atoms current positions array.grad- the atoms current gradients array.
-
nonZero
public boolean nonZero()
Checks that at least one of the constants is non-zero.- Returns:
- True if any constant is non-zero, false otherwise.
-
findIn
public static java.util.List<TorsionAngle> findIn(Tables t, MMFFMolecule mol)
Helper function that builds a list of TorsionAngles for a molecule.- Parameters:
t- The tables object.mol- The molecule to generate torsions for.- Returns:
- Am array of TorsionAngle.
-
-