|
|||||||||
| 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.IUPACNamingPlugin
public class IUPACNamingPlugin
IUPAC name generator plugin.
API usage example:
// read input molecule
MolImporter mi = new MolImporter("test.mol");
Molecule mol = mi.read();
mi.close();
// create plugin
IUPACNamingPlugin plugin = new IUPACNamingPlugin();
// set the input molecule
plugin.setMolecule(mol);
// run the calculation
plugin.run();
// get results
String preferredIUPACName = plugin.getPreferredIUPACName();
String traditionalName = plugin.getTraditionalName();
// do something with the result ...
For concurrent plugin example applications using ChemAxon's concurrent framework, refer to the Concurrent plugin examples.
Molecule.toFormat(String)| 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, NAN, PLUGIN_CLASS_KEY, PLUGIN_DIR, RED |
| Constructor Summary | |
|---|---|
IUPACNamingPlugin()
|
|
| Method Summary | |
|---|---|
java.lang.String |
getPreferredIUPACName()
Returns the preferred IUPAC name. |
java.lang.Object |
getResult(java.lang.Object type,
int index)
Returns the result item for the specified key and index. |
java.lang.String |
getResultAsString(java.lang.Object type,
int index,
java.lang.Object result)
Returns the specified result in String format. |
Molecule |
getResultMolecule()
Returns the result molecule for display. |
java.lang.Object[] |
getResultTypes()
Returns the result types. |
java.lang.String |
getTraditionalName()
Returns the traditional IUPAC name. |
java.lang.String |
getTypeString(java.lang.Object type)
Returns a string representation of the given type. |
boolean |
handlesMultiFragmentMolecules()
Returns true if the plugin handles multifragment molecules,
false otherwise. |
boolean |
isLicensed()
Returns true if the plugin is licensed. |
boolean |
run()
Runs the tool. |
void |
setGeneratePreferredIUPACName(boolean g)
Sets preferred IUPAC name generation. |
void |
setGenerateTraditionalIUPACName(boolean g)
Sets traditional IUPAC name generation. |
protected void |
setInputMolecule(Molecule mol)
Sets the input molecule. |
void |
setLicenseEnvironment(java.lang.String env)
Sets license environment to be stored. |
void |
setParameters(java.util.Properties params)
Sets the input parameters for the plugin. |
void |
standardize(Molecule mol)
Standardizes the molecule. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IUPACNamingPlugin()
| Method Detail |
|---|
public void setParameters(java.util.Properties params)
throws PluginException
setParameters in class CalculatorPluginparams - is the parameter table
PluginException - on errorpublic boolean handlesMultiFragmentMolecules()
true if the plugin handles multifragment molecules,
false otherwise. In the latter case the plugin takes the
fragment with more atoms if a multifragment molecule is given as input.
Returns true if parameter "single" is set to "false",
false otherwise (default: false).
handlesMultiFragmentMolecules in class CalculatorPlugin
protected void setInputMolecule(Molecule mol)
throws PluginException
setInputMolecule in class CalculatorPluginmol - is the input molecule
PluginException - on errorpublic void setGeneratePreferredIUPACName(boolean g)
g - if getPreferredIUPACName()public void setGenerateTraditionalIUPACName(boolean g)
g - if getTraditionalName()
public boolean run()
throws PluginException
run in class CalculatorPluginPluginException - on errorCalculatorPlugin.getErrorMessage()
public java.lang.String getPreferredIUPACName()
throws PluginException
PluginException - if name generation failsetGeneratePreferredIUPACName(boolean)
public java.lang.String getTraditionalName()
throws PluginException
PluginException - if name generation failsetGenerateTraditionalIUPACName(boolean)public java.lang.Object[] getResultTypes()
getResultTypes in class CalculatorPluginpublic java.lang.String getTypeString(java.lang.Object type)
getTypeString in class CalculatorPlugintype - is the type object
public java.lang.Object getResult(java.lang.Object type,
int index)
throws PluginException
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
getResultAsString in class CalculatorPlugintype - is the result typeindex - is the result indexresult - is the result item
PluginException - if an invalid result item is given
public Molecule getResultMolecule()
throws PluginException
MolAtom.getExtraLabel()).
Molecular results are stored in molecule properties
with keys being the result types
(Molecule.getProperty(String)).
getResultMolecule in class CalculatorPluginPluginException - on errorpublic boolean isLicensed()
CalculatorPlugintrue if the plugin is licensed. Implement this only if you want to sell your plugin and
protect it with a license key. The default implementation always returns true which means that
the plugin is free: no license key is required. This method returns only information about the licensing,
license checking has to be implemented separately.
isLicensed in interface chemaxon.license.LicensableisLicensed in class CalculatorPlugintrue if the plugin is licensedpublic void setLicenseEnvironment(java.lang.String env)
CalculatorPlugin
setLicenseEnvironment in interface chemaxon.license.LicensablesetLicenseEnvironment in class CalculatorPluginenv - environment String to be stored and passed to the LicenseHandler in the isLicensed methodpublic void standardize(Molecule mol)
standardize in class CalculatorPluginmol - is the molecule to be standardized
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||