Helper functions and classes around gromacs.tools.Mdrun.
A class to manage running mdrun in various ways.
In order to do complicated multiprocessor runs with mpiexec or similar you need to derive from this class and override
In addition there are two methods named prehook() and 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.
Set up a simple run with mdrun.
Keywords : |
|
---|
Check if mdrun finished successfully.
(See check_mdrun_success() for details)
Returns simple command line to invoke mdrun.
If mpiexec is set then mpicommand() provides the mpi launcher command that prefixes the actual mdrun invocation:
The mdrun-args are set on initializing the class. Override mpicommand() to fit your system if the simple default OpenMP launcher is not appropriate.
path to the mdrun executable (or the name if it can be found on PATH)
Return a list of the mpi command portion of the commandline.
(This is a primitive example for OpenMP. Override it for more complicated cases.)
path to the MPI launcher (e.g. mpiexec)
Called directly after the process terminated (also if it failed).
Called directly before launching the process.
Execute the mdrun command (possibly as a MPI command) and run the simulation.
Keywords : |
|
---|
Run 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 run() (typically used for mpi things) |
---|---|
Returns : |
|
Manage running mdrun as an OpenMP multiprocessor job.
Set up a simple run with mdrun.
Keywords : |
|
---|
Manage running mdrun as an OpenMP multiprocessor job (64-bit executable).
Set up a simple run with mdrun.
Keywords : |
|
---|
Manage running mdrun as mpich2 multiprocessor job with the SMPD mechanism.
Set up a simple run with mdrun.
Keywords : |
|
---|
Check if mdrun finished successfully.
Analyses the output from mdrun in logfile. Right now we are simply looking for the line “Finished mdrun on node” in the last 1kb of the file. (The file must be seeakable.)
Arguments : |
|
---|---|
Returns : | True if all ok, False if not finished, and None if the logfile cannot be opened |