# QCElemental
[![Build Status](https://github.com/MolSSI/QCElemental/workflows/CI/badge.svg?branch=master)](https://github.com/MolSSI/QCElemental/actions?query=workflow%3ACI)
[![codecov](https://img.shields.io/codecov/c/github/MolSSI/QCElemental.svg?logo=Codecov&logoColor=white)](https://codecov.io/gh/MolSSI/QCElemental)
[![Documentation Status](https://img.shields.io/github/actions/workflow/status/MolSSI/QCElemental/CI.yaml?label=docs&logo=readthedocs&logoColor=white)](https://molssi.github.io/QCElemental/)
[![Chat on Slack](https://img.shields.io/badge/chat-on_slack-green.svg?longCache=true&style=flat&logo=slack)](https://join.slack.com/t/qcarchive/shared_invite/enQtNDIzNTQ2OTExODk0LTE3MWI0YzBjNzVhNzczNDM0ZTA5MmQ1ODcxYTc0YTA1ZDQ2MTk1NDhlMjhjMmQ0YWYwOGMzYzJkZTM2NDlmOGM)
![python](https://img.shields.io/badge/python-3.7+-blue.svg)
**Documentation:** [GitHub Pages](https://molssi.github.io/QCElemental/)
Core data structures for Quantum Chemistry. QCElemental also contains physical constants and periodic table data from NIST and molecule handlers.
Periodic Table and Physical Constants data are pulled from NIST srd144 and srd121, respectively ([details](raw_data/README.md)) in a renewable manner (class around NIST-published JSON file).
This project also contains a generator, validator, and translator for [Molecule QCSchema](https://molssi-qc-schema.readthedocs.io/en/latest/auto_topology.html).
## ✨ Getting Started
- Installation. QCElemental supports Python 3.7+. Starting with v0.50 (aka "next", aka "QCSchema v2 available"), Python 3.8+ will be supported.
```sh
python -m pip install qcelemental
```
- To install QCElemental with molecule visualization capabilities (useful in iPython or Jupyter notebook environments):
```sh
python -m pip install 'qcelemental[viz]`
```
- To install QCElemental with various alignment capabilities using `networkx`
```sh
python -m pip install 'qcelemental[align]`
```
- Or install both:
```sh
python -m pip install 'qcelemental[viz,align]`
```
- See [documentation](https://molssi.github.io/QCElemental/)
### Periodic Table
A variety of periodic table quantities are available using virtually any alias:
```python
>>> import qcelemental as qcel
>>> qcel.periodictable.to_E('KRYPTON')
'Kr'
>>> qcel.periodictable.to_element(36)
'Krypton'
>>> qcel.periodictable.to_Z('kr84')
36
>>> qcel.periodictable.to_A('Kr')
84
>>> qcel.periodictable.to_A('D')
2
>>> qcel.periodictable.to_mass('kr', return_decimal=True)
Decimal('83.9114977282')
>>> qcel.periodictable.to_mass('kr84')
83.9114977282
>>> qcel.periodictable.to_mass('Kr86')
85.9106106269
```
### Physical Constants
Physical constants can be acquired directly from the [NIST CODATA](https://physics.nist.gov/cuu/Constants/Table/allascii.txt):
```python
>>> import qcelemental as qcel
>>> qcel.constants.Hartree_energy_in_eV
27.21138602
>>> qcel.constants.get('hartree ENERGY in ev')
27.21138602
>>> pc = qcel.constants.get('hartree ENERGY in ev', return_tuple=True)
>>> pc.label
'Hartree energy in eV'
>>> pc.data
Decimal('27.21138602')
>>> pc.units
'eV'
>>> pc.comment
'uncertainty=0.000 000 17'
```
Alternatively, with the use of the [Pint unit conversion package](https://pint.readthedocs.io/en/latest/), arbitrary
conversion factors can be obtained:
```python
>>> qcel.constants.conversion_factor("bohr", "miles")
3.2881547429884475e-14
```
### Covalent Radii
Covalent radii are accessible for most of the periodic table from [Alvarez, Dalton Transactions (2008) doi:10.1039/b801115j](https://doi.org/10.1039/b801115j) ([details](qcelemental/data/alvarez_2008_covalent_radii.py.py)).
```python
>>> import qcelemental as qcel
>>> qcel.covalentradii.get('I')
2.626719314386381
>>> qcel.covalentradii.get('I', units='angstrom')
1.39
>>> qcel.covalentradii.get(116)
Traceback (most recent call last):
...
qcelemental.exceptions.DataUnavailableError: ('covalent radius', 'Lv')
>>> qcel.covalentradii.get(116, missing=4.0)
4.0
>>> qcel.covalentradii.get('iodine', return_tuple=True).dict()
{'numeric': True, 'label': 'I', 'units': 'angstrom', 'data': Decimal('1.39'), 'comment': 'e.s.d.=3 n=451', 'doi': 'DOI: 10.1039/b801115j'}
```
### van der Waals Radii
Van der Waals radii are accessible for most of the periodic table from [Mantina, J. Phys. Chem. A (2009) doi: 10.1021/jp8111556](https://pubs.acs.org/doi/10.1021/jp8111556) ([details](qcelemental/data/mantina_2009_vanderwaals_radii.py)).
```python
>>> import qcelemental as qcel
>>> qcel.vdwradii.get('I')
3.7416577284064996
>>> qcel.vdwradii.get('I', units='angstrom')
1.98
>>> qcel.vdwradii.get(116)
Traceback (most recent call last):
...
qcelemental.exceptions.DataUnavailableError: ('vanderwaals radius', 'Lv')
>>> qcel.vdwradii.get('iodine', return_tuple=True).dict()
{'numeric': True, 'label': 'I', 'units': 'angstrom', 'data': Decimal('1.98'), 'doi': 'DOI: 10.1021/jp8111556'}
```
Raw data
{
"_id": null,
"home_page": "https://github.com/MolSSI/QCElemental",
"name": "qcelemental",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.7",
"maintainer_email": null,
"keywords": null,
"author": "The QCArchive Development Team",
"author_email": "qcarchive@molssi.org",
"download_url": "https://files.pythonhosted.org/packages/e7/ad/1cf6bb9eec08e7455b6c5736c322bbc42f81dc847898d18cf00e9ec9871f/qcelemental-0.29.0.tar.gz",
"platform": null,
"description": "# QCElemental\n\n[![Build Status](https://github.com/MolSSI/QCElemental/workflows/CI/badge.svg?branch=master)](https://github.com/MolSSI/QCElemental/actions?query=workflow%3ACI)\n[![codecov](https://img.shields.io/codecov/c/github/MolSSI/QCElemental.svg?logo=Codecov&logoColor=white)](https://codecov.io/gh/MolSSI/QCElemental)\n[![Documentation Status](https://img.shields.io/github/actions/workflow/status/MolSSI/QCElemental/CI.yaml?label=docs&logo=readthedocs&logoColor=white)](https://molssi.github.io/QCElemental/)\n[![Chat on Slack](https://img.shields.io/badge/chat-on_slack-green.svg?longCache=true&style=flat&logo=slack)](https://join.slack.com/t/qcarchive/shared_invite/enQtNDIzNTQ2OTExODk0LTE3MWI0YzBjNzVhNzczNDM0ZTA5MmQ1ODcxYTc0YTA1ZDQ2MTk1NDhlMjhjMmQ0YWYwOGMzYzJkZTM2NDlmOGM)\n![python](https://img.shields.io/badge/python-3.7+-blue.svg)\n\n**Documentation:** [GitHub Pages](https://molssi.github.io/QCElemental/)\n\nCore data structures for Quantum Chemistry. QCElemental also contains physical constants and periodic table data from NIST and molecule handlers.\n\nPeriodic Table and Physical Constants data are pulled from NIST srd144 and srd121, respectively ([details](raw_data/README.md)) in a renewable manner (class around NIST-published JSON file).\n\nThis project also contains a generator, validator, and translator for [Molecule QCSchema](https://molssi-qc-schema.readthedocs.io/en/latest/auto_topology.html).\n\n## \u2728 Getting Started\n\n- Installation. QCElemental supports Python 3.7+. Starting with v0.50 (aka \"next\", aka \"QCSchema v2 available\"), Python 3.8+ will be supported.\n\n ```sh\n python -m pip install qcelemental\n ```\n\n- To install QCElemental with molecule visualization capabilities (useful in iPython or Jupyter notebook environments):\n\n ```sh\n python -m pip install 'qcelemental[viz]`\n ```\n\n- To install QCElemental with various alignment capabilities using `networkx`\n\n ```sh\n python -m pip install 'qcelemental[align]`\n ```\n\n- Or install both:\n\n ```sh\n python -m pip install 'qcelemental[viz,align]`\n ```\n\n- See [documentation](https://molssi.github.io/QCElemental/)\n\n### Periodic Table\n\nA variety of periodic table quantities are available using virtually any alias:\n\n```python\n>>> import qcelemental as qcel\n>>> qcel.periodictable.to_E('KRYPTON')\n'Kr'\n>>> qcel.periodictable.to_element(36)\n'Krypton'\n>>> qcel.periodictable.to_Z('kr84')\n36\n>>> qcel.periodictable.to_A('Kr')\n84\n>>> qcel.periodictable.to_A('D')\n2\n>>> qcel.periodictable.to_mass('kr', return_decimal=True)\nDecimal('83.9114977282')\n>>> qcel.periodictable.to_mass('kr84')\n83.9114977282\n>>> qcel.periodictable.to_mass('Kr86')\n85.9106106269\n```\n\n### Physical Constants\n\nPhysical constants can be acquired directly from the [NIST CODATA](https://physics.nist.gov/cuu/Constants/Table/allascii.txt):\n\n```python\n>>> import qcelemental as qcel\n>>> qcel.constants.Hartree_energy_in_eV\n27.21138602\n>>> qcel.constants.get('hartree ENERGY in ev')\n27.21138602\n>>> pc = qcel.constants.get('hartree ENERGY in ev', return_tuple=True)\n>>> pc.label\n'Hartree energy in eV'\n>>> pc.data\nDecimal('27.21138602')\n>>> pc.units\n'eV'\n>>> pc.comment\n'uncertainty=0.000 000 17'\n```\n\nAlternatively, with the use of the [Pint unit conversion package](https://pint.readthedocs.io/en/latest/), arbitrary\nconversion factors can be obtained:\n\n```python\n>>> qcel.constants.conversion_factor(\"bohr\", \"miles\")\n3.2881547429884475e-14\n```\n\n### Covalent Radii\n\nCovalent radii are accessible for most of the periodic table from [Alvarez, Dalton Transactions (2008) doi:10.1039/b801115j](https://doi.org/10.1039/b801115j) ([details](qcelemental/data/alvarez_2008_covalent_radii.py.py)).\n\n```python\n>>> import qcelemental as qcel\n>>> qcel.covalentradii.get('I')\n2.626719314386381\n>>> qcel.covalentradii.get('I', units='angstrom')\n1.39\n>>> qcel.covalentradii.get(116)\nTraceback (most recent call last):\n...\nqcelemental.exceptions.DataUnavailableError: ('covalent radius', 'Lv')\n>>> qcel.covalentradii.get(116, missing=4.0)\n4.0\n>>> qcel.covalentradii.get('iodine', return_tuple=True).dict()\n{'numeric': True, 'label': 'I', 'units': 'angstrom', 'data': Decimal('1.39'), 'comment': 'e.s.d.=3 n=451', 'doi': 'DOI: 10.1039/b801115j'}\n```\n\n### van der Waals Radii\n\nVan der Waals radii are accessible for most of the periodic table from [Mantina, J. Phys. Chem. A (2009) doi: 10.1021/jp8111556](https://pubs.acs.org/doi/10.1021/jp8111556) ([details](qcelemental/data/mantina_2009_vanderwaals_radii.py)).\n\n```python\n>>> import qcelemental as qcel\n>>> qcel.vdwradii.get('I')\n3.7416577284064996\n>>> qcel.vdwradii.get('I', units='angstrom')\n1.98\n>>> qcel.vdwradii.get(116)\nTraceback (most recent call last):\n...\nqcelemental.exceptions.DataUnavailableError: ('vanderwaals radius', 'Lv')\n>>> qcel.vdwradii.get('iodine', return_tuple=True).dict()\n{'numeric': True, 'label': 'I', 'units': 'angstrom', 'data': Decimal('1.98'), 'doi': 'DOI: 10.1021/jp8111556'}\n```\n\n",
"bugtrack_url": null,
"license": "BSD-3-Clause",
"summary": "Core data structures for Quantum Chemistry.",
"version": "0.29.0",
"project_urls": {
"Documentation": "http://docs.qcarchive.molssi.org/projects/qcelemental/en/latest/",
"Homepage": "https://github.com/MolSSI/QCElemental"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "577a1fbdf6bb344e8c92c64080a64d9d811ae4eb6d5d3233e1b9ca803296024f",
"md5": "527e15c3c13d4fc0c6fbc88e2c60082c",
"sha256": "248420b1766489c48b72aaa5f306240f8c305a08e5a4b01c7cb305d6d831967f"
},
"downloads": -1,
"filename": "qcelemental-0.29.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "527e15c3c13d4fc0c6fbc88e2c60082c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.7",
"size": 339642,
"upload_time": "2025-01-13T18:10:21",
"upload_time_iso_8601": "2025-01-13T18:10:21.880139Z",
"url": "https://files.pythonhosted.org/packages/57/7a/1fbdf6bb344e8c92c64080a64d9d811ae4eb6d5d3233e1b9ca803296024f/qcelemental-0.29.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e7ad1cf6bb9eec08e7455b6c5736c322bbc42f81dc847898d18cf00e9ec9871f",
"md5": "4e45a6260e72e5ea210754d02a8d058f",
"sha256": "bf634ee652e7d95e906e291989513224233b1d705c26afeac86e451f316b3c04"
},
"downloads": -1,
"filename": "qcelemental-0.29.0.tar.gz",
"has_sig": false,
"md5_digest": "4e45a6260e72e5ea210754d02a8d058f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.7",
"size": 306949,
"upload_time": "2025-01-13T18:10:23",
"upload_time_iso_8601": "2025-01-13T18:10:23.839937Z",
"url": "https://files.pythonhosted.org/packages/e7/ad/1cf6bb9eec08e7455b6c5736c322bbc42f81dc847898d18cf00e9ec9871f/qcelemental-0.29.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-13 18:10:23",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "MolSSI",
"github_project": "QCElemental",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "qcelemental"
}