Prepare Complex

Protein-ligand complex preparation module for the Rush Python client.

This module builds on the protein preparation workflow to prepare complexes by extracting ligands from PDB inputs, adding hydrogens, and merging ligand data with prepared protein TRC data for downstream computations.

rush.prepare_complex.prepare_complex(input_path, ligand_names, ph=None, naming_scheme=None, capping_style=None, truncation_threshold=None, debump=None, run_spec=RunSpec(), run_opts=RunOpts(), collect=False)[source]

Prepare a protein-ligand complex by running prepare-protein and merging with ligand data.

Parameters:
  • input_path (Path | str) – Path to input PDB or TRC file

  • ligand_names (list[str]) – List of ligand residue names to extract

  • ph (float | None) – pH for protonation (optional)

  • naming_scheme (Literal['AMBER', 'CHARMM'] | None) – Atom naming scheme (‘AMBER’ or ‘CHARMM’)

  • capping_style (Literal['never', 'truncated', 'always'] | None) – Style for capping terminal residues

  • truncation_threshold (int | None) – Distance threshold for truncating chains

  • debump (bool | None) – Whether to perform debumping

  • run_spec (RunSpec) – Run specification for the preparation job

  • run_opts (RunOpts) – Run options

  • collect – If True, collects results and returns merged TRC. If False, returns run ID.

Returns:

Merged TRC containing prepared protein and ligand - If collect=False: Run ID string for the prepare-protein job - RunError if preparation fails

Return type:

  • If collect=True