haddock.libs.libligand module
Ligand topology utilities.
- haddock.libs.libligand.identify_unknown_hetatms(pdb_file: str | Path) list[str][source]
Return residue names in a PDB that are not in the supported residues.
- Parameters:
pdb_file (FilePath) – Path to the PDB file to inspect.
- Returns:
list[str] – Unique residue names not found in the supported residues set, in order of first appearance.
- haddock.libs.libligand.run_prodrg(pdb_file: str | Path, output_dir: str | Path) tuple[Path, Path][source]
Run prodrg on a ligand PDB and write CNS topology and parameter files.
prodrg writes its output to fixed filenames in the current working directory, so the process is executed inside a managed temporary directory that is cleaned up automatically. The resulting files are written to
output_dirnamed after the input PDB stem.- Parameters:
pdb_file (FilePath) – Path to the ligand PDB file.
output_dir (FilePath) – Directory where the named
.topand.paramfiles are written.
- Returns:
tuple[Path, Path] – Paths to the written
<stem>_prodrg.topand<stem>_prodg.paramfiles.- Raises:
RuntimeError – If prodrg exits with a non-zero return code or the expected output files are not created.