Cheminformatics algorithms and structure utilities using standardized qcdata data structures.
qcinf works in harmony with a suite of other quantum chemistry tools for fast, structured, and interoperable quantum chemistry.
- qcconst - Physical constants, conversion factors, and a periodic table with clear source information for every value.
- qcdata - Elegant and intuitive data structures for quantum chemistry, featuring seamless Jupyter Notebook visualizations. Documentation
- qcinf - Cheminformatics algorithms and structure utilities using standardized qcdata data structures.
- qccodec - A package for translating between standardized qcdata data structures and native QC program inputs and outputs.
- qcop - A package for operating quantum chemistry programs using standardized qcdata data structures. Compatible with
TeraChem,psi4,QChem,NWChem,ORCA,Molpro,geomeTRICand many more. - BigChem - A distributed application for running quantum chemistry calculations at scale across clusters of computers or the cloud. Bring multi-node scaling to your favorite quantum chemistry program.
ChemCloud- A web application and associated Python client for exposing a BigChem cluster securely over the internet.
python -m pip install qcinfTo install with numba-accelerated kernels:
python -m pip install 'qcinf[fast]'Additional backends can be added for conversion and compatibility features, including
rdkit, openbabel, or install the whole suite with all:
python -m pip install 'qcinf[rdkit,openbabel]'Or
python -m pip install 'qcinf[all]'snapRMSD is the native qcinf algorithm for symmetry-aware molecular RMSD. It
uses bonded connectivity to find a connectivity-preserving atom assignment between
two isomorphic structures, optionally aligns the structures, and returns the RMSD
for the best assignment.
from qcdata import Structure
from qcinf import snap_rmsd
reference = Structure(
symbols=["C", "H", "H", "H", "H"],
geometry=[
[0.0, 0.0, 0.0],
[1.0, 1.0, 1.0],
[-1.0, -1.0, 1.0],
[-1.0, 1.0, -1.0],
[1.0, -1.0, -1.0],
],
connectivity=[(0, 1, 1.0), (0, 2, 1.0), (0, 3, 1.0), (0, 4, 1.0)],
)
candidate = Structure(
symbols=["C", "H", "H", "H", "H"],
geometry=[
[0.0, 0.0, 0.0],
[-1.0, 1.0, -1.0],
[1.0, -1.0, -1.0],
[1.0, 1.0, 1.0],
[-1.0, -1.0, 1.0],
],
connectivity=[(0, 1, 1.0), (0, 2, 1.0), (0, 3, 1.0), (0, 4, 1.0)],
)
rmsd = snap_rmsd(reference, candidate)For the full result, use snap_rmsd_align_assign:
from qcinf import snap_rmsd_align_assign
rmsd, aligned_reference, assignment = snap_rmsd_align_assign(reference, candidate)assignment[i] is the atom index in candidate matched to atom i in
reference. The returned aligned_reference is a copy of reference with its
geometry aligned to candidate.
Common options:
from qcinf import snap_align, snap_assign, snap_rmsd
# Compare structures without rotational/translational alignment.
rmsd = snap_rmsd(reference, candidate, align=False)
# Increase factoring depth for larger repeated peripheral groups.
rmsd = snap_rmsd(reference, candidate, factor_depth=2)
# Use the QCP alignment backend. Install with `qcinf[fast]` for numba acceleration.
rmsd = snap_rmsd(reference, candidate, alignment_backend="qcp")
# Return only the aligned structure or atom assignment.
aligned = snap_align(reference, candidate)
assignment = snap_assign(reference, candidate)If a Structure does not include bonded connectivity, snapRMSD will infer it
from covalent radii. For production workflows, pass validated connectivity on the
structures or through a_connectivity= and b_connectivity= so the graph used for
assignment is explicit and reproducible.
Install the package with all optional dependencies:
uv sync --all-extrasRun tests to ensure your setup is working correctly:
bash scripts/tests.shIf you have any issues with qcinf or would like to request a feature, please open an issue.