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.4.0.tar.gz (114.6 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.4.0-py3-none-any.whl (39.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for qcinf-0.4.0.tar.gz
Algorithm Hash digest
SHA256 6b1976c51b774597258604aced496a19c6b2760729467587ea8028b0456b2b14
MD5 5e1314517d9b3b4c8dcf5004d9e36bf6
BLAKE2b-256 dad6f372ef11253e7be5cd8c408e1c151a6e40c4e2bbf42d03661fdc51cce705

See more details on using hashes here.

Provenance

The following attestation bundles were made for qcinf-0.4.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.4.0-py3-none-any.whl.

File metadata

  • Download URL: qcinf-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 39.3 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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7aeccea03fbd20cf43bd39981e53f36e0a3d250aa6f5a8d35e9fda75fba025cc
MD5 e6ca8392d0669eeea6c308d4dd89b39d
BLAKE2b-256 158557469644574762e3c8a60b7b5943714ce9a0dca222c6890b0e8a7f5c1feb

See more details on using hashes here.

Provenance

The following attestation bundles were made for qcinf-0.4.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