ProteinMotion
Reference navigation
On this page

match_structures

Pair chains, residues, ligands, and atoms of two structures of the same protein.

python
from proteinmotion import match_structures

Signature

python
match_structures(source, target, *, chains=None)

Parameters

ParameterDefaultDescription
sourceRequiredFirst structure.
targetRequiredSecond structure.
chainskeyword onlyNoneSource-to-target chain ID mapping; None pairs chains by ID and sequence, and identical copies by position.

Returns: StructureMatch

Example and output

Run this command from a repository checkout.

Code Render command
bash
proteinmotion render examples/structure_morph.py HemoglobinMorph \
  -o hemoglobin-morph.mp4 --fps 60
Output Preview · 17.7 s · 60 fps
Hemoglobin from T to R

Deoxyhemoglobin (2DN2) morphs to oxyhemoglobin (2DN1, expanded to its tetramer), superposed on α1β1. α2β2 turns 14° in the image plane while O₂ appears at each heme. A heatmap shows Cα–Cα distances changing between the αβ dimers but not within them. The path illustrates the difference between the two structures.