rgpycrumbs.geom.detect_fragments

Detects molecular fragments in coordinate files using two distinct methodologies: 1. Geometric: Utilizes scaled covalent radii. 2. Bond Order: Employs GFN2-xTB semi-empirical calculations.

The tool supports fragment merging based on centroid proximity and batch processing for high-throughput computational chemistry workflows.

Usage for a single file: uv run python detect_fragments.py geometric your_file.xyz –multiplier 1.1 uv run python detect_fragments.py bond-order your_file.xyz –threshold 0.7 –min-dist 4.0

Usage for a directory (batch mode): uv run python detect_fragments.py batch ./your_folder/ –method geometric –min-dist 3.5

Functions

print_results(→ None)

Displays analysis results in a structured table.

main()

Fragment detection suite for physical chemistry simulations.

geometric(filename, multiplier, radius_type, min_dist, ...)

Executes geometric fragment detection.

bond_order(filename, method, threshold, charge, ...)

Execute fragment detection using quantum mechanical bond orders.

batch(directory, method, pattern, output, min_dist)

Processes directories and outputs CSV summaries.

Module Contents

rgpycrumbs.geom.detect_fragments.print_results(console: rich.console.Console, atoms: ase.atoms.Atoms, n_components: int, labels: numpy.ndarray) None[source]

Displays analysis results in a structured table.

Added in version 0.0.6.

rgpycrumbs.geom.detect_fragments.main()[source]

Fragment detection suite for physical chemistry simulations.

rgpycrumbs.geom.detect_fragments.geometric(filename, multiplier, radius_type, min_dist, visualize)[source]

Executes geometric fragment detection.

rgpycrumbs.geom.detect_fragments.bond_order(filename, method, threshold, charge, multiplicity, min_dist, visualize)[source]

Execute fragment detection using quantum mechanical bond orders.

rgpycrumbs.geom.detect_fragments.batch(directory, method, pattern, output, min_dist)[source]

Processes directories and outputs CSV summaries.