Class StrucFPConfig


  • @PublicAPI
    public final class StrucFPConfig
    extends Object
    Utility class for assembling and parsing structural FP configurations.
    Since:
    JChem 3.1
    • Constructor Detail

      • StrucFPConfig

        public StrucFPConfig()
    • Method Detail

      • getMolecules

        public List<Molecule> getMolecules()
        Gets the Molecule objects for the keys
        Returns:
        an ArrayList containing Molecule objects
      • getMolStrings

        public List<String> getMolStrings()
        Gets the original strings for the keys
        Returns:
        an ArrayList containing String objects
      • getSmartsMode

        public boolean getSmartsMode()
        Indicates if molecule strings should be interpreted as SMARTS.
        Returns:
        true, if strings should be interpreted as SMARTS.
      • parseConfig

        public void parseConfig​(String config)
                         throws MolFormatException
        Parses a text configuration, and sets internal values accordingly.
        Parameters:
        config - the configuration
        Throws:
        MolFormatException - if the importer encounters a problem
      • getConfig

        public String getConfig()
        Creates a configuration string according to the internal values.
        Returns:
        the configuration string.
      • readMolecules

        public void readMolecules​(InputStream input,
                                  boolean smartsMode)
                           throws IOException
        Read the structures from a stream.
        Parameters:
        input - the input stream
        smartsMode - indicates if the molecule strings should be interpreted as SMARTS.
        Throws:
        IOException - if the inputstream encounters a problem
      • getNumberOfKeys

        public int getNumberOfKeys()
        Indicates the number of structural keys.
        Returns:
        the number of structural keys
        Since:
        JChem 5.0
      • getNumberOfIntegersNeeded

        public int getNumberOfIntegersNeeded()
        Indicates the number of 32 bit units needed to store the fingerprint.
        Returns:
        the number of ints needed to accomodate all keys.
        Since:
        JChem 5.0