chemaxon.marvin.calculations
Class MajorMicrospeciesAccessorPlugin

java.lang.Object
  extended by chemaxon.marvin.plugin.CalculatorPlugin
      extended by chemaxon.marvin.calculations.MajorMicrospeciesAccessorPlugin
All Implemented Interfaces:
chemaxon.license.Licensable
Direct Known Subclasses:
ChargePlugin, HBDAPlugin, HuckelAnalysisPlugin, MSAPlugin, OrbitalElectronegativityPlugin, PolarizabilityPlugin, TPSAPlugin

public abstract class MajorMicrospeciesAccessorPlugin
extends CalculatorPlugin

Common base class for all plugins with possible major microspecies input.

For concurrent plugin example applications using ChemAxon's concurrent framework, refer to the Concurrent plugin examples.

Since:
Marvin 4.0.2
Version:
5.0 10/25/2007
Author:
Nora Mate

Field Summary
protected  chemaxon.calculations.Ionizer ionizer
           
 
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
MajorMicrospeciesAccessorPlugin()
          Constructor.
 
Method Summary
 void checkMolecule(Molecule mol)
          Checks the input molecule.
protected  Molecule createModifiedInputMolecule(Molecule mol)
          Returns the molecule form with largest distribution.
 java.lang.String getErrorMessage()
          Returns the calculation error information message or the empty string if there is no error.
 java.lang.String getIonizerErrorMessage()
          Returns the calculation error information message or the empty string if there is no error.
 double getpH()
          Returns the pH where the major microspecies should be taken.
 boolean isLicensed()
          Returns true if the plugin is licensed.
 void setParameters(java.util.Properties params)
          Sets the input parameters for the plugin.
 void setpH(double pH)
          Sets the pH: major microspecies on given pH is taken as input molecule if set to Double.NaN then the input molecule is taken as it is.
 void standardize(Molecule mol)
          Standardizes the molecule.
 
Methods inherited from class chemaxon.marvin.plugin.CalculatorPlugin
checkType, containsCoordinateBond, containsMulticenterSgroup, containsPseudoAtom, containsSRUSgroup, create, createStandardizedMolecule, createStandardizedMolecule, dehydrogenize, format, format, format, format, getAtomCount, getAtomIndex, getCalcMolecule, getDisplayMolecule, getDocument, getDoublePrecision, getInputMolDim, getMainMolecule, getPluginResource, getRemark, getResult, getResult, getResult, getResult, getResultAsRGB, getResultAsRGB, getResultAsString, getResultAsString, getResultCount, getResultCount, getResultDomain, getResultDomain, getResultMessage, getResultMolecule, getResultMolecules, getResultsAsRGB, getResultsAsRGB, getResultsAsString, getResultsAsString, getResultSource, getResultTypes, getTypeString, getWarningMessage, handlesMultiFragmentMolecules, isInputMoleculeAromatized, isMsCalc, isMultiThreadedRunEnabled, isNegligibleResult, isOK, isRgrouped, loadClass, readAttribute, removeWhitespace, run, setDoublePrecision, setDoublePrecision, setDoublePrecision, setInputMolecule, setLicenseEnvironment, setMolecule, setMolecule, setMolecule, setProgressMonitor, standardizeIonicGroups, standardizeNeutralGroups
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ionizer

protected chemaxon.calculations.Ionizer ionizer
Constructor Detail

MajorMicrospeciesAccessorPlugin

public MajorMicrospeciesAccessorPlugin()
Constructor. Creates the ionizer object.

Method Detail

isLicensed

public boolean isLicensed()
Description copied from class: CalculatorPlugin
Returns true 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.

Specified by:
isLicensed in interface chemaxon.license.Licensable
Overrides:
isLicensed in class CalculatorPlugin
Returns:
true if the plugin is licensed

setParameters

public void setParameters(java.util.Properties params)
                   throws PluginException
Sets the input parameters for the plugin. The parameters and value ranges:

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

setpH

public void setpH(double pH)
Sets the pH: major microspecies on given pH is taken as input molecule if set to Double.NaN then the input molecule is taken as it is.

Parameters:
pH - is the pH value

getpH

public double getpH()
Returns the pH where the major microspecies should be taken. Returns Double.NaN if no microspecies calculation required.

Overrides:
getpH in class CalculatorPlugin
Returns:
the pH where the major microspecies should be taken or Double.NaN if no microspecies calculation

createModifiedInputMolecule

protected final Molecule createModifiedInputMolecule(Molecule mol)
Returns the molecule form with largest distribution. Returns a microspecies with largest distribution on a given pH if getpH() returns a value different from Double.NaN, otherwise returns the input molecule itself.

Overrides:
createModifiedInputMolecule in class CalculatorPlugin
Parameters:
mol - is the input molecule
Returns:
the molecule form with largest distribution
Throws:
PluginException - on access error

getErrorMessage

public java.lang.String getErrorMessage()
Returns the calculation error information message or the empty string if there is no error.

Overrides:
getErrorMessage in class CalculatorPlugin
Returns:
the calculation error information message

getIonizerErrorMessage

public java.lang.String getIonizerErrorMessage()
Returns the calculation error information message or the empty string if there is no error.

Returns:
the calculation error information message

checkMolecule

public void checkMolecule(Molecule mol)
                   throws PluginException
Checks the input molecule. Throws exception if the molecule molecule contains R-groups.

Overrides:
checkMolecule in class CalculatorPlugin
Parameters:
mol - is the input molecule
Throws:
PluginException - with error message for the user if the molecule is refused

standardize

public void standardize(Molecule mol)
Standardizes the molecule. Adds dehydrogenization to default standardization in case when major microsepcies calculation required.

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