Class ConformationSelfOrganizer


  • public class ConformationSelfOrganizer
    extends java.lang.Object
    • Field Detail

      • KEEP_INITIAL_COORDINATES

        public static boolean KEEP_INITIAL_COORDINATES
      • WRITE_DW_FILE

        public static boolean WRITE_DW_FILE
    • Constructor Detail

      • ConformationSelfOrganizer

        public ConformationSelfOrganizer​(StereoMolecule mol,
                                         boolean keepHydrogen)
        Generates a new ConformationSelfOrganizer from the given molecule. Explicit hydrogens are removed from the molecule, unless the keepHydrogen flag is set.
        One conformer can be generated with the getOneConformer() or getOneConformerInPlace().
        Multiple different conformers can be generated with initializeConformers() and getNextConformer(). In this case conformers are considered different if at least one dihedral angle of a rotatable bond is substantially different. If atoms of the molecule are marked, these are not considered part of the molecule, when the rotatable bonds for the difference check are located.
        Parameters:
        mol -
    • Method Detail

      • getMolecule

        public StereoMolecule getMolecule()
        Returns:
        returns the molecule that was passed to the constructor.
      • setThreadMaster

        public void setThreadMaster​(ThreadMaster tm)
      • generateOneConformerInPlace

        public StereoMolecule generateOneConformerInPlace​(long randomSeed)
        This convenience method returns the StereoMolecule that has been passed to the constructor after modifying its atom coordinates to reflect the conformer internally created by generateOneConformer().
        Returns:
      • generateOneConformer

        public SelfOrganizedConformer generateOneConformer​(long randomSeed)
        Generates the coordinates for one conformer in the calling thread. This is done by trying MAX_CONFORMER_TRIES times to create a random conformer that meets MAX_ATOM_STRAIN and MAX_TOTAL_STRAIN criteria. If one is found it is returned. Otherwise the conformer with the lowest total strain is returned.
        Note: If randomSeed is different from 0, then only one conformer is done produced and returned, no matter whether it meets any strain criteria.
        Parameters:
        randomSeed - 0 or specific seed
      • initializeConformers

        public void initializeConformers​(long randomSeed,
                                         int maxConformers)
        Needs to be called, before getting individual conformers of the same molecule by getNextConformer(). Depending on the flexibility of the molecule, this method creates a small pool of random conformers, of which getNextConformer() always picks that conformer that is an optimum concerning atom strain and diversity to the already picked ones. If the pool is getting low on conformers, then new ones are generated on-the-fly.
        Parameters:
        randomSeed - use a value != 0 for a reproducible random number sequence
        maxConformers - -1 to automatically generate maximum on degrees of freedom
      • getNextConformer

        public SelfOrganizedConformer getNextConformer()
        Picks a new conformer from the conformer pool created by initializeConformers(). Low strain conformers and conformers being most different from already selected ones are selected first. If the pool is getting short on conformers, new conformers are created as long as molecule flexibility allows. If a representative set of low strain molecules have been picked, this method returns null, provided that at least one conformer was returned.
        Returns:
      • optimize

        public boolean optimize​(SelfOrganizedConformer conformer,
                                int cycles,
                                double startFactor,
                                double factorReduction)
      • disableCollidingTorsionRules

        public boolean disableCollidingTorsionRules​(SelfOrganizedConformer conformer)
      • disableTorsionRules

        public void disableTorsionRules()
      • disablePlaneRules

        public boolean disablePlaneRules()
      • enableTorsionRules

        public void enableTorsionRules()