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
- by calling
- by using
gmx::test::SimulationRunnerin 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
gmxapi::Contextto run mdrun
Identify an approach that lets
gmx::test::SimulationRunneruse that approach to call grompp
Understand whether the apparent need to broadcast
gmxcommand-line arguments before invoking
gmx_mdruncan be resolved within the approach of
gmx mdrunby creating a
gmxapi::Contextand transforming the command-line arguments to a
Move sole responsibility for MPI library initialization to
gmxapi::Context(see also #3688 (closed))
Eliminate any superseded infrastructure, e.g.