@PublicAPI public class PMapper extends java.lang.Object implements chemaxon.license.Licensable
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); }
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_TAG_NAME
Default SDFile tag to store the Pharmacophore Map.
|
Constructor and Description |
---|
PMapper(org.dom4j.Element config)
Constructor.
|
PMapper(org.dom4j.Element config,
org.dom4j.Element stconfig)
Constructor.
|
PMapper(org.dom4j.Element config,
org.dom4j.Element stconfig,
java.lang.String dir)
Constructor.
|
PMapper(org.dom4j.Element config,
Standardizer standardizer)
Constructor.
|
PMapper(org.dom4j.Element config,
Standardizer standardizer,
java.lang.String dir)
Constructor.
|
PMapper(org.dom4j.Element config,
java.lang.String dir)
Constructor.
|
PMapper(java.io.File config)
Constructor.
|
PMapper(java.io.File config,
Standardizer standardizer)
Constructor.
|
PMapper(java.lang.String config)
Constructor.
|
PMapper(java.lang.String config,
Standardizer standardizer)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
PMap |
createFeatureMap(Molecule target)
Creates the feature ID -> atom index BitSet HashMap
for the given target molecule.
|
java.lang.String |
getID(java.lang.String symbol)
Returns the ID corresponding to the given symbol.
|
Molecule |
getMolConstant(java.lang.String id)
Returns the molecule constant corresponding to the given ID.
|
PSymbols |
getSymbols()
Returns the symbol storing object.
|
boolean |
isLicensed() |
static void |
main(java.lang.String[] args)
The command line version entry point.
|
void |
setLicenseEnvironment(java.lang.String env) |
void |
setVerbose(boolean verbose)
Sets verbose output.
|
public static final java.lang.String DEFAULT_TAG_NAME
public PMapper(java.io.File config) throws java.io.IOException, chemaxon.nfunk.jep.ParseException
config
- is the XML config filejava.io.IOException
- on IO error in molecule inputchemaxon.nfunk.jep.ParseException
- on DOM parse error or configuration errorpublic PMapper(java.io.File config, Standardizer standardizer) throws java.io.IOException, chemaxon.nfunk.jep.ParseException
config
- is the XML config filestandardizer
- is the Standardizer object (may be null)java.io.IOException
- on IO error in molecule inputchemaxon.nfunk.jep.ParseException
- on DOM parse error or configuration errorjava.lang.IllegalArgumentException
- on standardizer configuration errorpublic PMapper(java.lang.String config) throws java.io.IOException, chemaxon.nfunk.jep.ParseException
config
- is the XML config stringjava.io.IOException
- on IO error in molecule inputchemaxon.nfunk.jep.ParseException
- on DOM parse error or configuration errorjava.lang.IllegalArgumentException
- on standardizer configuration errorpublic PMapper(java.lang.String config, Standardizer standardizer) throws java.io.IOException, chemaxon.nfunk.jep.ParseException
config
- is the XML config stringstandardizer
- is the Standardizer object (may be null)java.io.IOException
- on IO error in molecule inputchemaxon.nfunk.jep.ParseException
- on DOM parse error or configuration errorjava.lang.IllegalArgumentException
- on standardizer configuration errorpublic PMapper(org.dom4j.Element config, java.lang.String dir) throws java.io.IOException, chemaxon.nfunk.jep.ParseException
config
- is the XML config root nodedir
- is the root directoryjava.io.IOException
- on IO error in molecule inputchemaxon.nfunk.jep.ParseException
- on DOM parse error or configuration errorpublic PMapper(org.dom4j.Element config) throws java.io.IOException, chemaxon.nfunk.jep.ParseException
config
- is the XML config root nodejava.io.IOException
- on IO error in molecule inputchemaxon.nfunk.jep.ParseException
- on DOM parse error or configuration errorpublic PMapper(org.dom4j.Element config, Standardizer standardizer, java.lang.String dir) throws java.io.IOException, chemaxon.nfunk.jep.ParseException
config
- is the XML config root nodestandardizer
- is the Standardizer object (may be null)dir
- is the root directoryjava.io.IOException
- on IO error in molecule inputchemaxon.nfunk.jep.ParseException
- on DOM parse error or configuration errorpublic PMapper(org.dom4j.Element config, Standardizer standardizer) throws java.io.IOException, chemaxon.nfunk.jep.ParseException
config
- is the XML config root nodestandardizer
- is the Standardizer object (may be null)java.io.IOException
- on IO error in molecule inputchemaxon.nfunk.jep.ParseException
- on DOM parse error or configuration errorpublic PMapper(org.dom4j.Element config, org.dom4j.Element stconfig, java.lang.String dir) throws java.io.IOException, chemaxon.nfunk.jep.ParseException
config
- is the XML config root nodestconfig
- is the standardizer config root nodedir
- is the root directoryjava.io.IOException
- on IO error in molecule inputchemaxon.nfunk.jep.ParseException
- on DOM parse error or configuration errorjava.lang.IllegalArgumentException
- if the standardizer object creation failspublic PMapper(org.dom4j.Element config, org.dom4j.Element stconfig) throws java.io.IOException, chemaxon.nfunk.jep.ParseException
config
- is the XML config root nodestconfig
- is the standardizer config root nodejava.io.IOException
- on IO error in molecule inputchemaxon.nfunk.jep.ParseException
- on DOM parse error or configuration errorjava.lang.IllegalArgumentException
- if the standardizer object creation failspublic void setVerbose(boolean verbose)
verbose
- is true if verbose outputpublic Molecule getMolConstant(java.lang.String id)
id
- is the molecule IDpublic PSymbols getSymbols()
public java.lang.String getID(java.lang.String symbol)
symbol
- is the feature symbolpublic PMap createFeatureMap(Molecule target) throws SearchException, chemaxon.nfunk.jep.ParseException, chemaxon.license.LicenseException
target
- is the target moleculeSearchException
- if the standardization failschemaxon.nfunk.jep.ParseException
- if the feature expression cannot be evaluatedchemaxon.license.LicenseException
- if no license foundpublic void setLicenseEnvironment(java.lang.String env)
setLicenseEnvironment
in interface chemaxon.license.Licensable
public boolean isLicensed()
isLicensed
in interface chemaxon.license.Licensable
public static void main(java.lang.String[] args) throws java.lang.Exception
args
- the command line parametersjava.lang.Exception