Chemics
Chemics is a Python package for chemistry and chemical engineering applications. It is open-source and contributions from the scientific community are encouraged.
Installation
If you don't have Python installed on your computer, the Anaconda or Miniconda distribution of Python is recommended for scientific computing. After setting up Python, the Chemics package can be downloaded and installed using the pip package manager.
$ pip install chemics
Usage
The example below imports the Chemics package and uses the Gas class to calculate the density and viscosity of nitrogen gas at a temperature of 773 K and pressure of 101,325 Pa.
import chemics as cm
gas = cm.Gas("N2", 773)
rho = gas.density()
mu = gas.viscosity()
print("Nitrogen gas properties at 773 K and 101,325 Pa")
print(f"density {rho:.4f} kg/m³")
print(f"viscosity {mu:.2f} μP")
This prints the following:
Nitrogen gas properties at 773 K and 101,325 Pa
density 0.4416 kg/m³
viscosity 363.82 μP
This example uses the ChemicalEquation class to get properties of the reactants and products from a given chemical equation.
import chemics as cm
ce = cm.ChemicalEquation("2 HCl + 2 Na -> 2 NaCl + H2")
ce.is_balanced()
# This returns True for balanced equation
ce.rct_properties
# This returns a dataframe of the reactant properties
# HCl Na
# moles 2 2
# species HCl Na
# molwt 36.458 22.99
# mass 72.916 45.98
# molfrac 0.5 0.5
# massfrac 0.613275 0.386725
More examples are available in the documentation.
Documentation
Documentation for the Chemics package is available at chemics.readthedocs.io.
Contributing
See the CONTRIBUTING.md document for guidelines on contributing to the Chemics package.
License
Chemics is available under the MIT License - see the LICENSE file for more information.
Release files for chemics 24.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| chemics-24.1.tar.gz | 1.7 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chemics-24.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 3.3 MB
Release files / chemics-24.1.tar.gz
| Download URL | chemics-24.1.tar.gz |
|---|---|
| Size | 1.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
470828a662f2481190f38dc3eb83a1eb88968871433a98023a1dc891dd547d22
|
|
BLAKE2b-256 checksum How to use checksums |
98ee73ff813a3002b2a4836fcf0fb8063b48502310bac603c25de3bf63cccbfd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.13
|
Release files / chemics-24.1-py2.py3-none-any.whl
| Download URL | chemics-24.1-py2.py3-none-any.whl |
|---|---|
| Size | 1.7 MB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
c1461050d256ad97d754e768573350c71db1b5a700448dafae234e57aa830139
|
|
BLAKE2b-256 checksum How to use checksums |
f549a5bae8d6f0d458c9b2338fd44426435466159524d99ec54438f5352047f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.13
|