Skip to main content

qcref

image image image CI

Reference data for computational chemistry: CODATA physical constants, conversion factors, a periodic table, and solvent properties, each value with its source. Lightweight and dependency-free.

  • Every value carries its source. Each number is a float with .source, .unit, .uncertainty, and .notes; the package refuses to load a value without a source.
  • Data releases are versioned. CODATA releases live side by side (codata[2022]), and phys and the curated conversion factors always follow the latest.
  • Adding data never requires code changes. All values live in CSV files with a metadata sidecar citing their source.

Formerly qcconst. pip install qcconst now installs qcref and warns on import; switch to import qcref.

Data Sources

Each piece of data contains a link to its source. Primary data sources include:

Data Name Source Source Links
Physical Constants NIST 2022 CODATA Individual Constant Lookup, Fundamenal Constants Listing, Conversion Factors
Periodic Table PubChem, IUPAC, Cordero 2008, Pyykkö 2015, Alvarez 2013 Periodic Table, Raw CSV Data, IUPAC Periodic Table, Cordero 2008, Pyykkö 2015, Alvarez 2013
Solvent Data CRC Handbook of Chemistry and Physics Permittivity (Dielectric Constant) of Liquids, C. Wohlfarth
DFTB Parameter Sets dftbparams parameter-set releases (3ob-3-1 v3.1.0, mio-1-1 v1.1.0) dftbparams, 3ob-3-1 README, mio-1-1 release

Installation

python -m pip install qcref

Quickstart

Each dataset in qcref is a collection keyed the same way everywhere:

  • Every entry has exactly one key, stored in the dataset's CSV file: UPPER_SNAKE_CASE for constants, solvents, and DFTB parameter sets, the element symbol (Ni) for the periodic table.
  • collection.KEY and collection["KEY"] are equivalent and are the only ways to look up by key.
  • collection.by_name(...) looks an entry up by its original source name, ignoring case.
  • Every value carries .source, .unit, .uncertainty, and .notes.

Constants

>>> from qcref import constants

>>> constants.BOHR_TO_ANGSTROM
0.529177210544, unit=Å, uncertainty=8.2e-11, source=CODATA 2022: https://physics.nist.gov/cuu/Constants/Table/allascii.txt, name=BOHR_TO_ANGSTROM, notes=Computed as BOHR_RADIUS * 1e10.

# Use constants just like a float
>>> constants.BOHR_TO_ANGSTROM * 10
5.29177210544

>>> constants["BOHR_TO_ANGSTROM"].source
'CODATA 2022: https://physics.nist.gov/cuu/Constants/Table/allascii.txt'

>>> constants.as_list()[:4]
['BOHR_TO_ANGSTROM', 'ANGSTROM_TO_BOHR', 'HARTREE_TO_JOULE', 'AVOGADRO_NUMBER']

# Curated constants can also be imported directly
>>> from qcref.constants import HARTREE_TO_EV

All CODATA Physical Constants

Every CODATA release in the package is available as codata[<year>] (also constants.codata2022, ...). phys always points to the latest release, currently 2022. Keys are the UPPER_SNAKE_CASE form of the NIST quantity name; by_name accepts the NIST name itself.

>>> from qcref import phys

>>> phys.SPEED_OF_LIGHT_IN_VACUUM
299792458.0, unit=m s^-1, uncertainty=0.0, source=CODATA 2022: https://physics.nist.gov/cuu/Constants/Table/allascii.txt, name=speed of light in vacuum

>>> phys.by_name("atomic unit of permittivity")
1.1126500562e-10, unit=F m^-1, uncertainty=1.7e-20, source=CODATA 2022: https://physics.nist.gov/cuu/Constants/Table/allascii.txt, name=atomic unit of permittivity

Periodic Table

>>> from qcref import periodic_table as pt

>>> pt.Ni
Element(symbol='Ni', number=28, name='Nickel', ...)

>>> pt["Ni"] is pt.Ni
True

>>> pt.by_name("Nickel").number
28

Solvents

Solvent keys are the UPPER_SNAKE_CASE form of the CRC name. A leading locant is moved to the end, following the CAS index convention, so 1,4-Dioxane is DIOXANE_1_4.

>>> from qcref import solvents

>>> solvents.ACETONE
Solvent(name='Acetone', formula='C3H6O', dielectric=21.01, dielectric_temperature_k=293.15, ...)

>>> solvents.DIOXANE_1_4
Solvent(name='1,4-Dioxane', formula='C4H8O2', dielectric=2.2189, dielectric_temperature_k=293.15, ...)

>>> solvents.by_name("1,4-Dioxane") is solvents.DIOXANE_1_4
True

>>> solvents.ACETONE.dielectric_at(298.15)
20.49331470812499

