qp.cluster.spheres.complete_oligomer

qp.cluster.spheres.complete_oligomer(ligand_keys, model, residues, spheres, include_ligands)[source]

Ensure that partially included oligomeric ligands are fully added.

If any residue of a multi-residue ligand (oligomer) is present in the extracted spheres, all remaining residues of that oligomer are added to avoid unpredictable charge errors.

Parameters:
  • ligand_keys (iterable of str) – Ligand charge dictionary keys (space-separated for oligomers).

  • model (Bio.PDB.Model.Model) – Full protein structure model.

  • residues (set) – Current set of extracted residues (modified in place).

  • spheres (list of set) – Sphere-separated residue sets (modified in place).

  • include_ligands (int) – Ligand inclusion level (0 = first sphere only, 1 = non-water, 2 = all).