|
|||||||||
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.StereoisomerPlugin
public class StereoisomerPlugin
Plugin class for stereoisomer calculation. * Data types:
API usage example:
// read input molecule MolImporter mi = new MolImporter("test.mol"); Molecule mol = mi.read(); mi.close(); // create plugin StereoisomerPlugin plugin = new StereoisomerPlugin(); // set target molecule plugin.setMolecule(mol); // set parameters for calculation plugin.setStereoisomerismType(StereoisomerPlugin.TETRAHEDRAL); plugin.setMaxNumberOfStereoisomers(2048); // if not set all stereoisomers are generated // run the calculation plugin.run(); // get results Molecule[] stereoisomers = plugin.getStereoisomers(); int stereoisomerCount = plugin.getStereoisomerCount(); Molecule m; for (int i = 0; i < stereoisomerCount; ++i) { m = stereoisomers[i]; // same as m = plugin.getStereoisomer(i); // do something with molecule ... } // do something with the results ...
Note: Stereoisomer plugin does not handle enhanced stereo information. Enhanced stereo information is cleared before generating the stereoisomers.
For concurrent plugin example applications using ChemAxon's concurrent framework, refer to the Concurrent plugin examples.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class chemaxon.marvin.plugin.CalculatorPlugin |
---|
CalculatorPlugin.HydrogenData |
Field Summary | |
---|---|
static int |
BOTH
|
static int |
DOUBLE_BOND
|
static int |
TETRAHEDRAL
|
Fields inherited from class chemaxon.marvin.plugin.CalculatorPlugin |
---|
ATOM, BLUE, CALCRGB_OFF, COVALENT_HYDRATION_ERROR_REMARK, CRITICAL_ERROR_MSG, EPSILON, explicitHydrogens, INCORRECT_AROMATIC_NITROGEN_REMARK, INSTABLE_TAUTOMERIC_FORM_REMARK, KEEP_HYDROGENS, keepHydrogens, licenseEnvironment, MOLECULE, MOLECULES, NAN, PLUGIN_CLASS_KEY, PLUGIN_DIR, RED, TRUE |
Constructor Summary | |
---|---|
StereoisomerPlugin()
|
Method Summary | |
---|---|
void |
checkMolecule(Molecule mol)
Checks the input molecule. |
int |
chiralCenterCount()
Calculates the number of tetrahedral stereogenic centers. |
java.lang.String |
getProductName()
Returns the product identifier of the plugin as given by LicenseManager . |
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. |
int |
getResultCount(java.lang.Object type)
Returns the number of result items for the given result key. |
int |
getResultDomain(java.lang.Object type)
Returns the calculation domain. |
chemaxon.marvin.plugin.PluginMDocSource |
getResultSource()
Returns the result as a document source object. |
java.lang.Object[] |
getResultTypes()
Returns the result types. |
Molecule |
getStereoisomer(int index)
Returns a stereoisomer. |
int |
getStereoisomerCount()
Returns the number of different stereoisomers. |
Molecule[] |
getStereoisomers()
Returns the stereoisomers in a Molecule[] array. |
java.lang.String |
getTypeString(java.lang.Object type)
Returns a string representation of the given type. |
java.lang.String |
getWarningMessage()
Returns a warning message if there are no stereoisomers, null
otherwise. |
boolean |
handlesMultiFragmentMolecules()
Returns true if the plugin handles multifragment
molecules, false otherwise. |
boolean |
isChiralCenter(int a)
Determines if an atom can be a tetrahedral stereogenic center. |
boolean |
isIn3D()
Returns true if structures are returned in 3D. |
boolean |
run()
Runs the plugin. |
void |
setCheck3DStereo(boolean c)
Sets the 3D stereo conformation checking of the structure. |
void |
setIn3D(boolean b)
Sets to display the molecule in 3D. |
protected void |
setInputMolecule(Molecule mol)
Sets the input molecule. |
void |
setMaxNumberOfStereoisomers(int n)
Sets the maxinum number of stereoisomers to be generated. |
void |
setParameters(java.util.Properties params)
Sets the input parameters for the plugin. |
void |
setProgressMonitor(chemaxon.common.util.MProgressMonitor pmon)
Sets a progress monitor to be used in run() to display
progress status. |
void |
setProtectDoubleBondStereo(boolean protect)
Sets double bond stereo protection: if true then the stereo configuration of double bonds
with preset stereo information will not be changed. |
void |
setProtectTetrahedralStereo(boolean protect)
Sets the protection of tetrahedral stereo centers: if true then stereo configuration of
tetrahedral stereo centers with preset stereo information will not be changed. |
void |
setStereoisomerismType(int itype)
Sets which type of stereoiseomers should be generated. |
void |
standardize(Molecule mol)
Clears enhanced stereo information. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TETRAHEDRAL
public static final int DOUBLE_BOND
public static final int BOTH
Constructor Detail |
---|
public StereoisomerPlugin()
Method Detail |
---|
public java.lang.String getProductName()
LicenseManager
.
getProductName
in class CalculatorPlugin
LicenseManager.ISOMERS_PLUGIN_GROUP
public 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.
handlesMultiFragmentMolecules
in class CalculatorPlugin
public void setProgressMonitor(chemaxon.common.util.MProgressMonitor pmon)
run()
to display
progress status. Short calculations may ignore the observer object.
The default implementation does nothing.
setProgressMonitor
in class CalculatorPlugin
pmon
- is the progress observer object, may be
null
public void setParameters(java.util.Properties params) throws PluginException
setParameters
in class CalculatorPlugin
params
- is the parameter table
PluginException
- on errorpublic boolean isIn3D()
true
if structures are returned in 3D.
true
if structures are returned in 3Dpublic void setProtectTetrahedralStereo(boolean protect)
true
then stereo configuration of
tetrahedral stereo centers with preset stereo information will not be changed.
Default: false
.
protect
- is true
if preset tetrahedral stereo centers should be protectedpublic void setProtectDoubleBondStereo(boolean protect)
true
then the stereo configuration of double bonds
with preset stereo information will not be changed.
Default: false
.
protect
- is true
if preset double bond stereo information should be protectedpublic void checkMolecule(Molecule mol) throws PluginException
RxnMolecule
or if the molecule contains R-groups.
checkMolecule
in class CalculatorPlugin
mol
- is the input molecule
PluginException
- with error message for the user if the molecule
is refusedprotected void setInputMolecule(Molecule mol) throws PluginException
setInputMolecule
in class CalculatorPlugin
mol
- is the input molecule
PluginException
- on errorpublic boolean isChiralCenter(int a)
a
- index of the atom
public int chiralCenterCount()
public void setMaxNumberOfStereoisomers(int n)
n
- is the number of stereoisomers to be generatedpublic void setStereoisomerismType(int itype)
itype
- is the stereoisomerism type (represented by an integer
constant)public void setCheck3DStereo(boolean c)
c
- if true structure is checked for a valid stereo conformation.public void setIn3D(boolean b)
b
- if true structure is displayed in 3Dpublic chemaxon.marvin.plugin.PluginMDocSource getResultSource() throws PluginException
getResultSource
in class CalculatorPlugin
PluginException
- on errorpublic int getStereoisomerCount()
public Molecule getStereoisomer(int index)
index
- is the index of the stereoisomer
public Molecule[] getStereoisomers()
public boolean run() throws PluginException
run
in class CalculatorPlugin
PluginException
- on errorCalculatorPlugin.getErrorMessage()
public java.lang.Object[] getResultTypes()
getResultTypes
in class CalculatorPlugin
public java.lang.String getTypeString(java.lang.Object type)
getTypeString
in class CalculatorPlugin
type
- is the type object
public int getResultDomain(java.lang.Object type)
getResultDomain
in class CalculatorPlugin
type
- is the result type
getResultTypes()
public int getResultCount(java.lang.Object type)
getResultCount
in class CalculatorPlugin
type
- is the result type
getResultTypes()
public java.lang.Object getResult(java.lang.Object type, int index) throws PluginException
getResult
in class CalculatorPlugin
type
- 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 CalculatorPlugin
type
- is the result typeindex
- is the result indexresult
- is the result item
PluginException
- if an invalid result item is givenpublic java.lang.String getWarningMessage()
null
otherwise.
getWarningMessage
in class CalculatorPlugin
public void standardize(Molecule mol)
standardize
in class CalculatorPlugin
mol
- is the molecule to be standardized
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |