ProteinMotion
Reference navigation
On this page

match_backbones

Find the largest ordered residue match under a contact-error limit.

python
from proteinmotion import match_backbones

Signature

python
match_backbones(
    source,
    target,
    *,
    source_chain=None,
    target_chain=None,
    cutoff=8.0,
    softness=1.5,
    max_contact_error=0.3,
    search_seconds=8.0,
    max_candidates=6000,
)

Parameters

ParameterDefaultDescription
sourceRequiredSource Protein.
targetRequiredDestination Protein.
source_chainkeyword onlyNoneSource chain ID; select one chain with protein Cα or nucleotide C1′ anchors.
target_chainkeyword onlyNoneTarget chain ID; select one chain with protein Cα or nucleotide C1′ anchors.
cutoffkeyword only8.0Distance cutoff in ångströms.
softnesskeyword only1.5Fraction of the window used for its fading edge, in (0, 1].
max_contact_errorkeyword only0.3Maximum discrepancy between matched soft contacts, in [0, 1].
search_secondskeyword only8.0Branch-and-bound time budget in seconds; preparation is additional.
max_candidateskeyword only6000Candidate correspondence limit; None searches all candidates up to the safety limit.

Returns: ContactMatch

Notes

Uses Cα for proteins and C1′ for DNA/RNA. Each input selects one chain with at least three anchors of the same type. Missing anchors are skipped. For equal-sized matches, the search minimizes contact-map discrepancy. Check the report for full-space, candidate-restricted, or time-limited optimality. The shorter chain supports at most 800 anchored residues; full candidate search supports at most 30,000 pairings. Reports include the anchor atom names, counts, and aligned_anchor_rmsd_angstrom.

Example and output

Run this command from a repository checkout.

Code Render command
bash
proteinmotion render examples/backbone_morph.py BackboneDemo \
  -o morph.mp4 --fps 60
Output Preview · 11.5 s · 30 fps
Calmodulin to troponin C morph

A contact-map match selects 114 Cα pairs. Matched residues move in sequence from N to C; unmatched residues fade out or in.