Package chemaxon.marvin.calculations
Class MSAPlugin
java.lang.Object
chemaxon.marvin.plugin.CalculatorPlugin
chemaxon.marvin.calculations.MajorMicrospeciesAccessorPlugin
chemaxon.marvin.calculations.MSAPlugin
- All Implemented Interfaces:
TaggedCalculator,chemaxon.license.Licensable
Plugin class for molecular surface area calculation.
Both the incremental values for atoms
and the overal surface area for the molecule
can be calculated by this plugin.
Reference:
- Ferrara, P,. Apostolakis J., Caflisch A., Proteins 2002, 46, 24-33
API usage example:
try (MolImporter mi = new MolImporter("test.mol")) {
// read input molecule
Molecule mol = mi.read();
// create plugin
MSAPlugin plugin = new MSAPlugin();
// optional: take major microspecies at pH=7.4
plugin.setpH(7.4);
// set surface area type (default: VAN_DER_WAALS)
plugin.setSurfaceAreaType(SOLVENT);
// set target molecule
plugin.setMolecule(mol);
// run the calculation
plugin.run();
// get result
double area = plugin.getSurfaceArea();
// print result
System.out.println("Solvent accessible surface area (pH=7.4): "+area);
}
For concurrent plugin example applications using ChemAxon's concurrent framework, refer to the Concurrent plugin examples.
- Since:
- Marvin 4.1
-
Nested Class Summary
Nested classes/interfaces inherited from class chemaxon.marvin.plugin.CalculatorPlugin
CalculatorPlugin.HydrogenData -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intSurface area type: 3D solvent accessible surface area.static final intSurface area type: 3D van der Waals surface area.Fields inherited from class chemaxon.marvin.calculations.MajorMicrospeciesAccessorPlugin
ionizerFields 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) Checks the input molecule.Returns the 3D molecule used in 3D surface area calculation.doublegetASA()Returns water accessible surface area calculated using a radius of 1.4 A for the water molecule.doubleReturns water accessible surface area of all hydrophobic (|qi|invalid input: '<'0.125) atoms.doubleReturns water accessible surface area of all atoms with negative partial charge (strictly less than 0).doubleReturns water accessible surface area of all atoms with positive partial charge (strictly greater than 0).doubleReturns water accessible surface area of all polar (|qi|>=0.125) atoms.doublegetAtomicSurfaceAreaIncrement(int index) Returns the 3D surface area increments.protected MoleculeReturns the molecule object to be used for GUI display.Returns the calculation error information message ifrun()returnedfalse(calculation error).Returns the product identifier of the plugin as given byLicenseManager.Returns the result item for the specified key and index.getResultAsString(Object type, int index, Object result) Returns the specified result in String format.intgetResultCount(Object type) Returns the number of result items for the given result key.intgetResultDomain(Object type) Returns the calculation domainCalculatorPlugin.MOLECULEorCalculatorPlugin.MOLECULEin case of increments .Returns the result molecule for display.Object[]Returns the result types.doubleReturns the surface area, calculation type is previously set insetSurfaceAreaType(int).getTypeString(Object type) Returns a string representation of the given type.doublegetVDWSA()Returns van der Waals surface area.booleanReturnstrueif the plugin is licensed.booleanFor internal use only.booleanrun()Runs the surface area calculation.protected voidsetInputMolecule(Molecule mol) Sets the input molecule.voidsetParameters(Properties params) Sets the input parameters for the plugin.voidsetSolventRadius(double r) Sets solvent radius.voidsetSurfaceAreaType(int saType) Sets surface area calculation type:VAN_DER_WAALSorSOLVENT.tags()Returns the set of tags reported by this calculator.Methods inherited from class chemaxon.marvin.calculations.MajorMicrospeciesAccessorPlugin
createModifiedInputMolecule, getIonizerErrorMessage, getpH, setChemicalTermsArgument, setpH, standardizeMethods inherited from class chemaxon.marvin.plugin.CalculatorPlugin
addHeavyAtomLimitChecker, addInputChecker, arrangeHydrogenIncerments, canRepeat, checkLicense, checkType, containsCoordinateBond, containsMulticenterSgroup, containsPseudoAtom, containsSRUSgroup, create, create, createStandardizedMolecule, createStandardizedMolecule, dehydrogenize, format, format, format, format, getAtomCount, getAtomIndex, getAtomIndexMap, getAtomIndexMapping, getCalcMolecule, getDocument, getDoublePrecision, getExplicitHydrogenData, getInputMolDim, getMainMolecule, getOriginalMolecule, getPluginResource, getQueryMoleculeErrorMessage, getRemark, getResult, getResult, getResult, getResultAsRGB, getResultAsRGB, getResultAsString, getResultCount, getResultDomain, getResultMessage, getResultMolecules, getResultsAsRGB, getResultsAsRGB, getResultsAsString, getResultsAsString, getResultSource, getWarningMessage, handlesMultiFragmentMolecules, isInputMoleculeAromatized, isMsCalc, isNegligibleResult, isOK, isRgrouped, loadClass, loadPluginClass, loadPluginClass, readAttribute, removeWhitespace, restoreExplicitHydrogens, setAtomIndexMap, setChemicalTermsParameters, setDoublePrecision, setDoublePrecision, setDoublePrecision, setKeepHydrogens, setLicenseEnvironment, setMolecule, setMolecule, setMolecule, setMolecule, setProgressMonitor, standardizeIonicGroups
-
Field Details
-
VAN_DER_WAALS
public static final int VAN_DER_WAALSSurface area type: 3D van der Waals surface area.- See Also:
-
SOLVENT
public static final int SOLVENTSurface area type: 3D solvent accessible surface area.- See Also:
-
-
Constructor Details
-
MSAPlugin
public MSAPlugin()Constructor. Creates the MSA calculator object.
-
-
Method Details
-
isLicensed
public boolean isLicensed()Returnstrueif the plugin is licensed. The license checking is based on the product name, returned bygetProductName().- Specified by:
isLicensedin interfacechemaxon.license.Licensable- Overrides:
isLicensedin classMajorMicrospeciesAccessorPlugin- Returns:
trueif the plugin is licensed
-
getProductName
Returns the product identifier of the plugin as given byLicenseManager.- Specified by:
getProductNamein classCalculatorPlugin- Returns:
- The identifier
LicenseManager.GEOMETRY_PLUGIN_GROUP
-
setParameters
Sets the input parameters for the plugin. MSA parameters and value ranges:- precision: 0-8 or inf (number of displayed fractional digits, inf for unrounded value)
- type: "vanderwaals", "solvent" (default: "vanderwaals")
- increments: "true" if surface increments should be returned (for 3D surface ("vanderwaals", "solvent") only)
- pH: major microspecies on given pH is taken as input molecule if omitted then the input molecule is taken as it is
- Overrides:
setParametersin classMajorMicrospeciesAccessorPlugin- Parameters:
params- is the parameter table- Throws:
PluginException- on error
-
setSurfaceAreaType
public void setSurfaceAreaType(int saType) Sets surface area calculation type:VAN_DER_WAALSorSOLVENT. The surface area is returned bygetSurfaceArea(). The atomic increments and the 3D molecule can also be enquired bygetAtomicSurfaceAreaIncrement(int)andget3DMolecule(). Default:VAN_DER_WAALS.- Parameters:
saType- isVAN_DER_WAALSorSOLVENT
-
checkMolecule
Checks the input molecule. Throws exception if the molecule isRxnMolecule, if the molecule contains R-groups or if the molecule consists of more than one fragments.- Overrides:
checkMoleculein classMajorMicrospeciesAccessorPlugin- Parameters:
mol- is the input molecule- Throws:
PluginException- with error message for the user if the molecule is refused
-
setInputMolecule
Sets the input molecule.- Specified by:
setInputMoleculein classCalculatorPlugin- Parameters:
mol- is the (standardized) input molecule- Throws:
PluginException- on error
-
run
Runs the surface area calculation.- Specified by:
runin classCalculatorPlugin- Returns:
- true if the calculation was successful, false on calculation problems
- Throws:
PluginException- on error- See Also:
-
getErrorMessage
Returns the calculation error information message ifrun()returnedfalse(calculation error). This implementation returns the empty string.- Overrides:
getErrorMessagein classMajorMicrospeciesAccessorPlugin- Returns:
- the calculation error information message
-
getResultTypes
Returns the result types. Possible result types: "vanderwaals", "solvent", "increments".- Overrides:
getResultTypesin classCalculatorPlugin- Returns:
- the result types
-
getResultDomain
Returns the calculation domainCalculatorPlugin.MOLECULEorCalculatorPlugin.MOLECULEin case of increments .- Overrides:
getResultDomainin classCalculatorPlugin- Parameters:
type- is the result type- Returns:
CalculatorPlugin.MOLECULE- See Also:
-
getResultCount
Returns the number of result items for the given result key. TPSA returns1for surface area, the atom count for increments.- Overrides:
getResultCountin classCalculatorPlugin- Parameters:
type- is the result type- Returns:
- the number of result items
- See Also:
-
setSolventRadius
public void setSolventRadius(double r) Sets solvent radius. Default: 1.4 Angstrom. -
getSurfaceArea
public double getSurfaceArea()Returns the surface area, calculation type is previously set insetSurfaceAreaType(int). Default:VAN_DER_WAALS.- Returns:
- the surface area
-
getVDWSA
public double getVDWSA()Returns van der Waals surface area. Calculation type must be set toVAN_DER_WAALSusingsetSurfaceAreaType(int), and the alculation should be run beforehand byrun()- Returns:
- van der Waals surface area
- Since:
- Marvin 5.0
-
getASA
public double getASA()Returns water accessible surface area calculated using a radius of 1.4 A for the water molecule. Calculation type must be set toSOLVENTusingsetSurfaceAreaType(int), and the calculation should be run beforehand byrun()- Returns:
- water accessible surface area
- Since:
- Marvin 5.0
-
getASAPlus
public double getASAPlus()Returns water accessible surface area of all atoms with positive partial charge (strictly greater than 0). Calculation type must be set toSOLVENTusingsetSurfaceAreaType(int), and the calculation should be run beforehand byrun()- Returns:
- water accessible surface area of all atoms with positive partial charge
- Since:
- Marvin 5.0
-
getASANegative
public double getASANegative()Returns water accessible surface area of all atoms with negative partial charge (strictly less than 0). Calculation type must be set toSOLVENTusingsetSurfaceAreaType(int), and the calculation should be run beforehand byrun()- Returns:
- water accessible surface area of all atoms with negative partial charge
- Since:
- Marvin 5.0
-
getASAHydrophobic
public double getASAHydrophobic()Returns water accessible surface area of all hydrophobic (|qi|invalid input: '<'0.125) atoms. Calculation type must be set toSOLVENTusingsetSurfaceAreaType(int), and the calculation should be run beforehand byrun()- Returns:
- water accessible surface area of all hydrophobic atoms
- Since:
- Marvin 5.0
-
getASAPolar
public double getASAPolar()Returns water accessible surface area of all polar (|qi|>=0.125) atoms. Calculation type must be set toSOLVENTusingsetSurfaceAreaType(int), and the calculation should be run beforehand byrun()- Returns:
- water accessible surface area of all polar atoms
- Since:
- Marvin 5.0
-
getAtomicSurfaceAreaIncrement
public double getAtomicSurfaceAreaIncrement(int index) Returns the 3D surface area increments. Calculated only if surface area type is set toSOLVENTorVAN_DER_WAALSinsetSurfaceAreaType(int).- Parameters:
index- is the atom index- Returns:
- the surface area increment for the specified atom index
-
get3DMolecule
Returns the 3D molecule used in 3D surface area calculation. Can be called only if surface area type is set toSOLVENTorVAN_DER_WAALSinsetSurfaceAreaType(int).- Returns:
- the 3D molecule used in 3D surface area calculation
-
getResult
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
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
-
getDisplayMolecule
Returns the molecule object to be used for GUI display. This is the 3D molecule returned byget3DMolecule().- Overrides:
getDisplayMoleculein classCalculatorPlugin- Returns:
- the molecule object to be used for GUI display
-
getTypeString
Returns a string representation of the given type.- Overrides:
getTypeStringin classCalculatorPlugin- Parameters:
type- is the type object- Returns:
- the type string
-
getResultMolecule
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 (MPropHandler.convertToString(MPropertyContainer, String)).- Overrides:
getResultMoleculein classCalculatorPlugin- Returns:
- the result molecule
- Throws:
PluginException- on error- Since:
- Marvin 4.0
-
isMultiThreadedRunEnabled
public boolean isMultiThreadedRunEnabled()For internal use only.- Overrides:
isMultiThreadedRunEnabledin classCalculatorPlugin- Returns:
trueif multi-threaded run is enabled
-
tags
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
-