The solvent dataset is generated from the CRC permittivity table. dielectric is the tabulated static relative permittivity, dielectric_temperature_k is the CRC superscript temperature converted from °C to K, and dielectric_at(T) evaluates the CRC polynomial fit when one is available.

DFTB parameter sets

The settings each DFTB Slater-Koster parameter set prescribes for its use: per-element maximum angular momenta and, for DFTB3 sets, Hubbard derivatives and the H-bond damping exponent. Values come from each set's release in the dftbparams repositories, which also host the Slater-Koster files themselves (not included here).

>>> from qcref import dftb_parameter_sets

>>> ob3 = dftb_parameter_sets.by_name("3ob-3-1")  # or dftb_parameter_sets.OB3_3_1
>>> ob3.model
'DFTB3'

>>> float(ob3.h_damping_exponent)
4.0

>>> oxygen = ob3.elements["O"]
>>> oxygen.max_angular_momentum, float(oxygen.hubbard_derivative)
('p', -0.1575)

>>> oxygen.hubbard_derivative.source
'3ob-3-1 README (dftbparams/3ob v3.1.0): https://github.com/dftbparams/3ob/blob/v3.1.0/README'

>>> dftb_parameter_sets.MIO_1_1.url
'https://github.com/dftbparams/mio/releases/tag/v1.1.0'

Each set's citation lists the references its CC-BY-SA-4.0 license requires you to cite.

Adding New Values

All data live in CSV files under src/qcref/data, one folder per dataset. Adding data never requires a code change:

  • New entries: add a row to the dataset's CSV, including its key. Keys are UPPER_SNAKE_CASE (element symbols for the periodic table) and must be unique; the package refuses to import otherwise.
  • New CODATA release: add data/codata/<year>.csv and <year>.meta.json. phys and every curated constant in data/constants/constants.csv automatically use the latest release, and older releases stay available as codata[<year>].
  • New curated constants: add a row to data/constants/constants.csv with an expression over CODATA keys or earlier rows (e.g. BOHR_RADIUS * 1e10). Value, uncertainty, and source are computed from the inputs.

Every CSV has a <name>.meta.json sidecar with a required source (plus optional citation, notes, and per-column units). Values are stored exactly as published; conversions such as Å to Bohr happen at load time and are recorded in each value's notes. Every loaded value must have a source.

Keys are visible to type checkers and IDEs through the generated src/qcref/_keys.py, so pt.Ni autocompletes and a mistyped key is a mypy error. The pre-commit hook and the build regenerate it whenever data change (or run python build_tools/gen_keys.py); a test fails if it is stale.

Open a PR and that's it! ✨

Contributing

See CONTRIBUTING.md for development setup, the pre-commit workflow, running tests, and the release process.

The QC Suite

These packages work together to make quantum chemistry fast, structured, and interoperable.

  • qcref - Reference data for computational chemistry: CODATA physical constants, conversion factors, a periodic table, and solvent properties, each value with its source.
  • qcdata - Data structures for quantum chemistry inputs and results, with Jupyter visualizations. Documentation
  • qcinf - Cheminformatics algorithms and structure utilities for qcdata structures.
  • qccodec - Translates qcdata inputs into native program inputs and parses program outputs back into qcdata objects, one codec per program.
  • qccompute - Runs quantum chemistry programs on qcdata inputs using qccodec codecs and returns structured results. Documentation
  • BigChem - Distributed execution of qccompute calculations across clusters of computers or the cloud.
  • ChemCloud - A web application and Python client that expose a BigChem cluster securely over the internet.

Metadata

Release files for qcref 0.5.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 qcref 0.5.0
File Size Uploaded Provenance Actions
qcref-0.5.0.tar.gz 170.4 kB With provenance Details for qcref-0.5.0.tar.gz

Built distribution (wheel)

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

Total release size: 263.3 kB

Release files / qcref-0.5.0.tar.gz

Download URL qcref-0.5.0.tar.gz
Size 170.4 kB
Tags Source
SHA-256 checksum
How to use checksums
484d591d3ee54ce2eaadef223d9542bac242995259b178a889c0acc6ce5f841a
BLAKE2b-256 checksum
How to use checksums
5eb52c6076d6a4505bb3e489d1ec1cdfeb690d898ce076c48aad91cc4c8028b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 21, 2026.

Transparency log

Release files / qcref-0.5.0-py3-none-any.whl

Download URL qcref-0.5.0-py3-none-any.whl
Size 92.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4372b598f30b0b033a15a3d2bd0d6d96205f57fb07ab6a56294cb987427c12a3
BLAKE2b-256 checksum
How to use checksums
3204445404eba13ebae271f90c32c1e76198576b6543908ad51eff17041ad6aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 21, 2026.

Transparency log

Security for qcref 0.5.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for qcref-0.5.0.tar.gz

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 Oct 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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