Class AngleBend

  • All Implemented Interfaces:
    EnergyTerm

    public class AngleBend
    extends java.lang.Object
    implements EnergyTerm
    Angle bending energy term class. This energy term represents the angle bending energy associated with three bonded atoms A1--A2--A3 with an angle at A2.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int a1  
      int a2  
      int a3  
      boolean isLinear  
      double ka  
      double theta0  
    • Constructor Summary

      Constructors 
      Constructor Description
      AngleBend​(Tables table, MMFFMolecule mol, int a1, int a2, int a3)
      Construct a new angle bend energy term.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<AngleBend> findIn​(Tables t, MMFFMolecule mol)
      Helper function that builds a list of AngleBends for a molecule.
      double getEnergy​(double[] pos)
      Calculates the angle energy.
      void getGradient​(double[] pos, double[] grad)
      Calculates the gradient and adds it to the gradients array.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • a1

        public final int a1
      • a2

        public final int a2
      • a3

        public final int a3
      • isLinear

        public final boolean isLinear
      • ka

        public final double ka
      • theta0

        public final double theta0
    • Constructor Detail

      • AngleBend

        public AngleBend​(Tables table,
                         MMFFMolecule mol,
                         int a1,
                         int a2,
                         int a3)
        Construct a new angle bend energy term.
        Parameters:
        table - The tables parameter object.
        mol - The molecule.
        a1 - Index of atom 1 in mol.
        a2 - Index of atom 2 (the central atom) in mol.
        a3 - Index of atom 3 in mol.
    • Method Detail

      • getEnergy

        public double getEnergy​(double[] pos)
        Calculates the angle energy.
        Specified by:
        getEnergy in interface EnergyTerm
        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 interface EnergyTerm
        Parameters:
        pos - The atoms current positions array.
        grad - the atoms current gradients array.
      • findIn

        public static java.util.List<AngleBend> findIn​(Tables t,
                                                       MMFFMolecule mol)
        Helper function that builds a list of AngleBends for a molecule.
        Parameters:
        t - The tables object.
        mol - The molecule to generate angles for.
        Returns:
        Am array of AngleBends.