Class ChemStructureFingerprinter


  • public class ChemStructureFingerprinter
    extends java.lang.Object
    • Constructor Detail

      • ChemStructureFingerprinter

        public ChemStructureFingerprinter()
    • Method Detail

      • getMatchingAtoms

        public java.util.List<java.util.List<java.lang.Integer>> getMatchingAtoms​(org.openscience.cdk.interfaces.IAtomContainer molecule,
                                                                                  org.openscience.cdk.smiles.smarts.SMARTSQueryTool smartsPattern)
                                                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getMiniFingerprintPatterns

        public static java.util.LinkedHashMap<java.lang.String,​java.lang.String> getMiniFingerprintPatterns()
      • getFingerprintPatterns

        public static java.util.LinkedHashMap<java.lang.String,​java.lang.String> getFingerprintPatterns()
                                                                                                       throws java.lang.Exception
        Returns:
        : A HashMap with the SMARTS expressions for functional groups and structural patterns
        Throws:
        java.lang.Exception
      • getRINFingerprintPatterns

        public static java.util.LinkedHashMap<java.lang.String,​java.lang.String> getRINFingerprintPatterns()
                                                                                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getRINAtomFingerprintPatterns

        public static java.util.LinkedHashMap<java.lang.String,​java.lang.String> getRINAtomFingerprintPatterns()
                                                                                                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getTestFingerprintPatterns

        public static java.util.LinkedHashMap<java.lang.String,​java.lang.String> getTestFingerprintPatterns()
                                                                                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getPhaseIIfingerpint

        public static java.util.LinkedHashMap<java.lang.String,​java.lang.String> getPhaseIIfingerpint()
      • generateClassyfireAtomFingeprint

        public java.util.ArrayList<java.util.ArrayList<java.lang.Integer>> generateClassyfireAtomFingeprint​(org.openscience.cdk.interfaces.IAtomContainer mole,
                                                                                                            java.util.LinkedHashMap<java.lang.String,​java.lang.String> queries)
                                                                                                     throws java.lang.Exception
        Parameters:
        mole - : A molecule of interest
        queries - : A HashMap with the functional groups and patterns to detect, with their SMARTS patterns
        Returns:
        : A list containing atom-based list of the bits (1 or 0) that describe for every functional group/pattern, whether the atom of interest is part of a match.
        Throws:
        java.lang.Exception
      • generateClassyfireFingerprint

        public java.util.ArrayList[] generateClassyfireFingerprint​(org.openscience.cdk.interfaces.IAtomContainer molecule)
                                                            throws java.lang.Exception
        This function generates a unique fingerprint for a molecule.
        Parameters:
        molecule - : The molecule of interest
        Returns:
        : An array list with the fingerprint of the molecule
        Throws:
        java.lang.Exception
      • generateClassyfireFingerprintAsDouble

        public SFingerprint generateClassyfireFingerprintAsDouble​(org.openscience.cdk.interfaces.IAtomContainer molecule,
                                                                  java.util.LinkedHashMap<java.lang.String,​java.lang.String> queries)
                                                           throws java.lang.Exception
        This function generates a unique fingerprint for a molecule.
        Parameters:
        molecule - : The molecule of interest
        queries - : The dictionary of structural patterns forming the fingerprint
        Returns:
        : An SFingerprint representation of the molecule
        Throws:
        java.lang.Exception
      • generateClassyfireRinFingerprintAsDouble

        public SFingerprint generateClassyfireRinFingerprintAsDouble​(org.openscience.cdk.interfaces.IAtomContainer molecule)
                                                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • generateClassyfireCountFingerprintAsDouble

        public SFingerprint generateClassyfireCountFingerprintAsDouble​(org.openscience.cdk.interfaces.IAtomContainer molecule,
                                                                       java.util.LinkedHashMap<java.lang.String,​java.lang.String> queries)
                                                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • generateBTRailsCountFingerprint

        public static java.util.LinkedHashMap<java.lang.String,​java.lang.Integer> generateBTRailsCountFingerprint​(org.openscience.cdk.interfaces.IAtomContainer molecule)
                                                                                                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • serial_fingerprinter_sdf

        public void serial_fingerprinter_sdf​(java.io.File sdfInput)
                                      throws java.lang.Exception
        Parameters:
        sdfInput - : A SDF file
        Throws:
        java.lang.Exception - : Throws an Exception
      • serialAtomfingerprinterToSdf

        public void serialAtomfingerprinterToSdf​(java.io.File sdfInput,
                                                 java.util.LinkedHashMap<java.lang.String,​java.lang.String> queries)
                                          throws java.lang.Exception
        This function creates a tsv file with the atom fingerprints
        Parameters:
        sdfInput - : a SDF file
        queries - : a HashMap with fingerprint patterns and their SMARTS expressions
        Throws:
        java.lang.Exception - : Throws an Exception
      • geterateSerialAtomfingerprintToArraylist

        public java.util.ArrayList<java.util.ArrayList<java.util.ArrayList<java.lang.Integer>>> geterateSerialAtomfingerprintToArraylist​(java.io.File sdfInput,
                                                                                                                                         java.util.LinkedHashMap<java.lang.String,​java.lang.String> queries)
                                                                                                                                  throws java.lang.Exception
        Parameters:
        sdfInput - : a SDF file
        queries - : a HashMap with fingerprint patterns and their SMARTS expressions
        Returns:
        An array list of fingerprints for every atom of each molecule in the SDF file
        Throws:
        java.lang.Exception - : Throws an Exception
      • saveSerialAtomFingerprinterToCSV

        public java.lang.String saveSerialAtomFingerprinterToCSV​(java.io.File sdfInput,
                                                                 java.util.LinkedHashMap<java.lang.String,​java.lang.String> queries)
                                                          throws java.lang.Exception
        Parameters:
        sdfInput - : a SDF file
        queries - : a HashMap with fingerprint patterns and their SMARTS expressions
        Returns:
        : A string with the atom-based fingerprints of every molecule. A .csv file is also saved.
        Throws:
        java.lang.Exception - : Throws an Exception
      • getDEREP_NPFingerprintPatterns

        public static java.util.LinkedHashMap<java.lang.String,​java.lang.String> getDEREP_NPFingerprintPatterns()
                                                                                                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • generateDEREP_NPFingerprint

        public java.util.LinkedHashMap<java.lang.String,​java.lang.Integer> generateDEREP_NPFingerprint​(org.openscience.cdk.interfaces.IAtomContainer atc,
                                                                                                             boolean preprocess)
                                                                                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • generateDEREP_NPFingerprint

        public void generateDEREP_NPFingerprint​(java.lang.String tsvStructureFileName)
                                         throws java.lang.Exception
        Throws:
        java.lang.Exception