Class ChemStructureExplorer


  • public class ChemStructureExplorer
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static org.openscience.cdk.inchi.InChIGeneratorFactory inchiGenFactory  
      static org.openscience.cdk.smiles.SmilesGenerator smiGen  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void addInChIandKey​(org.openscience.cdk.interfaces.IAtomContainer molecule)  
      static void addPhysicoChemicalProperties​(org.openscience.cdk.interfaces.IAtomContainer molecule)  
      static java.util.LinkedHashMap<java.lang.String,​java.lang.Object> annotateWithProperties​(org.openscience.cdk.interfaces.IAtomContainer atc)  
      static boolean atomContainerInclusionHolds​(org.openscience.cdk.interfaces.IAtomContainerSet molecules, org.openscience.cdk.interfaces.IAtomContainer mol)
      Given a molecule (or AtomContainer) M and an AtomContainerSet S, check whether M is included in the set S.
      static org.openscience.cdk.interfaces.IAtomContainerSet checkConnectivity​(org.openscience.cdk.interfaces.IAtomContainer molecule)
      This functions looks at a molecule and returns each of its components (moieties) as separate molecules.
      static boolean compoundMatchesReactionConstraints​(MetabolicReaction reaction, org.openscience.cdk.interfaces.IAtomContainer molecule)
      Given a molecule A and a MetabolicReaction M, find whether A matches all the structural constraints imposed by M
      static java.util.LinkedHashMap<java.lang.String,​java.lang.String> computePhysicoChemicalProperties​(org.openscience.cdk.interfaces.IAtomContainer molecule)  
      static boolean containsCarbon​(org.openscience.cdk.interfaces.IAtomContainer molecule)  
      static java.util.LinkedHashMap<java.lang.String,​java.lang.Object> createAtomContainerFromSmiles​(java.lang.String smiles, boolean standardize)  
      static java.util.LinkedHashMap<java.lang.String,​java.lang.Object> createAtomContainerFromSmilesWithProperties​(java.lang.String smiles, boolean standardize)  
      static boolean equalityHolds​(org.openscience.cdk.interfaces.IAtomContainer mol1, org.openscience.cdk.interfaces.IAtomContainer mol2)
      WARNING: THIS METHOD SEEMS NOT TO BE SYMMERTRIC.
      org.openscience.cdk.interfaces.IAtomContainer findAllMatchingStructures​(java.lang.String smartsString, org.openscience.cdk.interfaces.IAtomContainer molecule)
      Given a molecule M and a SMARTS expression S, return all the substructures of M that match the expression S
      static java.util.List<java.util.List<java.lang.Integer>> findAllOccurences​(java.lang.String smartsString, org.openscience.cdk.interfaces.IAtomContainer molecule)
      Given a molecule A and a SMARTS expression S, list all occurrences of S in A.
      static java.lang.String generateIsomericSmiles​(org.openscience.cdk.interfaces.IAtomContainer atc)  
      static double getMajorIsotopeMass​(org.openscience.cdk.interfaces.IAtomContainer molecule)  
      static java.lang.String getMolecularFormula​(org.openscience.cdk.interfaces.IAtomContainer molecule)  
      static boolean inchikeyEqualityHolds​(org.openscience.cdk.interfaces.IAtomContainer mol1, org.openscience.cdk.interfaces.IAtomContainer mol2)
      Given two molecules, find out whether they are equal.
      static boolean isAromatic​(org.openscience.cdk.interfaces.IAtomContainer molecule)  
      static boolean isBioTransformerValid​(org.openscience.cdk.interfaces.IAtomContainer molecule)  
      static boolean isBioTransformerValidStrict​(org.openscience.cdk.interfaces.IAtomContainer molecule)  
      static boolean isBtValid​(org.openscience.cdk.interfaces.IAtomContainer molecule)  
      static boolean isCompoundInorganic​(org.openscience.cdk.interfaces.IAtomContainer molecule)  
      static boolean isInvalidPhase2Metabolite​(org.openscience.cdk.interfaces.IAtomContainer mol)  
      static boolean isInvalidPhaseIISubstrateByExlcusion​(org.openscience.cdk.interfaces.IAtomContainer substrate)  
      static boolean isMetabolizablePolyphenolOrDerivative​(org.openscience.cdk.interfaces.IAtomContainer mol)  
      static boolean isMixture​(org.openscience.cdk.interfaces.IAtomContainer molecule)  
      static boolean isPhaseIPolyphenolCandidateOrDerivative​(org.openscience.cdk.interfaces.IAtomContainer molecule)  
      static boolean isPolyphenolOrDerivative​(org.openscience.cdk.interfaces.IAtomContainer molecule)  
      static boolean isPotentialPhaseIISubstrateByReactionPatternMatching​(org.openscience.cdk.interfaces.IAtomContainer substrate)  
      static boolean isPpsCofactor​(java.lang.String inchikey)  
      static boolean isPpsCofactor​(org.openscience.cdk.interfaces.IAtomContainer molecule)  
      static boolean isPpsDeadEndCompound​(java.lang.String inchikey)  
      static boolean isPpsDeadEndCompound​(org.openscience.cdk.interfaces.IAtomContainer molecule)  
      static boolean isPpsValid​(org.openscience.cdk.interfaces.IAtomContainer molecule)  
      static boolean isStandardAminoAcid​(org.openscience.cdk.interfaces.IAtomContainer molecule)  
      static boolean isUnneccessaryMetabolite​(org.openscience.cdk.interfaces.IAtomContainer molecule)  
      static int numberOfAtomWithAtomicNumber​(org.openscience.cdk.interfaces.IAtomContainer molecule, int atomicNumber)  
      static int ringCount​(org.openscience.cdk.interfaces.IAtomContainer atc)  
      static org.openscience.cdk.interfaces.IAtomContainerSet uniquefy​(org.openscience.cdk.interfaces.IAtomContainerSet molecules)
      Given an AtomContainerSet S, return an AtomContainerSet Su with only unique compounds of S
      • Methods inherited from class java.lang.Object

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

      • smiGen

        public static org.openscience.cdk.smiles.SmilesGenerator smiGen
      • inchiGenFactory

        public static org.openscience.cdk.inchi.InChIGeneratorFactory inchiGenFactory
    • Constructor Detail

      • ChemStructureExplorer

        public ChemStructureExplorer()
                              throws org.openscience.cdk.exception.CDKException
        Throws:
        org.openscience.cdk.exception.CDKException
    • Method Detail

      • generateIsomericSmiles

        public static java.lang.String generateIsomericSmiles​(org.openscience.cdk.interfaces.IAtomContainer atc)
      • ringCount

        public static int ringCount​(org.openscience.cdk.interfaces.IAtomContainer atc)
      • createAtomContainerFromSmiles

        public static java.util.LinkedHashMap<java.lang.String,​java.lang.Object> createAtomContainerFromSmiles​(java.lang.String smiles,
                                                                                                                     boolean standardize)
                                                                                                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createAtomContainerFromSmilesWithProperties

        public static java.util.LinkedHashMap<java.lang.String,​java.lang.Object> createAtomContainerFromSmilesWithProperties​(java.lang.String smiles,
                                                                                                                                   boolean standardize)
                                                                                                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • annotateWithProperties

        public static java.util.LinkedHashMap<java.lang.String,​java.lang.Object> annotateWithProperties​(org.openscience.cdk.interfaces.IAtomContainer atc)
                                                                                                       throws org.openscience.cdk.exception.CDKException
        Throws:
        org.openscience.cdk.exception.CDKException
      • isAromatic

        public static boolean isAromatic​(org.openscience.cdk.interfaces.IAtomContainer molecule)
      • findAllOccurences

        public static java.util.List<java.util.List<java.lang.Integer>> findAllOccurences​(java.lang.String smartsString,
                                                                                          org.openscience.cdk.interfaces.IAtomContainer molecule)
                                                                                   throws ambit2.smarts.query.SMARTSException
        Given a molecule A and a SMARTS expression S, list all occurrences of S in A. Each occurrence is represented as an ArrayList of atom indexes.
        Parameters:
        smartsString -
        molecule -
        Returns:
        A list of occurrences of S in A represented as an ArrayList of atom indexes
        Throws:
        ambit2.smarts.query.SMARTSException
      • compoundMatchesReactionConstraints

        public static boolean compoundMatchesReactionConstraints​(MetabolicReaction reaction,
                                                                 org.openscience.cdk.interfaces.IAtomContainer molecule)
                                                          throws ambit2.smarts.query.SMARTSException,
                                                                 org.openscience.cdk.exception.CDKException,
                                                                 java.io.IOException
        Given a molecule A and a MetabolicReaction M, find whether A matches all the structural constraints imposed by M
        Parameters:
        reaction -
        molecule -
        Returns:
        A boolean value that specifies whether or not A matches all the structural constraints imposed by M
        Throws:
        ambit2.smarts.query.SMARTSException
        org.openscience.cdk.exception.CDKException
        java.io.IOException
      • findAllMatchingStructures

        public org.openscience.cdk.interfaces.IAtomContainer findAllMatchingStructures​(java.lang.String smartsString,
                                                                                       org.openscience.cdk.interfaces.IAtomContainer molecule)
                                                                                throws ambit2.smarts.query.SMARTSException
        Given a molecule M and a SMARTS expression S, return all the substructures of M that match the expression S
        Parameters:
        smartsString -
        molecule -
        Returns:
        return all the substructures of M that match the expression S
        Throws:
        ambit2.smarts.query.SMARTSException
      • equalityHolds

        public static boolean equalityHolds​(org.openscience.cdk.interfaces.IAtomContainer mol1,
                                            org.openscience.cdk.interfaces.IAtomContainer mol2)
        WARNING: THIS METHOD SEEMS NOT TO BE SYMMERTRIC. WHICH IS WHY I HAD TO TEST BOTH DIRECTION. MIGHT BE NICE TO CHECK THE INCHIKEY EQUALLITY RATHER
      • inchikeyEqualityHolds

        public static boolean inchikeyEqualityHolds​(org.openscience.cdk.interfaces.IAtomContainer mol1,
                                                    org.openscience.cdk.interfaces.IAtomContainer mol2)
                                             throws java.lang.Exception
        Given two molecules, find out whether they are equal. This function uses InChI strings generated by CDK's InChIGeneratorFactory class as a comparator.
        Parameters:
        mol1 -
        mol2 -
        Returns:
        a boolean value that specifies whether the two molecules are equal.
        Throws:
        java.lang.Exception
      • atomContainerInclusionHolds

        public static boolean atomContainerInclusionHolds​(org.openscience.cdk.interfaces.IAtomContainerSet molecules,
                                                          org.openscience.cdk.interfaces.IAtomContainer mol)
                                                   throws java.lang.Exception
        Given a molecule (or AtomContainer) M and an AtomContainerSet S, check whether M is included in the set S.
        Parameters:
        molecules -
        mol -
        Returns:
        Throws:
        java.lang.Exception
      • uniquefy

        public static org.openscience.cdk.interfaces.IAtomContainerSet uniquefy​(org.openscience.cdk.interfaces.IAtomContainerSet molecules)
                                                                         throws java.lang.Exception
        Given an AtomContainerSet S, return an AtomContainerSet Su with only unique compounds of S
        Parameters:
        molecules -
        Returns:
        A subset of the input AtomContainerSet S with only unique compounds
        Throws:
        java.lang.Exception
      • checkConnectivity

        public static org.openscience.cdk.interfaces.IAtomContainerSet checkConnectivity​(org.openscience.cdk.interfaces.IAtomContainer molecule)
                                                                                  throws org.openscience.cdk.exception.CDKException
        This functions looks at a molecule and returns each of its components (moieties) as separate molecules.
        Parameters:
        molecule - : A molecule of interest
        Returns:
        A set of molecules
        Throws:
        org.openscience.cdk.exception.CDKException
      • containsCarbon

        public static boolean containsCarbon​(org.openscience.cdk.interfaces.IAtomContainer molecule)
      • isPolyphenolOrDerivative

        public static boolean isPolyphenolOrDerivative​(org.openscience.cdk.interfaces.IAtomContainer molecule)
                                                throws ambit2.smarts.query.SMARTSException,
                                                       org.openscience.cdk.exception.CDKException,
                                                       java.lang.CloneNotSupportedException
        Throws:
        ambit2.smarts.query.SMARTSException
        org.openscience.cdk.exception.CDKException
        java.lang.CloneNotSupportedException
      • isMetabolizablePolyphenolOrDerivative

        public static boolean isMetabolizablePolyphenolOrDerivative​(org.openscience.cdk.interfaces.IAtomContainer mol)
                                                             throws ambit2.smarts.query.SMARTSException,
                                                                    org.openscience.cdk.exception.CDKException,
                                                                    java.lang.CloneNotSupportedException
        Throws:
        ambit2.smarts.query.SMARTSException
        org.openscience.cdk.exception.CDKException
        java.lang.CloneNotSupportedException
      • isPotentialPhaseIISubstrateByReactionPatternMatching

        public static boolean isPotentialPhaseIISubstrateByReactionPatternMatching​(org.openscience.cdk.interfaces.IAtomContainer substrate)
                                                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • isInvalidPhaseIISubstrateByExlcusion

        public static boolean isInvalidPhaseIISubstrateByExlcusion​(org.openscience.cdk.interfaces.IAtomContainer substrate)
                                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • isInvalidPhase2Metabolite

        public static boolean isInvalidPhase2Metabolite​(org.openscience.cdk.interfaces.IAtomContainer mol)
                                                 throws ambit2.smarts.query.SMARTSException,
                                                        org.openscience.cdk.exception.CDKException,
                                                        java.lang.CloneNotSupportedException
        Throws:
        ambit2.smarts.query.SMARTSException
        org.openscience.cdk.exception.CDKException
        java.lang.CloneNotSupportedException
      • isPhaseIPolyphenolCandidateOrDerivative

        public static boolean isPhaseIPolyphenolCandidateOrDerivative​(org.openscience.cdk.interfaces.IAtomContainer molecule)
                                                               throws ambit2.smarts.query.SMARTSException,
                                                                      org.openscience.cdk.exception.CDKException,
                                                                      java.lang.CloneNotSupportedException
        Throws:
        ambit2.smarts.query.SMARTSException
        org.openscience.cdk.exception.CDKException
        java.lang.CloneNotSupportedException
      • isMixture

        public static boolean isMixture​(org.openscience.cdk.interfaces.IAtomContainer molecule)
                                 throws org.openscience.cdk.exception.CDKException
        Throws:
        org.openscience.cdk.exception.CDKException
      • isPpsValid

        public static boolean isPpsValid​(org.openscience.cdk.interfaces.IAtomContainer molecule)
                                  throws org.openscience.cdk.exception.CDKException
        Throws:
        org.openscience.cdk.exception.CDKException
      • isBtValid

        public static boolean isBtValid​(org.openscience.cdk.interfaces.IAtomContainer molecule)
                                 throws org.openscience.cdk.exception.CDKException
        Throws:
        org.openscience.cdk.exception.CDKException
      • numberOfAtomWithAtomicNumber

        public static int numberOfAtomWithAtomicNumber​(org.openscience.cdk.interfaces.IAtomContainer molecule,
                                                       int atomicNumber)
        Parameters:
        molecule -
        atomicNumber -
        Returns:
        the number of atoms with the given atomic number
      • isPpsCofactor

        public static boolean isPpsCofactor​(java.lang.String inchikey)
      • isPpsCofactor

        public static boolean isPpsCofactor​(org.openscience.cdk.interfaces.IAtomContainer molecule)
                                     throws org.openscience.cdk.exception.CDKException
        Throws:
        org.openscience.cdk.exception.CDKException
      • isPpsDeadEndCompound

        public static boolean isPpsDeadEndCompound​(java.lang.String inchikey)
      • isPpsDeadEndCompound

        public static boolean isPpsDeadEndCompound​(org.openscience.cdk.interfaces.IAtomContainer molecule)
                                            throws org.openscience.cdk.exception.CDKException
        Throws:
        org.openscience.cdk.exception.CDKException
      • isBioTransformerValidStrict

        public static boolean isBioTransformerValidStrict​(org.openscience.cdk.interfaces.IAtomContainer molecule)
                                                   throws org.openscience.cdk.exception.CDKException
        Throws:
        org.openscience.cdk.exception.CDKException
      • isBioTransformerValid

        public static boolean isBioTransformerValid​(org.openscience.cdk.interfaces.IAtomContainer molecule)
                                             throws org.openscience.cdk.exception.CDKException
        Throws:
        org.openscience.cdk.exception.CDKException
      • addInChIandKey

        public static void addInChIandKey​(org.openscience.cdk.interfaces.IAtomContainer molecule)
                                   throws org.openscience.cdk.exception.CDKException
        Throws:
        org.openscience.cdk.exception.CDKException
      • getMajorIsotopeMass

        public static double getMajorIsotopeMass​(org.openscience.cdk.interfaces.IAtomContainer molecule)
      • getMolecularFormula

        public static java.lang.String getMolecularFormula​(org.openscience.cdk.interfaces.IAtomContainer molecule)
      • computePhysicoChemicalProperties

        public static java.util.LinkedHashMap<java.lang.String,​java.lang.String> computePhysicoChemicalProperties​(org.openscience.cdk.interfaces.IAtomContainer molecule)
                                                                                                                 throws org.openscience.cdk.exception.CDKException
        Throws:
        org.openscience.cdk.exception.CDKException
      • addPhysicoChemicalProperties

        public static void addPhysicoChemicalProperties​(org.openscience.cdk.interfaces.IAtomContainer molecule)
                                                 throws org.openscience.cdk.exception.CDKException
        Throws:
        org.openscience.cdk.exception.CDKException
      • isCompoundInorganic

        public static boolean isCompoundInorganic​(org.openscience.cdk.interfaces.IAtomContainer molecule)
      • isUnneccessaryMetabolite

        public static boolean isUnneccessaryMetabolite​(org.openscience.cdk.interfaces.IAtomContainer molecule)
                                                throws ambit2.smarts.query.SMARTSException
        Throws:
        ambit2.smarts.query.SMARTSException
      • isStandardAminoAcid

        public static boolean isStandardAminoAcid​(org.openscience.cdk.interfaces.IAtomContainer molecule)
                                           throws org.openscience.cdk.exception.CDKException
        Throws:
        org.openscience.cdk.exception.CDKException