autofragment.core.geometry

Geometric utilities for isolated molecular fragments.

This module provides functions for: - Computing centroids - Computing RMSD between structures - Kabsch alignment

These helpers operate on isolated Molecule objects. Convert from ChemicalSystem explicitly when working with full systems.

Functions

compute_centroid(coords)

Compute the centroid of a set of coordinates.

compute_centroids(molecules)

Compute centroids for a list of isolated molecules.

compute_rmsd(coords1, coords2)

Compute the root-mean-square deviation between two coordinate sets.

hybrid_distance(mol1, mol2[, alpha])

Compute a hybrid distance combining centroid distance and RMSD.

kabsch_align(reference, target)

Apply Kabsch alignment to target molecules based on centroids.

kabsch_rotation(P, Q)

Compute the optimal rotation matrix to align P onto Q using Kabsch algorithm.

molecule_rmsd(mol1, mol2)

Compute RMSD between two molecules.