peppr.get_contact_residues#

peppr.get_contact_residues(receptor: AtomArray, ligand: AtomArray, cutoff: float, receptor_mask: ndarray[tuple[int, ...], dtype[int64]] | None = None, ligand_mask: ndarray[tuple[int, ...], dtype[int64]] | None = None) ndarray[tuple[int, ...], dtype[int64]][source]#

Get a set of tuples containing the residue IDs for each contact between receptor and ligand.

Parameters:
receptor, ligandAtomArray, shape=(p,)

The receptor.

ligandAtomArray, shape=(q,)

The ligand.

cutofffloat

The distance cutoff for contact.

receptor_maskndarray, shape=(p,), dtype=bool, optional

A mask that is True for atoms in receptor that should be considered. If None, all atoms are considered.

ligand_maskndarray, shape=(q,), dtype=bool, optional

A mask that is True for atoms in ligand that should be considered. If None, all atoms are considered.

Returns:
ndarray, shape=(n,2), dtype=int

Each row represents a contact between receptor and ligand. The first column contains the starting atom index of the receptor residue, the second column contains the starting atom index of the ligand residue.