Skip to main content

Actions status image image downloads Actions status image

chemcloud - A Python Client for ChemCloud

chemcloud is a python client for the ChemCloud Server. The client provides a simple yet powerful interface to perform computational chemistry calculations at scale using nothing but modern Python and an internet connection.

Documentation: https://mtzgroup.github.io/chemcloud-client

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

The QC Suite of Programs

  • qcdata - Elegant and intuitive data structures for quantum chemistry, featuring seamless Jupyter Notebook visualizations. Documentation
  • qcparse - A library for efficient parsing of quantum chemistry data into structured qcdata objects.
  • qcop - A package for operating quantum chemistry programs using qcdata standardized data structures. Compatible with TeraChem, psi4, QChem, NWChem, ORCA, Molpro, geomeTRIC, and many more, featuring seamless Jupyter Notebook visualizations.
  • 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, featuring seamless Jupyter Notebook visualizations.
  • ChemCloud - A web application and associated Python client for exposing a BigChem cluster securely over the internet, featuring seamless Jupyter Notebook visualizations.

Installation

pip install chemcloud

Quickstart

Run calculations just like you would with qcop except calling chemcloud.compute instead of qcop.compute. You may also pass list of inputs to chemcloud.compute to run calculations in parallel. By default chemcloud.compute will return ProgramOutput objects for all calculations, even those that failed, rather than raising exceptions. Check if calculations were successful by accessing output.success.

from qcdata import Structure, ProgramInput
from chemcloud import compute

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

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

# Submit the calculation to the server
output = compute("terachem", prog_input)

# Inspect the output
output.input_data # Input data used by the QC program
output.success # Whether the calculation succeeded
output.data # All structured results from the calculation
output.logs # Stdout log from the calculation
output.plogs # Shortcut to print out the stdout in human readable format
output.files # Any files returned by the calculation
output.provenance # Provenance information about the calculation
output.extras # Any extra information not in the schema
output.traceback # Stack trace if calculation failed
output.ptraceback # Shortcut to print out the traceback in human readable format

Submit thousands of calculations simultaneously and collect results parallel:

prog_inputs = [prog_input] * 10
outputs = compute("terachem", prog_inputs)

for output in outputs:
    # Process outputs
    output.save(...)

Or stream results from the server as they complete:

prog_inputs = [prog_input] * 10
# Submit the calculation to the server
future = compute("terachem", prog_inputs, return_future=True)
for output in future.as_completed():
    # Outputs returned as they complete
    output.save(...)

If you want to use a non-blocking API, pass return_future=True to compute. Calling .get() on the future will return a ProgramOutput or list of ProgramOutput once the calculations are complete.

prog_inputs = [prog_input] * 10
# Submit the calculation to the server
future = compute("terachem", prog_inputs, return_future=True)
# Check the status of calculations (optional)
future.is_ready
# Block and retrieve results
outputs = future.get()
for output in outputs:
    # Process outputs
    output.save(...)

Save a future to disk and then collect results later:

# Submit the calculation to the server
future = compute("terachem", prog_inputs, return_future=True)
future.save("myfuture.json")

# Later in a different script
future.open("myfuture.json")
outputs = future.get()

Examples

More examples can be found in the examples directory.

✨ Visualization ✨

Visualize all your results with a single line of code!

First install the visualization module:

pip install qcdata[view]

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

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 visualizing including Structure objects or any ProgramOutput object. You may also pass an array of titles and/or subtitles to add additional information to the molecular structure display. If no titles are passed qcdata with 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 of qcdata.view.py that begin with the word generate_ to create HTML you can insert into any dashboard.

Support

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

Download files

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

Source Distribution

chemcloud-0.17.0.tar.gz (140.3 kB view details)

Uploaded Source

Built Distribution

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

chemcloud-0.17.0-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

Details for the file chemcloud-0.17.0.tar.gz.

File metadata

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

File hashes

Hashes for chemcloud-0.17.0.tar.gz
Algorithm Hash digest
SHA256 90ec8b16e272e91361ae67a1e1ef959165e072ff72d9e36acf39ebf3f259c963
MD5 700190de3ec2a92329949e673a9d8633
BLAKE2b-256 6e9ed769838e3535b5d58754e729eaaef99e2d993ad97f8553b9a405b0bd0f57

See more details on using hashes here.

Provenance

The following attestation bundles were made for chemcloud-0.17.0.tar.gz:

Publisher: publish-to-pypi.yaml on mtzgroup/chemcloud-client

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

File details

Details for the file chemcloud-0.17.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for chemcloud-0.17.0-py3-none-any.whl
Algorithm Hash digest
SHA256 36d2b28d24d4c17efcf710ffe3a8840099dbbe938d334d2e018311cadd8d9043
MD5 aa8bce5224ed9761a983fa5f830f102b
BLAKE2b-256 dde77cd8910a6aa5c395b0f2f12fe1b1822c21630d2aa099517aab9aa3c30929

See more details on using hashes here.

Provenance

The following attestation bundles were made for chemcloud-0.17.0-py3-none-any.whl:

Publisher: publish-to-pypi.yaml on mtzgroup/chemcloud-client

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

Release history Release notifications | RSS feed

This release

0.17.0 This release

2 files

0.16.0

2 files

0.15.0

2 files

0.14.0

2 files

0.13.3

2 files

0.13.2

2 files

0.13.1

2 files

0.13.0

2 files

0.12.5

2 files

0.12.4

2 files

0.12.3

2 files

0.12.2

2 files

0.12.1

2 files

0.12.0

2 files

0.11.1

2 files

0.11.0

2 files

0.10.1

2 files

0.10.0

2 files

0.9.0

2 files

0.8.3

2 files

0.8.2

2 files

0.8.1

2 files

0.8.0

2 files

0.7.0

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 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