chemaxon.marvin.calculations
Class AlignmentPlugin

java.lang.Object
  extended by chemaxon.marvin.plugin.CalculatorPlugin
      extended by chemaxon.marvin.calculations.AlignmentPlugin
All Implemented Interfaces:
chemaxon.license.Licensable

public class AlignmentPlugin
extends CalculatorPlugin

Plugin layer for the AlignmentAPI

Since:
Marvin 5.2
Author:
Adrian Kalaszi

Nested Class Summary
 
Nested classes/interfaces inherited from class chemaxon.marvin.plugin.CalculatorPlugin
CalculatorPlugin.HydrogenData
 
Field Summary
static int STEP_DEFAULT
           
 
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
AlignmentPlugin()
           
 
Method Summary
 java.lang.String getProductName()
          Returns the product identifier of the plugin as given by LicenseManager.
 Molecule getResultMolecule()
          Returns the result molecule for display.
 java.lang.Object[] getResultTypes()
          Returns the result types.
 double getVolumeTanimoto()
           
 java.lang.String getWarningMessage()
          Returns the calculation warning information message.
 boolean handlesMultiFragmentMolecules()
          Returns true if the plugin handles multifragment molecules, false otherwise.
 boolean run()
          Runs the tool.
 void setAccuracyMode(AlignmentAccuracyMode acc)
           
protected  void setInputMolecule(Molecule mol)
          Sets the input molecule.
 void setMinimumCommonSize(int mcsSize)
          This is used only if AlignmentPreset.MCS is selected
 void setParameters(java.util.Properties params)
          Sets the input parameters for the plugin.
 void setProgressMonitor(chemaxon.common.util.MProgressMonitor pmon)
          Sets a progress observer to be used in run() to display progress status.
 void setRingFlexibility(int size, int rotBondCount)
          If BOTH the two parameters is true for the ring then the ring is treated flexible.
 void standardize(Molecule mol)
          Standardizes the molecule by performing the transformations necessary to run the plugin (aromatize, dehydrogenize, bring nitro groups to common form, ...).
 
Methods inherited from class chemaxon.marvin.plugin.CalculatorPlugin
arrangeHydrogenIncerments, canRepeat, checkLicense, checkMolecule, checkType, containsCoordinateBond, containsMulticenterSgroup, containsPseudoAtom, containsSRUSgroup, create, createModifiedInputMolecule, createStandardizedMolecule, createStandardizedMolecule, dehydrogenize, format, format, format, format, getAtomCount, getAtomIndex, getCalcMolecule, getDisplayMolecule, getDocument, getDoublePrecision, getErrorMessage, getExplicitHydrogenData, getInputMolDim, getMainMolecule, getpH, getPluginResource, getQueryMoleculeErrorMessage, getRemark, getResult, getResult, getResult, getResult, getResultAsRGB, getResultAsRGB, getResultAsString, getResultAsString, getResultCount, getResultCount, getResultDomain, getResultDomain, getResultMessage, getResultMolecules, getResultsAsRGB, getResultsAsRGB, getResultsAsString, getResultsAsString, getResultSource, getTypeString, isInputMoleculeAromatized, isLicensed, isMsCalc, isMultiThreadedRunEnabled, isNegligibleResult, isOK, isRgrouped, loadClass, readAttribute, removeWhitespace, restoreExplicitHydrogens, setDoublePrecision, setDoublePrecision, setDoublePrecision, setKeepHydrogens, setLicenseEnvironment, setMolecule, setMolecule, setMolecule, setMolecule, standardizeIonicGroups, standardizeNeutralGroups
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STEP_DEFAULT

public static int STEP_DEFAULT
Constructor Detail

AlignmentPlugin

public AlignmentPlugin()
Method Detail

handlesMultiFragmentMolecules

public boolean handlesMultiFragmentMolecules()
Description copied from class: CalculatorPlugin
Returns 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. The default implementation returns false.

Overrides:
handlesMultiFragmentMolecules in class CalculatorPlugin
Returns:
true if the plugin handles multifragment molecules, false otherwise

getProductName

public java.lang.String getProductName()
Description copied from class: CalculatorPlugin
Returns the product identifier of the plugin as given by LicenseManager. The name is used by the CalculatorPlugin.isLicensed() method.

Specified by:
getProductName in class CalculatorPlugin
Returns:
product identifier or a default string

getResultTypes

public java.lang.Object[] getResultTypes()
Returns the result types. Possible result types: refractivity,increments,inch

Overrides:
getResultTypes in class CalculatorPlugin
Returns:
the result types

setInputMolecule

protected void setInputMolecule(Molecule mol)
                         throws PluginException
Description copied from class: CalculatorPlugin
Sets the input molecule.

Specified by:
setInputMolecule in class CalculatorPlugin
Parameters:
mol - is the input molecule
Throws:
PluginException - on error

setProgressMonitor

public void setProgressMonitor(chemaxon.common.util.MProgressMonitor pmon)
Sets a progress observer to be used in run() to display progress status. Short calculations may ignore the observer object. The default implementation does nothing.

Overrides:
setProgressMonitor in class CalculatorPlugin
Parameters:
pmon - is the progress monitor, may be null

getWarningMessage

public java.lang.String getWarningMessage()
Returns the calculation warning information message.

Overrides:
getWarningMessage in class CalculatorPlugin
Returns:
the calculation warning information message

getResultMolecule

public Molecule getResultMolecule()
                           throws PluginException
Description copied from class: CalculatorPlugin
Returns the result molecule for display. Atomic results are stored in atom extra labels (MolAtom.getExtraLabel()). Molecular results are stored in molecule properties with keys being the result types (Molecule.getProperty(String)).

Overrides:
getResultMolecule in class CalculatorPlugin
Returns:
the result molecule
Throws:
PluginException - on error

setAccuracyMode

public void setAccuracyMode(AlignmentAccuracyMode acc)
                     throws PluginException
Throws:
PluginException

setRingFlexibility

public void setRingFlexibility(int size,
                               int rotBondCount)
If BOTH the two parameters is true for the ring then the ring is treated flexible.

Parameters:
size - atomcount above the ring is flexible
rotBondCount - rotatable bond count in the ring above which the ring is flexible

setMinimumCommonSize

public void setMinimumCommonSize(int mcsSize)
                          throws PluginException
This is used only if AlignmentPreset.MCS is selected

Parameters:
mcsSize -
Throws:
PluginException

setParameters

public void setParameters(java.util.Properties params)
                   throws PluginException
Sets the input parameters for the plugin.

Overrides:
setParameters in class CalculatorPlugin
Parameters:
params - is the parameter table
Throws:
PluginException - on error

run

public boolean run()
            throws PluginException
Description copied from class: CalculatorPlugin
Runs the tool.

Specified by:
run in class CalculatorPlugin
Returns:
true if the calculation was successful, false on calculation problems
Throws:
PluginException - on error
See Also:
CalculatorPlugin.getErrorMessage()

getVolumeTanimoto

public double getVolumeTanimoto()

standardize

public void standardize(Molecule mol)
Description copied from class: CalculatorPlugin
Standardizes the molecule by performing the transformations necessary to run the plugin (aromatize, dehydrogenize, bring nitro groups to common form, ...). This implementation performs the following transformations: To be overridden by subclasses that require other standardization (or none at all). TODO: replace by call to chemaxon.reaction.Standardizer

Overrides:
standardize in class CalculatorPlugin
Parameters:
mol - is the molecule to be standardized