Mdrun

Module

viennaptm.gromacs.mdrun
class Mdrun(deffnm: str, **kwargs)

Bases: GromacsCommand

Wrapper for the GROMACS mdrun execution command.

This class runs a molecular dynamics simulation using a prepared run input file (.tpr) identified by a default filename prefix. All standard GROMACS output files are generated using this prefix.

Parameters:
  • deffnm (str) – Default filename prefix for input and output files.

  • kwargs (dict) – Additional keyword arguments forwarded to GromacsCommand.

build_gromacs_cmd()

Construct the gmx mdrun command invocation.

The command uses the default filename prefix to locate the input .tpr file and generate all simulation output files.

Returns:

Command-line argument list suitable for execution.

Return type:

list[str]

expected_outputs()

Declare the primary output files expected from the simulation.

The output structure file (.gro) is resolved relative to the working directory if one is configured.

Returns:

List containing the generated output structure file path.

Return type:

list[pathlib.Path]

Methods

__init__(deffnm, **kwargs)

Initialize a GROMACS command wrapper.

build_command()

Build the full command invocation.

build_gromacs_cmd()

Construct the gmx mdrun command invocation.

expected_outputs()

Declare the primary output files expected from the simulation.

inspect_result(result)

Inspect command output for fatal GROMACS errors.

mpi_prefix()

Construct the MPI command prefix.

post_run_checks()

Verify that expected output files were created.

run()

Execute the GROMACS command.