Skip to main content

qccompute

A package for running Quantum Chemistry programs using qcdata standardized data structures. Compatible with TeraChem, psi4, Crest, xTB, QChem, NWChem, ORCA, Molpro, geomeTRIC and many more.

image image image Actions status Actions status

qccompute works in harmony with a suite of other quantum chemistry tools for fast, structured, and interoperable quantum chemistry.

The QC Suite of Programs

The QC Suite works in harmony to provide fast, structured, and interoperable quantum chemistry tools.

  • 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.
  • qccompute - 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 qccompute

Quickstart

qccompute uses the qcdata data structures to drive quantum chemistry programs in a standardized way. This allows for a simple and consistent interface to a wide variety of quantum chemistry programs. See the qcdata library for documentation on the input and output data structures.

The compute function is the main entry point for the library and is used to run a calculation.

from qcdata import Structure, ProgramInput
from qccompute import compute
from qccompute.exceptions import ExternalProgramError

# Create the Structure
h2o = Structure.open("h2o.xyz")

# Define the program input
prog_input = ProgramInput(
    program="terachem",
    structure=h2o,
    calctype="energy",
    model={"method": "hf", "basis": "sto-3g"},
    keywords={"purify": "no", "restricted": False},
)

# Run the calculation; will return a ProgramOutput or raise an exception
try:
    prog_output = compute(prog_input, collect_files=True)
except ExternalProgramError as e:
    # External QQ program failed in some way
    prog_output = e.prog_output
    prog_output.input_data # Input data used by the QC program
    prog_output.success # Will be False
    prog_output.results # Any half-computed results before the failure
    prog_output.logs # Logs from the calculation
    prog_output.plogs # Shortcut to print out the logs in human readable format
    prog_output.traceback # Stack trace from the calculation
    prog_output.ptraceback # Shortcut to print out the traceback in human readable format
    raise e
else:
    # Calculation succeeded
    prog_output.input_data # Input data used by the QC program
    prog_output.success # Will be True
    prog_output.results # All structured data and files from the calculation
    prog_output.results.files # Any files returned by the calculation
    prog_output.logs # Logs from the calculation
    prog_output.plogs # Shortcut to print out the logs in human readable format
    prog_output.results.provenance # Provenance information about the calculation
    prog_output.extras # Any extra information not in the schema

One may also call compute(..., raise_exc=False) to return a ProgramOutput object rather than raising an exception when a calculation fails. This may allow easier handling of failures in some cases.

from qcdata import Structure, ProgramInput
from qccompute import compute
from qccompute.exceptions import ExternalProgramError
# Create the Structure
h2o = Structure.open("h2o.xyz")

# Define the program input
prog_input = ProgramInput(
    program="terachem",
    structure=h2o,
    calctype="energy",
    model={"method": "hf", "basis": "sto-3g"},
    keywords={"purify": "no", "restricted": False},
)

# Run the calculation; will return a ProgramOutput object
prog_output = compute(prog_input, collect_files=True, raise_exc=False)
if not prog_output.success:
    # Same as except block above

else:
    # Same as else block above

Alternatively, the compute_args function can be used to run a calculation with the input data structures passed in as arguments rather than as a single ProgramInput object.

from qcdata import Structure
from qccompute import compute_args
# Create the Structure
h2o = Structure.open("h2o.xyz")

# Run the calculation
prog_output = compute_args(
    "terachem",
    h2o,
    calctype="energy",
    model={"method": "hf", "basis": "sto-3g"},
    keywords={"purify": "no", "restricted": False},
    files={...},
    collect_files=True
)

The behavior of compute() and compute_args() can be tuned by passing in keyword arguments like collect_files shown above. Arguments can modify which scratch directory location to use, whether to delete or keep the scratch files after a calculation completes, what files to collect from a calculation, whether to stream the program logs in real time as the program executes, and whether to propagate a wavefunction through a series of calculations. Arguments also include hooks for passing in update functions that can be called as a program executes in real time. See the compute method docstring for more details.

See the /examples directory for more examples.

✨ Visualization ✨

Visualize all your results with a single line of code!

First install the visualization module:

python -m pip install qcdata[view]

or if your shell requires '' around arguments with brackets:

python -m pip install 'qcdata[view]'

Then in a Jupyter notebook import the qcdata view module and call view.view(...) passing it one or any number of qcdata objects you want to visualize, including Structure objects or any ProgramOutput object. You may also pass arrays of titles and/or subtitles to add additional information to the molecular structure display. If no titles are passed, qcdata will look for Structure identifiers such as a name or SMILES to label the Structure.

Structure Viewer

Seamless visualizations for ProgramOutput objects make results analysis easy!

Optimization Viewer

Single point calculations display their results in a table.

Single Point Viewer

If you want to use the HTML generated by the viewer to build your own dashboards, use the functions inside qcdata.view.py that begin with generate_ to create HTML you can insert into any dashboard.

Support

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

Development

qccompute requires published qcdata>=0.19.0 and qccodec>=0.12.0. Run uv sync --all-groups --locked to install the project and development dependencies; no sibling checkouts are needed.

TeraChem FE/PBS dependency

The optional FE/PBS adapters require a separate tcpb migration. Published tcpb==0.16.0 constructs the old qcdata models internally, so requests now report an explicit dependency error (or return a failed ProgramOutput when raise_exc=False). Standard TeraChem subprocess execution uses the migrated qccodec parsers and is independent of this limitation.

Partial results on execution failure

TeraChem, ORCA, and CREST adapters pass failed executions to qccodec.decode(..., failed=True) before returning or raising. Available scientific values survive in output.results. For failures before execution, qccompute uses qcdata's shared type lookup to construct empty results and identifies the intended scientific producer in provenance. Unknown program versions remain None.

Metadata

Release files for qccompute 0.14.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qccompute 0.14.0
File Size Uploaded
qccompute-0.14.0.tar.gz 514.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for qccompute 0.14.0
File Interpreter ABI Platform
qccompute-0.14.0-py3-none-any.whl Python 3 none any Details

Total release size: 548.9 kB

Release files / qccompute-0.14.0.tar.gz

Download URL qccompute-0.14.0.tar.gz
Size 514.6 kB
Tags Source
SHA-256 checksum
How to use checksums
43fe4e7f82bf4ab7ac91f8a79c439c14c95cc4fa8851441a98bf960bc41613b6
BLAKE2b-256 checksum
How to use checksums
548579fca8f1ac6d8b910c5a177f5202e3cb54d158f1d47389ad87054d0d121d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Release files / qccompute-0.14.0-py3-none-any.whl

Download URL qccompute-0.14.0-py3-none-any.whl
Size 34.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
69bf9ecfab26b116c84dfd61d3f95c339462b9c48c4a87b27861bcc940a99bba
BLAKE2b-256 checksum
How to use checksums
f1015e6eff3d1cfb7df54ab8ff795dea10f08605102517a5f5a7c96e4cf190ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Release history Release notifications | RSS feed

0.16.0

2 release files

0.15.0

2 release files

This release

0.14.0 This release

2 release files

0.13.3

2 release files

0.13.2

2 release files

0.13.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page