rgpycrumbs.geom

Submodules

Attributes

Classes

DetectionMethod

Available detection methodologies.

Functions

build_graph_and_find_components(→ tuple[int, ...)

Identify connected components using direct CSR sparse matrix construction.

find_fragments_bond_order(→ tuple[int, numpy.ndarray, ...)

Analyze connectivity via the Wiberg Bond Order (WBO) matrix.

find_fragments_geometric(→ tuple[int, numpy.ndarray])

Detect molecular fragments using scaled covalent radii.

merge_fragments_by_distance(→ tuple[int, numpy.ndarray])

Merges fragments with geometric centers closer than the specified distance.

Package Contents

rgpycrumbs.geom.DEFAULT_BOND_MULTIPLIER = 1.2[source]
rgpycrumbs.geom.DEFAULT_BOND_ORDER_THRESHOLD = 0.8[source]
class rgpycrumbs.geom.DetectionMethod[source]

Bases: enum.StrEnum

Available detection methodologies.

Added in version 0.0.6.

GEOMETRIC = 'geometric'
BOND_ORDER = 'bond-order'
rgpycrumbs.geom.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.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.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.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.