Converge on gmxapi Context as the only way to manage running a simulation
There are currently three ways to manage running a simulation within the current source:
- by invoking a
gmxapi::Workflow
on agmxapi::Context
- by calling
gmx mdrun
- by using
gmx::test::SimulationRunner
in the mdrun integration tests
There's noteworthy duplication between the first and both of the subsequent two. Having to consider all three use cases complicates #3688 (closed) because responsibility for initializing MPI libraries is handled in three places. Likewise #3768 (closed) needs similar changes in three places.
In the long term, we should use only one way to run a simulation. Simplest and most generalizable is to re-use the gmxapi implementation for the other two. That prepares for re-using some of the infrastructure currently used for testing to provide capabilities to the user also via the API.
Tasks have been identified to achieve this:
-
Discuss with nblib any efforts to re-use or further de-duplicate -
Make gmx::test::SimulationRunner
use agmxapi::Context
to run mdrun -
Identify an approach that lets gmx::test::SimulationRunner
call grompp -
Make gmx::test::SimulationRunner
use that approach to call grompp -
Understand whether the apparent need to broadcast gmx
command-line arguments before invokinggmx_mdrun
can be resolved within the approach ofgmxapi::Context
-
Have gmx
infrastructure implementgmx mdrun
by creating agmxapi::Context
and transforming the command-line arguments to agmxapi::Workflow
-
Move sole responsibility for MPI library initialization to gmxapi::Context
(see also #3688 (closed)) -
Eliminate any superseded infrastructure, e.g. gmx::init()/finalize()