qp.structure.setup.parse_input

qp.structure.setup.parse_input(input, output, center_yaml_residues)[source]

Parse input sources and determine center residues for each structure.

Processes the user-provided input (PDB codes, file paths, or CSV) and determines the center residue definitions from either the CSV center column or the YAML center_residues parameter.

Parameters:
  • input (str or list) – Input specification: PDB code(s), path to PDB file(s), or path to CSV.

  • output (str) – Path to the output directory.

  • center_yaml_residues (list) – Center residue definitions from the YAML config file.

Returns:

(pdb_all, center_residues) where pdb_all is a list of (pdb_id, pdb_path) tuples and center_residues is a list of center definition strings.

Return type:

tuple of (list, list)

Raises:

SystemExit – If no center residues are provided in either the CSV or YAML.