Prepare Protein¶
Protein preparation module for the Rush Python client.
This module supports system preparation workflows such as converting PDB inputs to TRC, protonating and optimizing hydrogen positions, and augmenting structures with connectivity and formal charge information before downstream calculations.
- rush.prepare_protein.prepare_protein(input_path, ph=None, naming_scheme=None, capping_style=None, truncation_threshold=None, debump=None, run_spec=RunSpec(), run_opts=RunOpts(), collect=False)[source]¶
Run prepare-protein on a PDB or TRC file and return the separate T, R, and C files.
- rush.prepare_protein.save_outputs(res)[source]¶
Download output files from a prepare-protein run.
The prepare-protein rex computation returns a list/tuple of 3 VirtualObject dicts (topology, residues, chains files). This function downloads each file and returns Path objects that can be used with from_json().
If collect=False was used, the input will be a run ID string, which is returned as-is for later collection by the caller.
- Parameters:
res (dict | list | tuple | str | RunError) – Either: - A run ID string (if collect=False was used) - A list/tuple of 3 VirtualObject dicts from collect_run() - A RunError Each VirtualObject dict has keys: ‘path’, ‘size’, ‘format’.
- Returns:
A run ID string (if input was a run ID)
Tuple of 3 downloaded file Paths (if input was VirtualObject list)
RunError if input is an error
- Return type:
Either