Skip to main content

Cheminformatics algorithms and structure utilities using standardized qcdata data structures.

Project description

Quantum Chemistry Informatics (qcinf)

image image image Actions status Actions status

Cheminformatics algorithms and structure utilities using standardized qcdata data structures.

The QC Suite of Programs

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, geomeTRIC and 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.

Installation

python -m pip install qcinf

To 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

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.

Development

Install the package with all optional dependencies:

uv sync --all-extras

Run tests to ensure your setup is working correctly:

bash scripts/tests.sh

Support

If you have any issues with qcinf or would like to request a feature, please open an issue.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qcinf-0.3.0.tar.gz (114.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qcinf-0.3.0-py3-none-any.whl (39.1 kB view details)

Uploaded Python 3

File details

Details for the file qcinf-0.3.0.tar.gz.

File metadata

  • Download URL: qcinf-0.3.0.tar.gz
  • Upload date:
  • Size: 114.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for qcinf-0.3.0.tar.gz
Algorithm Hash digest
SHA256 3c8953301dc8ef75a345cb7158aed1a4d0f026b9b0a909e564c097de34716cb7
MD5 5418e3ed93af9e3fffbe9ed62a3306ba
BLAKE2b-256 8be4dc2479e7e138797e56b06a59acf19592a9c918497585b6aebded0839345d

See more details on using hashes here.

Provenance

The following attestation bundles were made for qcinf-0.3.0.tar.gz:

Publisher: publish-to-pypi.yaml on coltonbh/qcinf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qcinf-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: qcinf-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 39.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for qcinf-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aba63936aa5716e41866a7d54d29dd4361a039de7b15e8d0e854a31387c6466f
MD5 f430da539d80fe9ebf189527a2191b41
BLAKE2b-256 89ffb8cb9877bd28358902730acb25f8d1149f32a7937d910e395783edb21871

See more details on using hashes here.

Provenance

The following attestation bundles were made for qcinf-0.3.0-py3-none-any.whl:

Publisher: publish-to-pypi.yaml on coltonbh/qcinf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page