Trjconv

Module

viennaptm.gromacs.trjconv
class Trjconv(structure: Path, tpr: Path, output_pdb: Path, **kwargs)

Bases: GromacsCommand

Wrapper for the GROMACS trjconv trajectory conversion command.

This class converts a structure or trajectory file to PDB format using a provided run input file (.tpr). By default, the first index group is selected via standard input.

Parameters:
  • structure (pathlib.Path) – Input structure or trajectory file.

  • tpr (pathlib.Path) – Run input file used for atom and topology information.

  • output_pdb (pathlib.Path) – Output structure file in PDB format.

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

build_gromacs_cmd()

Construct the gmx trjconv command invocation.

The command converts the input structure or trajectory to PDB format using topology information from the .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 PDB output file path.

Return type:

list[pathlib.Path]

Methods

__init__(structure, tpr, output_pdb, **kwargs)

Initialize a GROMACS command wrapper.

build_command()

Build the full command invocation.

build_gromacs_cmd()

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