Reference navigation
On this page
CLASS · v0.9.1
ContactMatch
Store an ordered residue correspondence and its search report.
from proteinmotion import ContactMatchConstructor
ContactMatch(
source_indices: np.ndarray,
target_indices: np.ndarray,
report: dict,
source_keys: tuple,
target_keys: tuple,
)Parameters
| Parameter | Default | Description |
|---|---|---|
source_indicesnp.ndarray | Required | Strictly increasing zero-based source topology residue indices. |
target_indicesnp.ndarray | Required | Strictly increasing zero-based target topology residue indices. |
reportdict | Required | Dictionary with matching statistics, search status, and optimality information. |
source_keystuple | Required | Source residue identity tuples stored for validation. |
target_keystuple | Required | Target residue identity tuples stored for validation. |
Notes
Use match_backbones() or from_pairs() to create a correspondence. Both residue-index arrays are read-only. save() and load() preserve correspondence and validation identities.
Attributes
| Name | Description |
|---|---|
source_indices | Strictly increasing zero-based source topology residue indices. |
target_indices | Strictly increasing zero-based target topology residue indices. |
report | Dictionary with matching statistics, search status, and optimality information. |
source_keys | Source residue identity tuples stored for validation. |
target_keys | Target residue identity tuples stored for validation. |
Methods and properties
| Name | Description |
|---|---|
| from_pairs()class method | Create an explicit correspondence from at least three increasing residue-index pairs. |
| load()class method | Load a saved JSON correspondence. BackboneMorph validates it against the structures. |
| save()method | Save residue correspondences, identities, and the report as JSON. |
ContactMatch.from_pairs(source, target, source_indices, target_indices)Create an explicit correspondence from at least three increasing residue-index pairs.
| Parameter | Default | Description |
|---|---|---|
source | Required | Source Protein. |
target | Required | Object to animate or use as a destination. The supported object type depends on the operation. |
source_indices | Required | Strictly increasing zero-based source topology residue indices. |
target_indices | Required | Strictly increasing zero-based target topology residue indices. |
Returns: ContactMatch
ContactMatch.load(path)Load a saved JSON correspondence. BackboneMorph validates it against the structures.
| Parameter | Default | Description |
|---|---|---|
path | Required | Input or output file path, as specified by the operation. |
Returns: ContactMatch
ContactMatch.save(path)Save residue correspondences, identities, and the report as JSON.
| Parameter | Default | Description |
|---|---|---|
path | Required | Input or output file path, as specified by the operation. |
Returns: None