peppr.find_all_matches#

peppr.find_all_matches(reference: AtomArray, pose: AtomArray, min_sequence_identity: float = 0.95, allow_unmatched_entities: bool = False) Iterator[tuple[AtomArray, AtomArray]][source]#

Find all possible atom mappings between the reference and the pose.

Each mappings gives corresponding atoms between the reference and the pose.

Parameters:
referenceAtomArray, shape=(p,)

The reference structure.

poseAtomArray, shape=(q,)

The pose structure.

min_sequence_identityfloat, optional

The minimum sequence identity between two chains to be considered the same entity.

allow_unmatched_entitiesbool, optional

If set to True, allow entire entities to be unmatched. This is useful if a pose is compared to a reference which may contain different molecules.

Yields:
list of tuple (AtomArray, shape=(p,), AtomArray, shape=(q,))

The input atoms, where the chains and atoms within each chain are brought into the corresponding order. Atoms that are matched between the reference and the pose are annotated with matched=True. All other atoms are annotated with matched=False. This means indexing both structures with matched as boolean mask will return structures with the same number of atoms.

See also

find_optimal_match

More detailed information.

Notes

This functions tries all chain mappings of chain that are the same entity and within each small molecules tries all proper molecule permutations. For larger homomers this can quickly lead to a combinatorial explosion.