PDB2GMX

Module

viennaptm.gromacs.pdb2gmx
class PDB2GMX(params: PDB2GMXParameters, mpi: MPIConfig | None = None, workdir: Path | None = None, stdin: str | None = None, timeout: int | None = None, env: dict | None = None)

Bases: GromacsCommand

Wrapper for the GROMACS pdb2gmx topology generation command.

This command converts a PDB structure into a GROMACS-compatible coordinate file and topology using the provided force-field and water model settings.

Command-line arguments are derived from a PDB2GMXParameters instance.

Parameters:
  • params (PDB2GMXParameters) – Parameter model defining all pdb2gmx options.

  • mpi (MPIConfig or None) – MPI execution configuration.

  • workdir (pathlib.Path or None) – Working directory in which the command is executed.

  • stdin (str or None) – Optional standard input passed to the command.

  • timeout (int or None) – Maximum execution time in seconds.

  • env (dict[str, str] or None) – Environment variables to use for command execution.

build_gromacs_cmd() List[str]

Construct the gmx pdb2gmx command invocation.

Command-line arguments are conditionally assembled based on the values provided in the associated parameter model.

Returns:

Command-line argument list suitable for execution.

Return type:

list[str]

expected_outputs() List[Path]

Declare the files expected to be generated by this command.

Returns:

List containing the generated GRO structure file and topology file.

Return type:

list[pathlib.Path]

Methods

__init__(params[, mpi, workdir, stdin, ...])

Initialize a GROMACS command wrapper.

build_command()

Build the full command invocation.

build_gromacs_cmd()

Construct the gmx pdb2gmx 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.