MolecularDiffusion.runmodes.analyze.compare_to_optimized

Helpers for comparing an initial geometry with an optimized counterpart.

This is an internal helper library, not a command. The directory-walking front end that used to live here is now the xyz+optimized layout of --metrics conformer (see conformer_metrics.py).

Two consumers depend on it:

  • conformer_metrics.pycompute_all_metrics for the legacy layout;

  • runmodes/generate/tasks_conformer.pyget_xtb_energy for the optional energy column. Removing that function breaks conformer generation, not just analysis.

Functions

compute_all_metrics(→ dict)

Compute all available metrics for a single pair.

compute_coord_rmsd(→ float)

Compute RMSD between two coordinate sets.

get_xtb_energy(→ Optional[float])

Compute xTB single-point energy for an XYZ file (returns Hartree).

xyz2mol_converter(→ Optional[rdkit.Chem.Mol])

Convert XYZ to RDKit Mol using xyz2mol logic.

xyz2mol_openbabel(→ Optional[rdkit.Chem.Mol])

Convert XYZ to RDKit Mol using OpenBabel (via pybel).

Module Contents

MolecularDiffusion.runmodes.analyze.compare_to_optimized.compute_all_metrics(init_file: pathlib.Path, opt_file: pathlib.Path, args: argparse.Namespace) dict

Compute all available metrics for a single pair.

MolecularDiffusion.runmodes.analyze.compare_to_optimized.compute_coord_rmsd(coords1: numpy.ndarray, coords2: numpy.ndarray) float

Compute RMSD between two coordinate sets.

MolecularDiffusion.runmodes.analyze.compare_to_optimized.get_xtb_energy(xyz_path: str, charge: int = 0, level: str = 'gfn2', timeout: int = 120) float | None

Compute xTB single-point energy for an XYZ file (returns Hartree).

MolecularDiffusion.runmodes.analyze.compare_to_optimized.xyz2mol_converter(xyz_file: str, timeout: int = 10) rdkit.Chem.Mol | None

Convert XYZ to RDKit Mol using xyz2mol logic.

MolecularDiffusion.runmodes.analyze.compare_to_optimized.xyz2mol_openbabel(xyz_file: str) rdkit.Chem.Mol | None

Convert XYZ to RDKit Mol using OpenBabel (via pybel).