rgpycrumbs.geom.fragments¶
Core fragment detection algorithms for molecular systems.
Provides geometric (scaled covalent radii) and bond-order (GFN2-xTB) based fragment detection, plus distance-based fragment merging.
Added in version 0.0.6.
Attributes¶
Classes¶
Backport for Python 3.10. |
|
Available detection methodologies. |
Functions¶
|
Detect molecular fragments using scaled covalent radii. |
|
Analyze connectivity via the Wiberg Bond Order (WBO) matrix. |
|
Identify connected components using direct CSR sparse matrix construction. |
|
Merges fragments with geometric centers closer than the specified distance. |
Module Contents¶
- class rgpycrumbs.geom.fragments.DetectionMethod[source]¶
Bases:
enum.StrEnumAvailable detection methodologies.
Added in version 0.0.6.
- rgpycrumbs.geom.fragments.find_fragments_geometric(atoms: ase.atoms.Atoms, bond_multiplier: float, radius_type: str = 'natural') tuple[int, numpy.ndarray][source]¶
Detect molecular fragments using scaled covalent radii.
Added in version 0.0.6.
- rgpycrumbs.geom.fragments.find_fragments_bond_order(atoms: ase.atoms.Atoms, threshold: float, charge: int, multiplicity: int, method: str = 'GFN2-xTB') tuple[int, numpy.ndarray, numpy.ndarray, numpy.ndarray][source]¶
Analyze connectivity via the Wiberg Bond Order (WBO) matrix. Calculate electronic structure using the specified xTB level.
Added in version 0.0.6.
- rgpycrumbs.geom.fragments.build_graph_and_find_components(num_atoms: int, row_indices: numpy.ndarray | list[int], col_indices: numpy.ndarray | list[int]) tuple[int, numpy.ndarray][source]¶
Identify connected components using direct CSR sparse matrix construction.
Added in version 0.0.6.
This function avoids Python list overhead by passing interaction indices directly to the SciPy sparse engine.
- rgpycrumbs.geom.fragments.merge_fragments_by_distance(atoms: ase.atoms.Atoms, n_components: int, labels: numpy.ndarray, min_dist: float) tuple[int, numpy.ndarray][source]¶
Merges fragments with geometric centers closer than the specified distance.
Added in version 0.0.6.