rgpycrumbs.geom.api.alignment¶
Attributes¶
Classes¶
Encapsulates the raw arrays required for an IRA graph match. |
|
Encapsulates the transformation outputs from the IRA algorithm. |
|
Configuration parameters for the Iterative Rotations and Alignment. |
|
Tracks which algorithm was successfully applied. |
|
Container for alignment outputs. |
Functions¶
|
Performs the low-level IRA isomorphism and affine transformation. |
|
Aligns a mobile structure to a reference using IRA with an ASE fallback. |
Module Contents¶
- class rgpycrumbs.geom.api.alignment.IRAMatchInputs[source]¶
Encapsulates the raw arrays required for an IRA graph match.
- ref_numbers: numpy.ndarray[source]¶
- ref_positions: numpy.ndarray[source]¶
- mobile_numbers: numpy.ndarray[source]¶
- mobile_positions: numpy.ndarray[source]¶
- class rgpycrumbs.geom.api.alignment.IRAMatchResults[source]¶
Encapsulates the transformation outputs from the IRA algorithm.
- rotation: numpy.ndarray[source]¶
- translation: numpy.ndarray[source]¶
- permutation: numpy.ndarray[source]¶
- class rgpycrumbs.geom.api.alignment.IRAConfig[source]¶
Configuration parameters for the Iterative Rotations and Alignment.
- class rgpycrumbs.geom.api.alignment.AlignmentMethod(*args, **kwds)[source]¶
Bases:
enum.EnumTracks which algorithm was successfully applied.
- class rgpycrumbs.geom.api.alignment.AlignmentResult[source]¶
Container for alignment outputs.
- Parameters:
atoms – The aligned structure (modified in-place, but returned for chaining).
method – The specific algorithm that was used.
- method: AlignmentMethod[source]¶
- rgpycrumbs.geom.api.alignment._apply_ira_alignment(ref_atoms: ase.Atoms, mobile_atoms: ase.Atoms, config: IRAConfig) bool[source]¶
Performs the low-level IRA isomorphism and affine transformation.
This function modifies mobile_atoms in-place. It returns True if the alignment succeeds, or False if an error occurs or IRA remains unavailable.
- rgpycrumbs.geom.api.alignment.align_structure_robust(ref_atoms: ase.Atoms, mobile_atoms: ase.Atoms, ira_config: IRAConfig) AlignmentResult[source]¶
Aligns a mobile structure to a reference using IRA with an ASE fallback.
This method minimizes the RMSD between the reference and mobile structures. It first attempts to solve the isomorphism problem (finding $P, R, t$) using IRA. If IRA fails or remains unavailable, it defaults to standard Procrustes superimposition (finding $R, t$) via ASE.
- Parameters:
ref_atoms – The fixed reference configuration.
mobile_atoms – The configuration to align (modified in-place).
ira_config – Configuration object with state of IRA and the adjacency cutoff distance for IRA graph matching.
- Returns:
An AlignmentResult.