peppr.dockq#

peppr.dockq(reference_receptor: AtomArray, reference_ligand: AtomArray, pose_receptor: AtomArray | AtomArrayStack, pose_ligand: AtomArray | AtomArrayStack, as_peptide: bool = False) DockQ[source]#

Compute DockQ for a single pair of receptor and ligand in both, the pose and reference structure.

Parameters:
reference_receptor, reference_ligandAtomArray

The reference receptor and ligand.

pose_receptor, pose_ligandAtomArray or AtomArrayStack

The pose receptor and ligand. Multiple poses can be provided.

as_peptidebool

If set to true, the chains are treated as CAPRI peptides.

Returns:
DockQ

The DockQ result. If multiple poses are provided, the DockQ attributes are arrays.

Notes

If the ligand is a small molecule, an associated BondList is required in pose_ligand and reference_ligand for mapping the atoms between them.

Examples

Single chains as expected as input.

>>> pose_receptor = pose_complex[pose_complex.chain_id == "C"]
>>> pose_ligand = pose_complex[pose_complex.chain_id == "B"]
>>> reference_receptor = reference_complex[reference_complex.chain_id == "C"]
>>> reference_ligand = reference_complex[reference_complex.chain_id == "B"]
>>> dockq_result = dockq(pose_receptor, pose_ligand, reference_receptor, reference_ligand)
>>> print(f"{dockq_result.fnat:.2f}")
0.50
>>> print(f"{dockq_result.irmsd:.2f}")
2.10
>>> print(f"{dockq_result.lrmsd:.2f}")
8.13
>>> print(f"{dockq_result.score:.2f}")
0.45