Package chemaxon.pharmacophore
Class PMapper
java.lang.Object
chemaxon.pharmacophore.PMapper
- All Implemented Interfaces:
chemaxon.license.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 Summary
Modifier and TypeFieldDescriptionstatic final String
Default SDFile tag to store the Pharmacophore Map. -
Constructor Summary
ConstructorDescriptionConstructor.PMapper
(File config, Standardizer standardizer) Constructor.Constructor.PMapper
(String config, Standardizer standardizer) Constructor.PMapper
(org.dom4j.Element config) Constructor.PMapper
(org.dom4j.Element config, Standardizer standardizer) Constructor.PMapper
(org.dom4j.Element config, Standardizer standardizer, String dir) Constructor.Constructor.PMapper
(org.dom4j.Element config, org.dom4j.Element stconfig) Constructor.Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncreateFeatureMap
(Molecule target) Creates the feature ID -> atom index BitSet HashMap for the given target molecule.Returns the ID corresponding to the given symbol.getMolConstant
(String id) Returns the molecule constant corresponding to the given ID.Returns the symbol storing object.boolean
static void
Deprecated, for removal: This API element is subject to removal in a future version.This main method will be removed, CLI interfaces should not be used directly from Java code.void
void
setVerbose
(boolean verbose) Sets verbose output.
-
Field Details
-
DEFAULT_TAG_NAME
Default SDFile tag to store the Pharmacophore Map.- See Also:
-
-
Constructor Details
-
PMapper
Constructor. Sets the pharmacophore configuration.- Parameters:
config
- is the XML config file- Throws:
IOException
- on IO error in molecule inputchemaxon.nfunk.jep.ParseException
- on DOM parse error or configuration error
-
PMapper
public PMapper(File config, Standardizer standardizer) throws IOException, chemaxon.nfunk.jep.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 filestandardizer
- is the Standardizer object (may be null)- Throws:
IOException
- on IO error in molecule inputchemaxon.nfunk.jep.ParseException
- on DOM parse error or configuration errorIllegalArgumentException
- on standardizer configuration error
-
PMapper
Constructor. Sets the pharmacophore configuration.- Parameters:
config
- is the XML config string- Throws:
IOException
- on IO error in molecule inputchemaxon.nfunk.jep.ParseException
- on DOM parse error or configuration errorIllegalArgumentException
- on standardizer configuration error
-
PMapper
public PMapper(String config, Standardizer standardizer) throws IOException, chemaxon.nfunk.jep.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 stringstandardizer
- is the Standardizer object (may be null)- Throws:
IOException
- on IO error in molecule inputchemaxon.nfunk.jep.ParseException
- on DOM parse error or configuration errorIllegalArgumentException
- on standardizer configuration error
-
PMapper
public PMapper(org.dom4j.Element config, String dir) throws IOException, chemaxon.nfunk.jep.ParseException Constructor. Sets the pharmacophore configuration.- Parameters:
config
- is the XML config root nodedir
- is the root directory- Throws:
IOException
- on IO error in molecule inputchemaxon.nfunk.jep.ParseException
- on DOM parse error or configuration error
-
PMapper
Constructor. Sets the pharmacophore configuration.- Parameters:
config
- is the XML config root node- Throws:
IOException
- on IO error in molecule inputchemaxon.nfunk.jep.ParseException
- on DOM parse error or configuration error
-
PMapper
public PMapper(org.dom4j.Element config, Standardizer standardizer, String dir) throws IOException, chemaxon.nfunk.jep.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 nodestandardizer
- is the Standardizer object (may be null)dir
- is the root directory- Throws:
IOException
- on IO error in molecule inputchemaxon.nfunk.jep.ParseException
- on DOM parse error or configuration error
-
PMapper
public PMapper(org.dom4j.Element config, Standardizer standardizer) throws IOException, chemaxon.nfunk.jep.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 nodestandardizer
- is the Standardizer object (may be null)- Throws:
IOException
- on IO error in molecule inputchemaxon.nfunk.jep.ParseException
- on DOM parse error or configuration error
-
PMapper
public PMapper(org.dom4j.Element config, org.dom4j.Element stconfig, String dir) throws IOException, chemaxon.nfunk.jep.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 nodestconfig
- is the standardizer config root nodedir
- is the root directory- Throws:
IOException
- on IO error in molecule inputchemaxon.nfunk.jep.ParseException
- on DOM parse error or configuration errorIllegalArgumentException
- if the standardizer object creation fails
-
PMapper
public PMapper(org.dom4j.Element config, org.dom4j.Element stconfig) throws IOException, chemaxon.nfunk.jep.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 nodestconfig
- is the standardizer config root node- Throws:
IOException
- on IO error in molecule inputchemaxon.nfunk.jep.ParseException
- on DOM parse error or configuration errorIllegalArgumentException
- if the standardizer object creation fails
-
-
Method Details
-
setVerbose
public void setVerbose(boolean verbose) Sets verbose output.- Parameters:
verbose
- is true if verbose output
-
getMolConstant
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
Returns the symbol storing object.- Returns:
- the symbol storing object
-
getID
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, chemaxon.nfunk.jep.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 failschemaxon.nfunk.jep.ParseException
- if the feature expression cannot be evaluatedLicenseException
- if no license found
-
setLicenseEnvironment
- Specified by:
setLicenseEnvironment
in interfacechemaxon.license.Licensable
-
isLicensed
public boolean isLicensed()- Specified by:
isLicensed
in interfacechemaxon.license.Licensable
-
main
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JAN_01_2025) public static void main(String[] args) throws Exception Deprecated, for removal: This API element is subject to removal in a future version.This main method will be removed, CLI interfaces should not be used directly from Java code.The command line version entry point. Parameter parsing, initialization then start.- Parameters:
args
- the command line parameters- Throws:
Exception
-