qp.cluster.spheres.residue_in_ligands¶
- qp.cluster.spheres.residue_in_ligands(resname, resid, res_is_aa, ligand_keys)[source]¶
Check whether a residue matches any key in the ligand charge dictionary.
For amino acids, an exact key match is required. For non-amino-acid residues, the key may be part of a space-separated oligomer key.
- Parameters:
resname (str) – Three-letter residue name.
resid (tuple) – Residue full ID tuple from BioPython.
res_is_aa (bool) – Whether the residue is an amino acid.
ligand_keys (iterable of str) – Ligand charge dictionary keys.
- Returns:
True if the residue matches a ligand key.
- Return type:
bool