chemaxon.marvin.calculations
Class MolecularDynamicsPlugin

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

public class MolecularDynamicsPlugin
extends CalculatorPlugin

Molecular Dynamics plugin.

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

Since:
Marvin 4.1, 05/11/2006
Version:
5.0, 11/05/2007
Author:
Imre Jakli, Zsolt Mohacsi

Field Summary
 
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
MolecularDynamicsPlugin()
          Creates a new instance of MolecularDynamicsPlugin
 
Method Summary
 void checkMolecule(Molecule mol)
          Checks the input molecule.
 java.lang.Object getResult(java.lang.Object type, int index)
          Returns the result item for the specified key and index.
 java.lang.String getResultAsString(java.lang.Object type, int index, java.lang.Object result)
          Returns the specified result in String format.
 int getResultCount(java.lang.Object type)
          Returns the number of result items for the given result key.
 int getResultDomain(java.lang.Object type)
          Returns the calculation domain.
 chemaxon.marvin.plugin.PluginMDocSource getResultSource()
          Returns the result as a document source object.
 java.lang.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 isLicensed()
          Returns true if the plugin is licensed.
 boolean run()
          Runs the tool.
 void setCenterMolecule(boolean centerMolecule)
          Center the molecule before MD calculation (It is not set by default
 void setForceField(java.lang.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(java.lang.String integrator)
          Sets the integrator used for calculations.
 void setParameters(java.util.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
 
Methods inherited from class chemaxon.marvin.plugin.CalculatorPlugin
checkType, containsCoordinateBond, containsMulticenterSgroup, containsPseudoAtom, containsSRUSgroup, create, createModifiedInputMolecule, createStandardizedMolecule, createStandardizedMolecule, dehydrogenize, format, format, format, format, getAtomCount, getAtomIndex, getCalcMolecule, getDisplayMolecule, getDocument, getDoublePrecision, getErrorMessage, getInputMolDim, getMainMolecule, getpH, getPluginResource, getRemark, getResult, getResult, getResult, getResultAsRGB, getResultAsRGB, getResultAsString, getResultCount, getResultDomain, getResultMessage, getResultMolecule, getResultMolecules, getResultsAsRGB, getResultsAsRGB, getResultsAsString, getResultsAsString, getTypeString, getWarningMessage, isInputMoleculeAromatized, isMsCalc, isMultiThreadedRunEnabled, isNegligibleResult, isOK, isRgrouped, loadClass, readAttribute, removeWhitespace, setDoublePrecision, setDoublePrecision, setDoublePrecision, setLicenseEnvironment, setMolecule, setMolecule, setMolecule, standardize, standardizeIonicGroups, standardizeNeutralGroups
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MolecularDynamicsPlugin

public MolecularDynamicsPlugin()
Creates a new instance of MolecularDynamicsPlugin

Method Detail

setForceField

public void setForceField(java.lang.String forcefield)
Sets the force field type

Parameters:
forcefield - force field type possible values: "dreiding", (default: "dreiding")

setIntegrator

public void setIntegrator(java.lang.String integrator)
Sets the integrator used for calculations.

Parameters:
integrator - integrator type possible values: "positionverlet","velocityverlet","leapfrog","projectedvelocityverlet" (default: "velocityverlet")

setStepNumber

public void setStepNumber(int stepno)
Sets the number of simulation steps.

Parameters:
stepno - number of simulation steps (default: 1000)

setStepTime

public void setStepTime(double timestep)
Sets the simulation timestep

Parameters:
timestep - duration of one simulation step in femtoseconds (default: 0.1fs)

setInitialTemperature

public void setInitialTemperature(double temperature)
Sets the initial temperature

Parameters:
temperature - temperature in Kelvins (default: 300K)

setSamplingStart

public void setSamplingStart(double sampstart)
Sets the beginning of trajectory sampling

Parameters:
sampstart - number of first trajectory frame to be saved

setSamplingInterval

public void setSamplingInterval(double sampinterval)
Number of trajectory frames to be stored from the sampling start time to the end of calculation.

Parameters:
sampinterval - trajectory sampling interval in femtoseconds

setCenterMolecule

public void setCenterMolecule(boolean centerMolecule)
Center the molecule before MD calculation (It is not set by default

Parameters:
centerMolecule - is the molecule will be centered

setProgressMonitor

public void setProgressMonitor(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

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. Parameters:

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

handlesMultiFragmentMolecules

public boolean handlesMultiFragmentMolecules()
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. Returns true if parameter "single" is set to "false", false otherwise (default: false).

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

checkMolecule

public void checkMolecule(Molecule mol)
                   throws PluginException
Checks the input molecule. Throws exception if the molecule is RxnMolecule or if the 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

setInputMolecule

protected void setInputMolecule(Molecule mol)
                         throws PluginException
Sets the input molecule.

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

run

public boolean run()
            throws PluginException
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()

getResultSource

public chemaxon.marvin.plugin.PluginMDocSource getResultSource()
                                                        throws PluginException
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:
getResultSource in class CalculatorPlugin
Returns:
the document source interface
Throws:
PluginException - on error
Since:
Marvin 5.0

getStructureCount

public int getStructureCount()
Returns the number of different structures.

Returns:
the number of different structures

getStructure

public Molecule getStructure(int index)
                      throws PluginException
Returns a structure.

Parameters:
index - is the structure index
Returns:
the structure
Throws:
PluginException

getStructures

public Molecule[] getStructures()
                         throws PluginException
Returns all structures.

Returns:
all structures
Throws:
PluginException

getResultTypes

public java.lang.Object[] getResultTypes()
Returns the result types.

Overrides:
getResultTypes in class CalculatorPlugin
Returns:
the result types

getResultDomain

public int getResultDomain(java.lang.Object type)
Returns the calculation domain.

Overrides:
getResultDomain in class CalculatorPlugin
Parameters:
type - is the result type
Returns:
the calculation domain
See Also:
getResultTypes()

getResultCount

public int getResultCount(java.lang.Object type)
Returns the number of result items for the given result key.

Overrides:
getResultCount in class CalculatorPlugin
Parameters:
type - is the result type
Returns:
the number of result items
See Also:
getResultTypes()

getResult

public java.lang.Object getResult(java.lang.Object type,
                                  int index)
                           throws PluginException
Returns the result item for the specified key and index.

Overrides:
getResult in class CalculatorPlugin
Parameters:
type - is the result type
index - is the result index
Returns:
the result item for the specified key and index
Throws:
PluginException - if the result cannot be returned
See Also:
CalculatorPlugin.getResultTypes()

getResultAsString

public java.lang.String getResultAsString(java.lang.Object type,
                                          int index,
                                          java.lang.Object result)
                                   throws PluginException
Returns the specified result in String format.

Overrides:
getResultAsString in class CalculatorPlugin
Parameters:
type - is the result type
index - is the result index
result - is the result item
Returns:
the specified result in String format
Throws:
PluginException - if an invalid result item is given