Package chemaxon.marvin.calculations
Class StereoisomerPlugin
java.lang.Object
chemaxon.marvin.plugin.CalculatorPlugin
chemaxon.marvin.calculations.StereoisomerPlugin
- All Implemented Interfaces:
TaggedCalculator,chemaxon.license.Licensable
Deprecated.
Plugin class for stereoisomer calculation.
*
Data types:
- "structure"
- "structures"
- "count"
API usage example:
try (MolImporter mi = new MolImporter("test.mol")) {
// read input molecule
Molecule mol = mi.read();
// create plugin
StereoisomerPlugin plugin = new StereoisomerPlugin();
// set target molecule
plugin.setMolecule(mol);
// set parameters for calculation
plugin.setStereoisomerismType(StereoisomerPlugin.TETRAHEDRAL);
// run the calculation
plugin.run();
// get results
Molecule[] stereoisomers = plugin.getStereoisomers();
int stereoisomerCount = plugin.getStereoisomerCount();
for (Molecule m : stereoisomers) { // or: 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.
- Since:
- Marvin 4.1 03/07/2006
-
Nested Class Summary
Nested classes/interfaces inherited from class chemaxon.marvin.plugin.CalculatorPlugin
CalculatorPlugin.HydrogenData -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDeprecated.static final intDeprecated.static final intDeprecated.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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckMolecule(Molecule mol) Deprecated.Checks the input molecule.Deprecated.Returns the product identifier of the plugin as given byLicenseGlobals.Deprecated.Returns the result item for the specified key and index.getResultAsString(Object type, int index, Object result) Deprecated.Returns the specified result in String format.intgetResultCount(Object type) Deprecated.Returns the number of result items for the given result key.intgetResultDomain(Object type) Deprecated.Returns the calculation domain.Deprecated.Returns the result as a document source object.Object[]Deprecated.Returns the result types.getStereoisomer(int index) Deprecated.Returns a stereoisomer.intDeprecated.Returns the number of different stereoisomers.Molecule[]Deprecated.Returns the stereoisomers in a Molecule[] array.getTypeString(Object type) Deprecated.Returns a string representation of the given type.Deprecated.Returns a warning message if there are no stereoisomers,nullotherwise.booleanDeprecated.Returnstrueif the plugin handles multifragment molecules,falseotherwise.booleanisIn3D()Deprecated.Returnstrueif structures are returned in 3D.booleanrun()Deprecated.Runs the plugin.protected voidsetInputMolecule(Molecule mol) Deprecated.Sets the input molecule.voidsetParameters(Properties params) Deprecated.Sets the input parameters for the plugin.voidDeprecated.Sets a progress monitor to be used inrun()to display progress status.voidsetProtectDoubleBondStereo(boolean protect) Deprecated.Sets double bond stereo protection: iftruethen the stereo configuration of double bonds with preset stereo information will not be changed.voidsetProtectTetrahedralStereo(boolean protect) Deprecated.Sets the protection of tetrahedral stereo centers: iftruethen stereo configuration of tetrahedral stereo centers with preset stereo information will not be changed.voidsetStereoisomerismType(int itype) Deprecated.Sets which type of stereoiseomers should be generated.voidstandardize(Molecule mol) Deprecated.Clears enhanced stereo information.tags()Deprecated.Returns the set of tags reported by this calculator.Methods inherited from class chemaxon.marvin.plugin.CalculatorPlugin
addHeavyAtomLimitChecker, addInputChecker, arrangeHydrogenIncerments, canRepeat, checkLicense, checkType, containsCoordinateBond, containsMulticenterSgroup, containsPseudoAtom, containsSRUSgroup, create, create, createModifiedInputMolecule, createStandardizedMolecule, createStandardizedMolecule, dehydrogenize, format, format, format, format, getAtomCount, getAtomIndex, getAtomIndexMap, getAtomIndexMapping, getCalcMolecule, getDisplayMolecule, getDocument, getDoublePrecision, getErrorMessage, getExplicitHydrogenData, getInputMolDim, getMainMolecule, getOriginalMolecule, getpH, getPluginResource, getQueryMoleculeErrorMessage, getRemark, getResult, getResult, getResult, getResultAsRGB, getResultAsRGB, getResultAsString, getResultCount, getResultDomain, getResultMessage, getResultMolecule, getResultMolecules, getResultsAsRGB, getResultsAsRGB, getResultsAsString, getResultsAsString, isInputMoleculeAromatized, isLicensed, isMsCalc, isMultiThreadedRunEnabled, isNegligibleResult, isOK, isRgrouped, loadClass, loadPluginClass, loadPluginClass, readAttribute, removeWhitespace, restoreExplicitHydrogens, setAtomIndexMap, setChemicalTermsArgument, setChemicalTermsParameters, setDoublePrecision, setDoublePrecision, setDoublePrecision, setKeepHydrogens, setLicenseEnvironment, setMolecule, setMolecule, setMolecule, setMolecule, standardizeIonicGroups
-
Field Details
-
TETRAHEDRAL
public static final int TETRAHEDRALDeprecated.- See Also:
-
DOUBLE_BOND
public static final int DOUBLE_BONDDeprecated.- See Also:
-
BOTH
public static final int BOTHDeprecated.- See Also:
-
-
Constructor Details
-
StereoisomerPlugin
public StereoisomerPlugin()Deprecated.
-
-
Method Details
-
getProductName
Deprecated.Returns the product identifier of the plugin as given byLicenseGlobals.- Specified by:
getProductNamein classCalculatorPlugin- Returns:
- The identifier
LicenseGlobals.ISOMERS_PLUGIN_GROUP
-
handlesMultiFragmentMolecules
public boolean handlesMultiFragmentMolecules()Deprecated.Returnstrueif the plugin handles multifragment molecules,falseotherwise. In the latter case the plugin takes the fragment with more atoms if a multifragment molecule is given as input.- Overrides:
handlesMultiFragmentMoleculesin classCalculatorPlugin- Returns:
- true if the plugin handles multifragment molecules, false otherwise
-
setProgressMonitor
Deprecated.Sets a progress monitor to be used inrun()to display progress status. Short calculations may ignore the observer object. The default implementation does nothing.- Overrides:
setProgressMonitorin classCalculatorPlugin- Parameters:
pmon- is the progress observer object, may benull
-
setParameters
Deprecated.Sets the input parameters for the plugin. Parameters and value ranges:- type: structure,structures,count
- generateall: if true all stereoisomers are generated (default: true)
- maxstereoisomers: maximum number of stereoisomers to generate, if generateall option is set to false (default: 2048)
- verify3D: if true generated stereoisomers are checked for a valid 3D conformation (default: false)
- in3D: if true stereoisomers are checked for a valid 3D conformation and stored in 3D (default: false)
- Overrides:
setParametersin classCalculatorPlugin- Parameters:
params- is the parameter table- Throws:
PluginException- on error
-
isIn3D
public boolean isIn3D()Deprecated.Returnstrueif structures are returned in 3D.- Returns:
trueif structures are returned in 3D- Since:
- Marvin 5.0
-
setProtectTetrahedralStereo
public void setProtectTetrahedralStereo(boolean protect) Deprecated.Sets the protection of tetrahedral stereo centers: iftruethen stereo configuration of tetrahedral stereo centers with preset stereo information will not be changed. Default:false.- Parameters:
protect- istrueif preset tetrahedral stereo centers should be protected- Since:
- Marvin 5.2.3
-
setProtectDoubleBondStereo
public void setProtectDoubleBondStereo(boolean protect) Deprecated.Sets double bond stereo protection: iftruethen the stereo configuration of double bonds with preset stereo information will not be changed. Default:false.- Parameters:
protect- istrueif preset double bond stereo information should be protected- Since:
- Marvin 5.2.3
-
checkMolecule
Deprecated.Checks the input molecule. Throws exception if the molecule isRxnMoleculeor if the molecule contains R-groups.- Overrides:
checkMoleculein classCalculatorPlugin- Parameters:
mol- is the input molecule- Throws:
PluginException- with error message for the user if the molecule is refused
-
setInputMolecule
Deprecated.Sets the input molecule.- Specified by:
setInputMoleculein classCalculatorPlugin- Parameters:
mol- is the input molecule
-
setStereoisomerismType
public void setStereoisomerismType(int itype) Deprecated.Sets which type of stereoiseomers should be generated. Available values:- TETRAHEDRAL : tetrahedral stereoisomers are generated
- DOUBLE_BOND : double bond stereoisomers are generated
- BOTH : tetrahedral and double bond stereoisomers are generated (in fact tetrahedral stereoisomers of double bond stereoisomers are generated)
- Parameters:
itype- is the stereoisomerism type (represented by an integer constant)
-
getResultSource
Deprecated.Returns the result as a document source object. This is useful for displaying the molecules in a viewer dynamically as they become available instead of collecting all results before display.- Overrides:
getResultSourcein classCalculatorPlugin- Returns:
- the document source interface
- Throws:
PluginException- on error- Since:
- Marvin 5.0
-
getStereoisomerCount
public int getStereoisomerCount()Deprecated.Returns the number of different stereoisomers.- Returns:
- the number of different stereoisomers
-
getStereoisomer
Deprecated.Returns a stereoisomer.- Parameters:
index- is the index of the stereoisomer- Returns:
- a stereoisomer
-
getStereoisomers
Deprecated.Returns the stereoisomers in a Molecule[] array.- Returns:
- stereoisomers
-
run
Deprecated.Runs the plugin.- Specified by:
runin classCalculatorPlugin- Returns:
- true if the calculation was successful, false if unsuccesful
- Throws:
PluginException- on error- See Also:
-
getResultTypes
Deprecated.Returns the result types.- Overrides:
getResultTypesin classCalculatorPlugin- Returns:
- the result types
-
getTypeString
Deprecated.Returns a string representation of the given type.- Overrides:
getTypeStringin classCalculatorPlugin- Parameters:
type- is the type object- Returns:
- the type string
-
getResultDomain
Deprecated.Returns the calculation domain.- Overrides:
getResultDomainin classCalculatorPlugin- Parameters:
type- is the result type- Returns:
- the calculation domain
- See Also:
-
getResultCount
Deprecated.Returns the number of result items for the given result key.- Overrides:
getResultCountin classCalculatorPlugin- Parameters:
type- is the result type- Returns:
- the number of result items
- See Also:
-
getResult
Deprecated.Returns the result item for the specified key and index.- Overrides:
getResultin classCalculatorPlugin- Parameters:
type- is the result typeindex- is the result index- Returns:
- the result item for the specified key and index
- Throws:
PluginException- if the result cannot be returned- See Also:
-
getResultAsString
Deprecated.Returns the specified result in String format.- Overrides:
getResultAsStringin classCalculatorPlugin- Parameters:
type- is the result typeindex- is the result indexresult- is the result item- Returns:
- the specified result in String format
- Throws:
PluginException- if an invalid result item is given
-
getWarningMessage
Deprecated.Returns a warning message if there are no stereoisomers,nullotherwise.- Overrides:
getWarningMessagein classCalculatorPlugin- Returns:
- a warning message if stereoisomer calculation aborted
-
standardize
Deprecated.Clears enhanced stereo information.- Overrides:
standardizein classCalculatorPlugin- Parameters:
mol- is the molecule to be standardized
-
tags
Deprecated.Description copied from interface:TaggedCalculatorReturns the set of tags reported by this calculator. The same tags should be returned unless the calculator is modified using a mutator method, e.g. if some settings are changed.New tags can be introduced and reported in the future by existing calculators, so do not depend on the exact set of reported tags, only check for the presence of certain tags.
- Returns:
- the tags
-