rgpycrumbs.geom.analysis

Functions

analyze_structure(→ tuple[numpy.ndarray, ...)

Analyzes an ASE Atoms object to calculate the distance matrix, bond matrix,

Module Contents

rgpycrumbs.geom.analysis.analyze_structure(atoms, covalent_scale: float = 1.2) tuple[numpy.ndarray, numpy.ndarray, list[list[int]], numpy.ndarray, list[tuple[float, str, str, float, float]]][source]

Analyzes an ASE Atoms object to calculate the distance matrix, bond matrix, identify molecular fragments, and calculate inter-fragment distances.

Added in version 1.0.0.

Args:

atoms: The ASE Atoms object to analyze. covalent_scale: A scaling factor applied to the covalent radii to

determine the bonding threshold. A bond is formed if the distance between two atoms is less than or equal to the sum of their covalent radii, multiplied by this factor.

Returns:

A tuple containing: - distance_matrix: A NumPy array representing the pairwise distances

between all atoms in the system.

  • bond_matrix: A NumPy array representing the adjacency matrix of the molecular graph. bond_matrix[i, j] = 1 if atoms i and j are bonded, and 0 otherwise.

  • fragments: A list of lists, where each inner list contains the indices of the atoms belonging to a connected fragment.

  • centroid_distances: A NumPy array of pairwise distances between the centroids of each fragment.

  • corrected_distances: A list of tuples, each containing: (min_dist, symbol_i, symbol_j, covrad_sum, corrected_dist) for each pair of fragments.