public class MolecularDynamicsPlugin extends CalculatorPlugin
API usage example:
// create plugin
MolecularDynamicsPlugin plugin = new MolecularDynamicsPlugin();
// set parameters
plugin.setStepNumber(10000);
plugin.setStepTime(1);
plugin.setSamplingInterval(10);
// read the input molecule
MolImporter mi = new MolImporter("mol.sdf");
Molecule mol = mi.read();
// set the input molecule
plugin.setMolecule(mol);
// run the calculation
plugin.run();
// get the results
int structureCount = plugin.getStructureCount();
for (int i = 0; i < structureCount; i++) {
Molecule mdMol = plugin.getStructure(i);
// do something with results
}
mi.close();
For concurrent plugin example applications using ChemAxon's concurrent framework, refer to the Concurrent plugin examples.
CalculatorPlugin.HydrogenDataATOM, 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 and Description |
|---|
MolecularDynamicsPlugin()
Creates a new instance of MolecularDynamicsPlugin
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkMolecule(Molecule mol)
Checks the input molecule.
|
String |
getProductName()
Returns the product identifier of the plugin as given by
LicenseManager. |
Object |
getResult(Object type,
int index)
Returns the result item for the specified key and index.
|
String |
getResultAsString(Object type,
int index,
Object result)
Returns the specified result in String format.
|
int |
getResultCount(Object type)
Returns the number of result items for the given result key.
|
int |
getResultDomain(Object type)
Returns the calculation domain.
|
chemaxon.marvin.plugin.PluginMDocSource |
getResultSource()
Returns the result as a document source object.
|
Object[] |
getResultTypes()
Returns the result types.
|
Molecule |
getStructure(int index)
Returns a structure.
|
int |
getStructureCount()
Returns the number of different structures.
|
Molecule[] |
getStructures()
Returns all structures.
|
boolean |
handlesMultiFragmentMolecules()
Returns
true if the plugin handles multifragment
molecules, false otherwise. |
boolean |
run()
Runs the tool.
|
void |
setCenterMolecule(boolean centerMolecule)
Center the molecule before MD calculation
(It is not set by default.)
|
void |
setForceField(String forcefield)
Sets the force field type.
|
void |
setInitialTemperature(double temperature)
Sets the initial temperature.
|
protected void |
setInputMolecule(Molecule mol)
Sets the input molecule.
|
void |
setIntegrator(String integrator)
Sets the integrator used for calculations.
|
void |
setParameters(Properties params)
Sets the input parameters for the plugin.
|
void |
setProgressMonitor(MProgressMonitor pmon)
Sets a progress observer to be used in
run() to display progress
status. |
void |
setSamplingInterval(double sampinterval)
Number of trajectory frames to be stored from the sampling start time to
the end of calculation.
|
void |
setSamplingStart(double sampstart)
Sets the beginning of trajectory sampling.
|
void |
setStepNumber(int stepno)
Sets the number of simulation steps.
|
void |
setStepTime(double timestep)
Sets the simulation timestep.
|
void |
standardize(Molecule mol)
Expands sgroups.
|
arrangeHydrogenIncerments, canRepeat, checkLicense, checkType, containsCoordinateBond, containsMulticenterSgroup, containsPseudoAtom, containsSRUSgroup, create, createModifiedInputMolecule, createStandardizedMolecule, createStandardizedMolecule, dehydrogenize, format, format, format, format, getAtomCount, getAtomIndex, getAtomIndexMap, 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, getTypeString, getWarningMessage, isInputMoleculeAromatized, isLicensed, isMsCalc, isMultiThreadedRunEnabled, isNegligibleResult, isOK, isRgrouped, loadClass, readAttribute, removeWhitespace, restoreExplicitHydrogens, setAtomIndexMap, setDoublePrecision, setDoublePrecision, setDoublePrecision, setKeepHydrogens, setLicenseEnvironment, setMolecule, setMolecule, setMolecule, setMolecule, standardizeIonicGroups, standardizeNeutralGroupspublic MolecularDynamicsPlugin()
public void setForceField(String forcefield)
forcefield - force field type
possible values: "dreiding", (default: "dreiding")public void setIntegrator(String integrator)
integrator - integrator type
possible values: "positionverlet","velocityverlet","leapfrog","projectedvelocityverlet"
(default: "velocityverlet")public void setStepNumber(int stepno)
stepno - number of simulation steps (default: 1000)public void setStepTime(double timestep)
timestep - duration of one simulation step in femtoseconds (default: 0.1fs)public void setInitialTemperature(double temperature)
temperature - temperature in Kelvinspublic void setSamplingStart(double sampstart)
sampstart - number of first trajectory frame to be savedpublic void setSamplingInterval(double sampinterval)
sampinterval - trajectory sampling interval in femtosecondspublic void setCenterMolecule(boolean centerMolecule)
centerMolecule - is the molecule will be centeredpublic void setProgressMonitor(MProgressMonitor pmon)
run() to display progress
status. Short calculations may ignore the observer object. The default
implementation does nothing.setProgressMonitor in class CalculatorPluginpmon - is the progress monitor, may be nullpublic String getProductName()
LicenseManager.getProductName in class CalculatorPluginLicenseManager.CONFORMATION_PLUGIN_GROUPpublic void setParameters(Properties params) throws PluginException
setParameters in class CalculatorPluginparams - is the parameter tablePluginException - on errorpublic 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. Returns true if parameter "single" is set to
"false", false otherwise (default: false).handlesMultiFragmentMolecules in class CalculatorPluginpublic void checkMolecule(Molecule mol) throws PluginException
RxnMolecule or if the molecule contains
R-groups.checkMolecule in class CalculatorPluginmol - is the input moleculePluginException - with error message for the user if the
molecule is refusedprotected void setInputMolecule(Molecule mol) throws PluginException
setInputMolecule in class CalculatorPluginmol - is the input moleculePluginException - on errorpublic boolean run()
throws PluginException
run in class CalculatorPluginPluginException - on errorCalculatorPlugin.getErrorMessage()public chemaxon.marvin.plugin.PluginMDocSource getResultSource()
throws PluginException
getResultSource in class CalculatorPluginPluginException - on errorpublic int getStructureCount()
public Molecule getStructure(int index) throws PluginException
index - is the structure indexPluginExceptionpublic Molecule[] getStructures() throws PluginException
PluginExceptionpublic Object[] getResultTypes()
getResultTypes in class CalculatorPluginpublic int getResultDomain(Object type)
getResultDomain in class CalculatorPlugintype - is the result typegetResultTypes()public int getResultCount(Object type)
getResultCount in class CalculatorPlugintype - is the result typegetResultTypes()public Object getResult(Object type, int index) throws PluginException
getResult in class CalculatorPlugintype - is the result typeindex - is the result indexPluginException - if the result cannot be returnedCalculatorPlugin.getResultTypes()public String getResultAsString(Object type, int index, Object result) throws PluginException
getResultAsString in class CalculatorPlugintype - is the result typeindex - is the result indexresult - is the result itemPluginException - if an invalid result item is givenpublic void standardize(Molecule mol)
standardize in class CalculatorPluginmol - is the molecule to be standardized