| Trees | Indices | Help |
|
|---|
|
|
object --+
|
Simulation
Class that represents one simulation. Analysis capabilities are added via plugins. 1. Set the *active plugin* with the :meth:`Simulation.set_plugin` method. 2. Analyze the trajectory with the active plugin by calling the :meth:`Simulation.run` method. 3. Analyze the output from :meth:`run` with :meth:`Simulation.analyze`; results are stored in the plugin's :attr:`~Worker.results` dictionary. 4. Plot results with :meth:`Simulation.plot`.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
|
plugins Registry for plugins: This dict is central. |
|||
|
default_plugin_name Use this plugin if none is explicitly specified. |
|||
|
|||
|
Inherited from |
|||
|
|||
Set up a Simulation object.
:Keywords:
*sim*
Any object that contains the attributes *tpr*, *xtc*,
and optionally *ndx*
(e.g. :class:`gromacs.cbook.Transformer`). The individual keywrods such
as *xtc* override the values in *sim*.
*tpr*
Gromacs tpr file (**required**)
*xtc*
Gromacs trajectory, can also be a trr (**required**)
*edr*
Gromacs energy file (only required for some plugins)
*ndx*
Gromacs index file
*analysisdir*
directory under which derived data are stored;
defaults to the directory containing the tpr [None]
*plugins* : list
plugin instances or tuples (*plugin class*, *kwarg dict*) or tuples
(*plugin_class_name*, *kwarg dict*) to be used; more can be
added later with :meth:`Simulation.add_plugin`.
|
Add a plugin to the registry.
- If *plugin* is a :class:`Plugin` instance then the
instance is directly registered and any keyword arguments
are ignored.
- If *plugin* is a :class:`Plugin` class object or a
string that can be found in :mod:`gromacs.analysis.plugins`
then first an instance is created with the given keyword
arguments and then registered.
:Arguments:
*plugin* : class or string, or instance
If the parameter is a class then it should have been derived
from :class:`Plugin`. If it is a string then it is taken as a
plugin name in :mod:`gromacs.analysis.plugins` and the
corresponding class is added. In both cases any parameters for
initizlization should be provided.
If *plugin* is already a :class:`Plugin` instance then the kwargs
will be ignored.
*kwargs*
The kwargs are specific for the plugin and should be
described in its documentation.
|
Returns a path under self.analysis_dir, which is guaranteed to exist. Note Parent dirs are created if necessary. |
Raise :exc:`ValueError` if path does not exist. Uses *filetype* in message. |
Set the plugin that should be used by default. If no *plugin_name* is supplied to :meth:`run`, :meth:`analyze` etc. then this will be used. |
The currently active plugin (set with :meth:`Simulation.set_plugin`).
|
Plot all data for the selected plugin::
plot(plugin_name, **kwargs)
:Arguments:
*plugin_name*
name of the plugin to plot data from
*figure*
- ``True``: plot to file with default name.
- string: use this filename (+extension for format)
- ``False``: only display
*kwargs*
arguments for plugin plot function (in many cases
provided by :meth:`gromacs.formats.XVG.plot` and
ultimately by :func:`pylab.plot`)
|
str(x)
|
repr(x)
|
|
|||
default_plugin_nameUse this plugin if none is explicitly specified. Typically set with :meth:`~Simulation.set_plugin`. |
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Sat Jun 12 15:59:34 2010 | http://epydoc.sourceforge.net |