Class StretchBend
- java.lang.Object
-
- com.actelion.research.chem.forcefield.mmff.StretchBend
-
- All Implemented Interfaces:
EnergyTerm
public class StretchBend extends java.lang.Object implements EnergyTerm
Stretch bending energy term class. This energy term represents the bond stretching-angle bending energy associated with three bonded atoms A1--A2--A3 with an angle at A2.
-
-
Constructor Summary
Constructors Constructor Description StretchBend(Tables table, MMFFMolecule mol, int a1, int a2, int a3)
Constructs a new stretch bend object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.List<StretchBend>
findIn(Tables t, MMFFMolecule mol)
Helper function that builds a list of StretchBends for a molecule.double
getEnergy(double[] pos)
Calculates the stretch bend energy.void
getGradient(double[] pos, double[] grad)
Calculates the gradient and adds it to the gradients array.static boolean
valid(Tables table, MMFFMolecule mol, int a1, int a2, int a3)
Checks if a Stretch Bend is valid
-
-
-
Field Detail
-
mol
public final MMFFMolecule mol
-
a1
public final int a1
-
a2
public final int a2
-
a3
public final int a3
-
theta0
public final double theta0
-
kba_ijk
public final double kba_ijk
-
kba_kji
public final double kba_kji
-
r0i
public final double r0i
-
r0k
public final double r0k
-
-
Constructor Detail
-
StretchBend
public StretchBend(Tables table, MMFFMolecule mol, int a1, int a2, int a3)
Constructs a new stretch bend object. Note that it only represents the stretch bend energy in the IJK direction. A separate stretch bend object should be created to represent the KJI direction with a1 and a3 swapped.- Parameters:
mol
- The molecule containing the atoms.a1
- Atom 1 (atom i).a2
- Atom 2, the central atom (atom j).a3
- Atom 3 (atom k).
-
-
Method Detail
-
getEnergy
public double getEnergy(double[] pos)
Calculates the stretch bend energy.- Specified by:
getEnergy
in 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:
getGradient
in interfaceEnergyTerm
- Parameters:
pos
- The atoms current positions array.grad
- the atoms current gradients array.
-
valid
public static boolean valid(Tables table, MMFFMolecule mol, int a1, int a2, int a3)
Checks if a Stretch Bend is valid
-
findIn
public static java.util.List<StretchBend> findIn(Tables t, MMFFMolecule mol)
Helper function that builds a list of StretchBends for a molecule.- Parameters:
t
- The tables object.mol
- The molecule to generate angles for.- Returns:
- An array of AngleBends.
-
-