Skip to main content

A package for parsing Quantum Chemistry program file outputs into structured qcio data objects.

Project description

qcparse

A library for parsing Quantum Chemistry output files into structured data objects and converting structured input objects into program-native input files. Uses data structures from qcio.

image image image Actions status Actions status Ruff

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

The QC Suite of Programs

  • qcio - Beautiful and user friendly data structures for quantum chemistry.
  • qcparse - A library for efficient parsing of quantum chemistry data into structured qcio objects and conversion of qcio input objects to program-native input files.
  • qcop - A package for operating quantum chemistry programs using qcio standardized 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.

✨ Basic Usage

  • Installation:

    python -m pip install qcparse
    
  • Parse a file into a SinglePointResults object with a single line of code.

    from qcparse import parse
    # May pass a path or the contents of a file as string/bytes
    results = parse("terachem", "/path/to/stdout.log")
    
  • The results object will be a qcio.SinglePointResults object. Run dir(results) inside a Python interpreter to see the various values you can access. A few prominent values are shown here as an example:

    from qcparse import parse
    
    results = parse("/path/to/tc.out", "terachem")
    
    results.energy
    results.gradient # If a gradient calc
    results.hessian # If a hessian calc
    
    results.calcinfo_nmo # Number of molecular orbitals
    
  • Parsed values can be written to disk like this:

    with open("results.json", "w") as f:
        f.write(result.model_dumps_json())
    
  • And read from disk like this:

    from qcio import SinglePointResults
    
    results = SinglePointResults.open("results.json")
    
  • You can also run qcparse from the command line like this:

    qcparse -h # Get help message for cli
    
    qcparse terachem ./path/to/tc.out > results.json # Parse TeraChem stdout to json
    

💻 Contributing

Please see the contributing guide for details on how to contribute new parsers to this project :)

If there's data you'd like parsed from output files or want to support input files for a new program, please open an issue in this repo explaining the data items you'd like parsed and include an example output file containing the data, like this.

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

qcparse-0.7.2.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

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

qcparse-0.7.2-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file qcparse-0.7.2.tar.gz.

File metadata

  • Download URL: qcparse-0.7.2.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for qcparse-0.7.2.tar.gz
Algorithm Hash digest
SHA256 604accfb0421e3ecf37e42ca761cc6f0090aae471b829ff810150de0769c1179
MD5 bf09fb74f85d3eb24763a280b6761819
BLAKE2b-256 cf5aa75fb59d4427225beaae2b9c9c2cb5d1c82e3aefd434e7eedee1715538aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for qcparse-0.7.2.tar.gz:

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

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

File details

Details for the file qcparse-0.7.2-py3-none-any.whl.

File metadata

  • Download URL: qcparse-0.7.2-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for qcparse-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4acc1ff231429f154b04325531f1043f4c42c31c37e0db93dcf5a07a3594f598
MD5 9a6d7d1c39deb4451f4e4c1d14f228d6
BLAKE2b-256 dc4b95b4a47367c04add84baf58f072c934e6fc3d9c425419707063735a87adb

See more details on using hashes here.

Provenance

The following attestation bundles were made for qcparse-0.7.2-py3-none-any.whl:

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

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