Trees | Indices | Help |
|
---|
|
object --+ | utilities.FileUtils --+ | MDrunner
A class to manage running :program:`mdrun` in various ways. In order to do complicated multiprocessor runs with mpiexec or similar you need to derive from this class and override - :attr:`MDrunner.mdrun` with the path to the ``mdrun`` executable - :attr:`MDrunner.mpiexec` with the path to the MPI launcher - :meth:`MDrunner.mpicommand` with a function that returns the mpi command as a list In addition there are two methods named :meth:`prehook` and :meth:`posthook` that are called right before and after the process is started. If they are overriden appropriately then they can be used to set up a mpi environment.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from |
|
|||
mdrun =
path to the :program:`mdrun` executable (or the name if it can be found on :envvar:`PATH`) |
|||
mpiexec = None path to the MPI launcher (e.g. |
|||
Inherited from |
|
|||
Inherited from |
|
|||
Inherited from |
|
Set up a simple run with ``mdrun``. :Keywords: *dirname* Change to this directory before launching the job. Input files must be supplied relative to this directory. *keywords* All other keword arguments are used to construct the :class:`~gromacs.tools.mdrun` commandline. Note that only keyword arguments are allowed.
|
Returns simple command line to invoke mdrun. If :attr:`mpiexec` is set then :meth:`mpicommand` provides the mpi launcher command that prefixes the actual ``mdrun`` invocation: :attr:`mpiexec` [*mpiargs*] :attr:`mdrun` [*mdrun-args*] The *mdrun-args* are set on initializing the class. Override :meth:`mpicommand` to fit your system if the simple default OpenMP launcher is not appropriate. |
Return a list of the mpi command portion of the commandline.
(This is a primitive example for OpenMP. Override it for more complicated cases.) |
Execute the mdrun command (possibly as a MPI command) and run the simulation. :Keywords: *pre* a dictionary containing keyword arguments for the :meth:`prehook` *post* a dictionary containing keyword arguments for the :meth:`posthook` *mpiargs* keyword arguments that are processed by :meth:`mpicommand` |
Run :program:`mdrun` and check if run completed when it finishes. This works by looking at the mdrun log file for 'Finished mdrun on node'. It is useful to implement robust simulation techniques. :Arguments: *kwargs* are keyword arguments that are passed on to :meth:`run` (typically used for mpi things) :Returns: - ``True`` if run completed successfully - ``False`` otherwise |
Check if :program:`mdrun` finished successfully. (See :func:`check_mdrun_success` for details) |
|
mpiexecpath to the MPI launcher (e.g. :program:`mpiexec`)
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sat Jun 12 15:59:36 2010 | http://epydoc.sourceforge.net |