Grompp

Module

viennaptm.gromacs.grompp
class Grompp(mdp: Path, structure: Path, topology: Path, tpr: Path, **kwargs)

Bases: GromacsCommand

Wrapper for the GROMACS grompp preprocessor command.

This command preprocesses a molecular dynamics parameter file, structure, and topology to generate a binary run input file (.tpr) for subsequent simulation steps.

Common warnings are tolerated by allowing a fixed maximum number of warnings during preprocessing.

Parameters:
  • mdp (pathlib.Path) – Path to the molecular dynamics parameter (MDP) file.

  • structure (pathlib.Path) – Path to the input structure file (e.g. .gro).

  • topology (pathlib.Path) – Path to the topology file (e.g. .top).

  • tpr (pathlib.Path) – Path to the output binary run input file (.tpr).

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

build_gromacs_cmd()

Construct the gmx grompp command invocation.

This method assembles the command-line arguments required to preprocess input files and generate a .tpr file.

Returns:

Command-line argument list suitable for execution.

Return type:

list[str]

expected_outputs()

Declare the files expected to be generated by this command.

Returns:

List containing the generated .tpr file path.

Return type:

list[pathlib.Path]

Methods

__init__(mdp, structure, topology, tpr, **kwargs)

Initialize a GROMACS command wrapper.

build_command()

Build the full command invocation.

build_gromacs_cmd()

Construct the gmx grompp command invocation.

expected_outputs()

Declare the files expected to be generated by this command.

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.