Class RotatableBond


  • public class RotatableBond
    extends java.lang.Object
    A RotatableBond knows the two rigid fragments within a molecule that are connected by this bond. It also knows about possible torsion states with associated likelyhoods, which are taken from COD statistics and modified to account for collisions due to bulky groups in the molecule. It knows the smaller half of the molecule and rotate the smaller half to a given torsion angle.
    • Constructor Summary

      Constructors 
      Constructor Description
      RotatableBond​(StereoMolecule mol, int bond, int[] fragmentNo, int[] disconnectedFragmentNo, int disconnectedFragmentSize, RigidFragment[] fragment, java.util.Random random)  
      RotatableBond​(StereoMolecule mol, int bond, int[] fragmentNo, int[] disconnectedFragmentNo, int disconnectedFragmentSize, RigidFragment[] fragment, java.util.Random random, boolean use60degreeSteps)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void connectFragments​(Conformer conformer, boolean[] isAttached, int[] fragmentPermutation)
      Checks both rigid fragments that are connected by this bond, whether they have been attached to the conformer yet, i.e.
      int getBond()  
      RigidFragment getFragment​(int i)  
      int getFragmentNo​(int i)  
      int getLikelyRandomTorsionIndex​(double random, double progress)
      Calculates a random torsion index giving torsions with higher likelyhoods (i.e.
      float getRelevance()
      The relevance of a rotatable bond and its torsion angle for creating substantially different conformers depends on how close the bond is to the center of the molecule.
      int getSmallerSideAtomCount()  
      short getTorsion​(int t)  
      int getTorsionCount()  
      double getTorsionLikelyhood​(int t)  
      void rotateTo​(Conformer conformer, short torsion)
      Rotate the smaller side of the molecule around this bond to reach the defined torsion angle.
      void rotateToIndex​(Conformer conformer, int torsionIndex)
      Rotate the smaller side of the molecule around this bond to reach the torsion angle defined by torsionIndex.
      • Methods inherited from class java.lang.Object

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

      • RotatableBond

        public RotatableBond​(StereoMolecule mol,
                             int bond,
                             int[] fragmentNo,
                             int[] disconnectedFragmentNo,
                             int disconnectedFragmentSize,
                             RigidFragment[] fragment,
                             java.util.Random random)
      • RotatableBond

        public RotatableBond​(StereoMolecule mol,
                             int bond,
                             int[] fragmentNo,
                             int[] disconnectedFragmentNo,
                             int disconnectedFragmentSize,
                             RigidFragment[] fragment,
                             java.util.Random random,
                             boolean use60degreeSteps)
    • Method Detail

      • getFragmentNo

        public int getFragmentNo​(int i)
      • getBond

        public int getBond()
        Returns:
        bond index in molecule
      • getTorsionCount

        public int getTorsionCount()
      • getLikelyRandomTorsionIndex

        public int getLikelyRandomTorsionIndex​(double random,
                                               double progress)
        Calculates a random torsion index giving torsions with higher likelyhoods (i.e. frequencies and collision strains) a higher chance to be selected. With a progress value of 0.0 selection likelyhoods are proportional to the torsion frequencies. With increasing progress value the higher frequent torsions are less and less preferred until 1.0 without any preference.
        Parameters:
        random -
        progress - 0...1
      • getTorsion

        public short getTorsion​(int t)
        Returns:
        the i'th torsion angle in degrees
      • getTorsionLikelyhood

        public double getTorsionLikelyhood​(int t)
        Returns:
        the likelyhood of torsion i among all torsions of this bond
      • getSmallerSideAtomCount

        public int getSmallerSideAtomCount()
        Returns:
        count of atoms of the smaller half of the molecule excluding anchor atom
      • getRelevance

        public float getRelevance()
        The relevance of a rotatable bond and its torsion angle for creating substantially different conformers depends on how close the bond is to the center of the molecule. Bond relevance values range from 1.0/atomCount (e.g. bond to methyl group) to 1.0 (bond dividing molecule into two equally large parts).
        Returns:
        relevance of this bond in the molecule to contribute to conformation change
      • connectFragments

        public void connectFragments​(Conformer conformer,
                                     boolean[] isAttached,
                                     int[] fragmentPermutation)
        Checks both rigid fragments that are connected by this bond, whether they have been attached to the conformer yet, i.e. whether their local coordinates have been copied to conformer and transformed according to the connecting torsion. If one was already attached, then the other's coordinates are transformed according to the torsion and copied to the conformer. A likelihood is calculated for every torsion value based on its frequency and the collision strain of the two fragments' atoms. If both fragments were not attached yet, then the larger one's coordinates are copied and the smaller one's coordinates are translated and then copied. Unlikely torsions, i.e. where collisions strain outweighs frequency, are removed from torsion list.
      • rotateToIndex

        public void rotateToIndex​(Conformer conformer,
                                  int torsionIndex)
        Rotate the smaller side of the molecule around this bond to reach the torsion angle defined by torsionIndex.
        Parameters:
        conformer -
        torsionIndex -
      • rotateTo

        public void rotateTo​(Conformer conformer,
                             short torsion)
        Rotate the smaller side of the molecule around this bond to reach the defined torsion angle.
        Parameters:
        conformer -
        torsion - in degrees (0 ... 359)