Reference navigation
On this page
StructureMatch
Atom correspondence between two structures, with the residue and chain pairs behind it and the rigid core they share.
from proteinmotion import StructureMatchConstructor
StructureMatch(
source_atoms: np.ndarray,
target_atoms: np.ndarray,
residue_pairs: list=field(default_factory=list),
chain_pairs: list=field(default_factory=list),
core: np.ndarray=field(default_factory=lambda: np.empty(0, dtype=int)),
core_rmsd: float=float('nan'),
)Parameters
| Parameter | Default | Description |
|---|---|---|
source_atomsnp.ndarray | Required | Matched source atom indices. |
target_atomsnp.ndarray | Required | Target atom indices, one per source atom. |
residue_pairslist | field(default_factory=list) | Matched (source, target) topology residue indices, including ligands. |
chain_pairslist | field(default_factory=list) | (source chain, target chain, sequence identity) for each paired chain. |
corenp.ndarray | field(default_factory=lambda: np.empty(0, dtype=int)) | Source Cα/C4′ atom indices of the rigid core: matched trace atoms that superpose within 2 Å after pruning the worst pairs and refitting. StructureMorph and domain_motion superpose on it by default. |
core_rmsdfloat | float('nan') | Root-mean-square deviation of the rigid core after superposition, in Å. |
Attributes
| Name | Description |
|---|---|
source_atoms | Matched source atom indices. |
target_atoms | Target atom indices, one per source atom. |
residue_pairs | Matched (source, target) topology residue indices, including ligands. |
chain_pairs | (source chain, target chain, sequence identity) for each paired chain. |
core | Source Cα/C4′ atom indices of the rigid core: matched trace atoms that superpose within 2 Å after pruning the worst pairs and refitting. StructureMorph and domain_motion superpose on it by default. |
core_rmsd | Root-mean-square deviation of the rigid core after superposition, in Å. |
Example and output
Run this command from a repository checkout.
Code Render command
proteinmotion render examples/structure_morph.py HemoglobinMorph \
-o hemoglobin-morph.mp4 --fps 60Output Preview · 17.7 s · 60 fps
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.
Methods and properties
| Name | Description |
|---|---|
| reportproperty | Chain pairs with sequence identity, counts of matched residues and atoms, and the rigid core. |
StructureMatch.reportChain pairs with sequence identity, counts of matched residues and atoms, and the rigid core.