|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.marvin.plugin.CalculatorPlugin
chemaxon.marvin.calculations.StructuralFrameworksPlugin
public class StructuralFrameworksPlugin
Plugin class to calculate Bemis-Murcko and other structural scaffolds of input
molecules.
The plugin inside executes a series of atomic (not in chemical sense) operations
which are accessible to the user. The configuration which is set either by
setParameters( Properties ) or by the individual setters. The operation
chain is set up according to the actual configuration by getHost( boolean ).
API usage example:
// read input molecule
MolImporter mi = new MolImporter("test.mol");
Molecule mol = mi.read();
mi.close();
// create plugin
StructuralFrameworksPlugin plugin = new StructuralFrameworksPlugin();
// set framework type
plugin.setType(StructuralFrameworksPlugin.FrameworkTypes.bemismurcko );
// process only the largest fragment
plugin.setLfin( true );
// set target molecule
plugin.setMolecule(mol);
// run the calculation
plugin.run();
// get result
Molecule result = plugin.getResultMolecule()
// print result
System.out.println("Bemis-Murcko framework in SMILES format: "+result.toFormat("smiles") );
| Nested Class Summary | |
|---|---|
static class |
StructuralFrameworksPlugin.FrameworkTypes
FrameworkTypes represents the available calculations |
static interface |
StructuralFrameworksPlugin.VerbosePrinter
Verbose printer specification |
| Field Summary |
|---|
| Fields inherited from class chemaxon.marvin.plugin.CalculatorPlugin |
|---|
ATOM, BLUE, CALCRGB_OFF, COVALENT_HYDRATION_ERROR_REMARK, CRITICAL_ERROR_MSG, EPSILON, INCORRECT_AROMATIC_NITROGEN_REMARK, INSTABLE_TAUTOMERIC_FORM_REMARK, licenseEnvironment, MOLECULE, MOLECULES, NAN, PLUGIN_CLASS_KEY, PLUGIN_DIR, RED |
| Constructor Summary | |
|---|---|
StructuralFrameworksPlugin()
|
|
| Method Summary | |
|---|---|
boolean |
canRepeat()
Returns true if repeatedly running the same plugin object
while getting the results on the GUI is allowed, false otherwise. |
void |
checkMolecule(Molecule mol)
Checks the input molecule. |
java.lang.String |
getProductName()
Returns the product identifier of the plugin as given by LicenseManager. |
Molecule |
getResult()
|
java.lang.Object |
getResult(java.lang.Object type,
int index)
Returns the result item for the specified type and index. |
java.lang.String |
getResultAsString(java.lang.Object type,
int index,
java.lang.Object result)
Get a calculation result (returned by getResultMolecule() after a
run() call in the given format setFormat(String) |
int |
getResultCount()
Returns the number of result items for the first result type. |
int |
getResultDomain(java.lang.Object type)
Returns the calculation domain CalculatorPlugin.ATOM, CalculatorPlugin.MOLECULE or CalculatorPlugin.MOLECULES. |
Molecule |
getResultMolecule()
Get result structure |
java.lang.Object[] |
getResultTypes()
Returns the result types. |
java.lang.String |
getTypeString(java.lang.Object type)
Returns a string representation of the given type. |
boolean |
handlesMultiFragmentMolecules()
This plugin handles multifrag molecules. |
boolean |
run()
Run calculation |
void |
setDehydrogenize(boolean b)
Set dehydrogenize parameter |
void |
setFormat(java.lang.String f)
Set output format used by CalculatorPlugin.getResultAsString(int, Object) |
void |
setHydrogenize(boolean b)
Set hydrogenize parameter |
protected void |
setInputMolecule(Molecule mol)
Set input molecule to process |
void |
setKeepSingleAtom(boolean b)
Set behavior on acyclic input |
void |
setLfin(boolean b)
Set handling option for multi fragment (disconnected) inputs |
void |
setLfout(boolean b)
Set handling option for multi fragment (disconnected) results. |
void |
setOeqcheck(boolean b)
Set oeqcheck parameter |
void |
setParameters(java.util.Properties params)
Sets the input parameters for the plugin Accepted parameters: type: [bmf|mcs|sssr|cssr|allringsystems|largestringsystem| largestring|keep] Framework calculation type bmf: Bemis-Murcko framework bmfl: Bemis-Murcko loose framework mcs: Pairwise Maximum Common Substructure sssr: SSSR cssr: CSSR allringsystems: all fused ring systems largestringsystem: largest fused ring system largestring: largest ring keep: no framework reduction; useful for testing pre/post process keepsingleatom: [true|false] If set true then a single atom will be assigned to acyclic fragments. |
void |
setPruneIn(boolean b)
Set prunein parameter |
void |
setPruneOut(boolean b)
Set pruneout parameter |
void |
setType(StructuralFrameworksPlugin.FrameworkTypes ft)
Set framework type to calculate. |
void |
setVerbosePrinter(StructuralFrameworksPlugin.VerbosePrinter verb)
Set or clear verbose printer Verbose messages will be sent to the verbose printer to ease debugging |
void |
standardize(Molecule mol)
Standardize input molecule Standardization currently ungroups SGroups |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StructuralFrameworksPlugin()
| Method Detail |
|---|
public void setVerbosePrinter(StructuralFrameworksPlugin.VerbosePrinter verb)
verb - Verbose printer. Use null to clear verbose.
public void checkMolecule(Molecule mol)
throws PluginException
Currently the following cases (in addition to the default behavior) fail:
checkMolecule in class CalculatorPluginmol - is the input molecule
PluginException - with error message for the user if the molecule is refused
protected void setInputMolecule(Molecule mol)
throws PluginException
setInputMolecule in class CalculatorPluginmol - Input molecule
PluginExceptionpublic boolean canRepeat()
CalculatorPlugintrue if repeatedly running the same plugin object
while getting the results on the GUI is allowed, false otherwise.
For internal use.
canRepeat in class CalculatorPlugintrue if allowed, false otherwisepublic void standardize(Molecule mol)
standardize in class CalculatorPluginmol - Input molecule to standardize
public boolean run()
throws PluginException
run in class CalculatorPluginPluginExceptionCalculatorPlugin.getErrorMessage()
public Molecule getResultMolecule()
throws PluginException
getResultMolecule in class CalculatorPluginPluginExceptionpublic boolean handlesMultiFragmentMolecules()
handlesMultiFragmentMolecules in class CalculatorPluginpublic void setKeepSingleAtom(boolean b)
b - If set true then a single atom
will be assigned to acyclic fragments. If false then acyclic fragments
will be projected to empty structurespublic void setFormat(java.lang.String f)
CalculatorPlugin.getResultAsString(int, Object)
f - Output format to usepublic void setLfin(boolean b)
b - If set true then the calculation will run
only on the largest input fragment. Note that this necessarily yields the
largest scaffoldpublic void setLfout(boolean b)
b - If set true then only the largest calculated
scaffold will be returned. Note that the returned scaffold not necessarily
calculated from the largest fragment.public void setType(StructuralFrameworksPlugin.FrameworkTypes ft)
Note that default framework type is Bemis-Murcko
ft - Framework to calculatepublic void setPruneIn(boolean b)
b - If true then input will be generalizespublic void setPruneOut(boolean b)
b - If true then result will be generalizedpublic void setHydrogenize(boolean b)
b - If true then input will be hydrogenizedpublic void setDehydrogenize(boolean b)
b - If true then explicit hydrogens will be removed from the inputpublic void setOeqcheck(boolean b)
b - If true then eqivalent result fragments will be filtered
public void setParameters(java.util.Properties params)
throws PluginException
setParameters in class CalculatorPluginparams - parameter table
PluginExceptionpublic java.lang.String getProductName()
CalculatorPluginLicenseManager.
The name is used by the CalculatorPlugin.isLicensed() method.
getProductName in class CalculatorPluginpublic int getResultDomain(java.lang.Object type)
CalculatorPluginCalculatorPlugin.ATOM, CalculatorPlugin.MOLECULE or CalculatorPlugin.MOLECULES.
The default implementation returns CalculatorPlugin.MOLECULE.
getResultDomain in class CalculatorPlugintype - is the result type
CalculatorPlugin.getResultTypes()public java.lang.Object[] getResultTypes()
CalculatorPluginnull.
getResultTypes in class CalculatorPluginpublic int getResultCount()
CalculatorPlugin
getResultCount in class CalculatorPluginCalculatorPlugin.getResultTypes()
public Molecule getResult()
throws PluginException
PluginException
public java.lang.Object getResult(java.lang.Object type,
int index)
throws PluginException
CalculatorPluginnull.
getResult in class CalculatorPlugintype - is the result typeindex - is the result index
PluginException - if the result cannot be returnedCalculatorPlugin.getResultTypes()
public java.lang.String getResultAsString(java.lang.Object type,
int index,
java.lang.Object result)
throws PluginException
getResultMolecule() after a
run() call in the given format setFormat(String)
getResultAsString in class CalculatorPlugintype - this parameter is ignoredindex - this patameter is ignoredresult - result given by getResultMolecule()
PluginExceptionpublic java.lang.String getTypeString(java.lang.Object type)
getTypeString in class CalculatorPlugintype - is the type object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||