Class PMapper

java.lang.Object
chemaxon.descriptors.pharmacophore.PMapper
All Implemented Interfaces:
Licensable

@PublicApi public class PMapper extends Object implements Licensable
Class for searching for pharmacophore properties in a molecule.

An example for running PharmacophoreMapper:


 String pmConfigFileName; // path to the pharmacophore XML config file
 String stConfigFileName; // path to the molecule standardization config file
 ...
 Standardizer st = new Standardizer(new File(stConfigFileName));
 PMapper pm = new PMapper(new File(pmConfigFileName), st);
 PSymbols symbols = pm.getSymbols();
 ...
 while ( ...  there are more molecules ... ) {
     // getting the next molecule from file or database
     Molecule target = ... ;
     // get the feature ID -> atom index BitSet HashMap
     PMap pmap = pm.createFeatureMap(target);
     // get the feature symbol string
     String result = pmap.toString(symbols);
     System.out.println(result);
 }
 
Since:
JChem 2.0
  • Field Details

    • DEFAULT_TAG_NAME

      public static final String DEFAULT_TAG_NAME
      Default SDFile tag to store the Pharmacophore Map.
      See Also:
  • Constructor Details

    • PMapper

      public PMapper(File config) throws IOException, ParseException
      Constructor. Sets the pharmacophore configuration.
      Parameters:
      config - is the XML config file
      Throws:
      IOException - on IO error in molecule input
      ParseException - on DOM parse error or configuration error
    • PMapper

      public PMapper(File config, Standardizer standardizer) throws IOException, ParseException
      Constructor. Sets the pharmacophore configuration and the standardizer object used to standardize the molecules before pharmacophore property search.
      Parameters:
      config - is the XML config file
      standardizer - is the Standardizer object (may be null)
      Throws:
      IOException - on IO error in molecule input
      ParseException - on DOM parse error or configuration error
      IllegalArgumentException - on standardizer configuration error
    • PMapper

      public PMapper(String config) throws IOException, ParseException
      Constructor. Sets the pharmacophore configuration.
      Parameters:
      config - is the XML config string
      Throws:
      IOException - on IO error in molecule input
      ParseException - on DOM parse error or configuration error
      IllegalArgumentException - on standardizer configuration error
    • PMapper

      public PMapper(String config, Standardizer standardizer) throws IOException, ParseException
      Constructor. Sets the pharmacophore configuration and the standardizer object used to standardize the molecules before pharmacophore property search.
      Parameters:
      config - is the XML config string
      standardizer - is the Standardizer object (may be null)
      Throws:
      IOException - on IO error in molecule input
      ParseException - on DOM parse error or configuration error
      IllegalArgumentException - on standardizer configuration error
    • PMapper

      public PMapper(org.dom4j.Element config, String dir) throws IOException, ParseException
      Constructor. Sets the pharmacophore configuration.
      Parameters:
      config - is the XML config root node
      dir - is the root directory
      Throws:
      IOException - on IO error in molecule input
      ParseException - on DOM parse error or configuration error
    • PMapper

      public PMapper(org.dom4j.Element config) throws IOException, ParseException
      Constructor. Sets the pharmacophore configuration.
      Parameters:
      config - is the XML config root node
      Throws:
      IOException - on IO error in molecule input
      ParseException - on DOM parse error or configuration error
    • PMapper

      public PMapper(org.dom4j.Element config, Standardizer standardizer, String dir) throws IOException, ParseException
      Constructor. Sets the pharmacophore configuration and the standardizer object used to standardize the molecules before pharmacophore property search.
      Parameters:
      config - is the XML config root node
      standardizer - is the Standardizer object (may be null)
      dir - is the root directory
      Throws:
      IOException - on IO error in molecule input
      ParseException - on DOM parse error or configuration error
    • PMapper

      public PMapper(org.dom4j.Element config, Standardizer standardizer) throws IOException, ParseException
      Constructor. Sets the pharmacophore configuration and the standardizer object used to standardize the molecules before pharmacophore property search.
      Parameters:
      config - is the XML config root node
      standardizer - is the Standardizer object (may be null)
      Throws:
      IOException - on IO error in molecule input
      ParseException - on DOM parse error or configuration error
    • PMapper

      public PMapper(org.dom4j.Element config, org.dom4j.Element stconfig, String dir) throws IOException, ParseException
      Constructor. Sets the pharmacophore configuration and the standardizer object used to standardize the molecules before pharmacophore property search.
      Parameters:
      config - is the XML config root node
      stconfig - is the standardizer config root node
      dir - is the root directory
      Throws:
      IOException - on IO error in molecule input
      ParseException - on DOM parse error or configuration error
      IllegalArgumentException - if the standardizer object creation fails
    • PMapper

      public PMapper(org.dom4j.Element config, org.dom4j.Element stconfig) throws IOException, ParseException
      Constructor. Sets the pharmacophore configuration and the standardizer object used to standardize the molecules before pharmacophore property search.
      Parameters:
      config - is the XML config root node
      stconfig - is the standardizer config root node
      Throws:
      IOException - on IO error in molecule input
      ParseException - on DOM parse error or configuration error
      IllegalArgumentException - if the standardizer object creation fails
  • Method Details

    • isStandardizerSpecified

      public boolean isStandardizerSpecified()
      Check if standardization is specified.
      Returns:
      true when a standardization is specified
    • setVerbose

      public void setVerbose(boolean verbose)
      Sets verbose output.
      Parameters:
      verbose - is true if verbose output
    • getMolConstant

      public Molecule getMolConstant(String id)
      Returns the molecule constant corresponding to the given ID.
      Parameters:
      id - is the molecule ID
      Returns:
      the molecule constant with the given ID or null if no such molecule
    • getSymbols

      public PSymbols getSymbols()
      Returns the symbol storing object.
      Returns:
      the symbol storing object
    • getID

      public String getID(String symbol)
      Returns the ID corresponding to the given symbol.
      Parameters:
      symbol - is the feature symbol
      Returns:
      the ID corresponding to the given symbol
    • createFeatureMap

      public PMap createFeatureMap(Molecule target) throws SearchException, ParseException, LicenseException
      Creates the feature ID -> atom index BitSet HashMap for the given target molecule. The i-th bit in the BitSet is 1 if the i-th atom has the feature, 0 otherwise.
      Parameters:
      target - is the target molecule
      Returns:
      the feature ID -> atom index BitSet HashMap
      Throws:
      SearchException - if the standardization fails
      ParseException - if the feature expression cannot be evaluated
      LicenseException - if no license found
    • setLicenseEnvironment

      public void setLicenseEnvironment(String env)
      Description copied from interface: Licensable
      Sets the current license environment identifier. For internal use only!
      Specified by:
      setLicenseEnvironment in interface Licensable
      Parameters:
      env - license environment. It is string identifier of a certain integration environment.
    • isLicensed

      public boolean isLicensed()
      Description copied from interface: Licensable
      Checks if the required license is available for using this class or product.
      Specified by:
      isLicensed in interface Licensable
      Returns:
      true if this software component is correctly licensed