Skip to content

Install

uv tool install git+https://github.com/ChemE-as-Code/core.git

Needs Python 3.12+. pyDEXPI comes from PyPI, pinned to one version in pyproject.toml. cheme --version prints the pyDEXPI that was installed. For PNG output (cheme render --png) install the png extra, which adds resvg: uv tool install 'cheme-as-code[png] @ git+https://github.com/ChemE-as-Code/core.git'. Stream properties (cheme process props) and the phase calculations of chemeascode.domains.process.thermodynamics need the props extra (thermo and chemicals, pinned); the viewer API (cheme serve) the serve extra; unit conversion beyond K, °C and the pressure units of the process YAML (chemeascode.foundation.units) the units extra (Pint); SMILES checks in chemeascode.domains.chemistry the chemistry extra (RDKit). Extras combine: cheme-as-code[png,props,serve].

The ChemSep SRK interaction parameters (kij) of the Redlich-Kwong-Soave phase calculation are not shipped, as their licence is not yet confirmed. cheme data fetch chemsep-srk downloads ChemSep-LITE (http://www.chemsep.org, plain HTTP; the archive's sha256 is checked), or reads a downloaded copy with --zip lite.zip, and installs the converted srk.json in the user data directory ($CHEME_DATA_DIR if set; cheme data status shows where). Without it every SRK kij is zero, and the result's notes say so.

Component properties (cheme chemistry props NAME -p PROPERTY) come from PubChem, the NIST WebBook, OSHA and thermo; --source Thermo stays offline. SMILES checks in the kinetics tools need the chemistry extra (RDKit). Check the installation with:

cheme --version   # cheme-as-code, pyDEXPI and the interpreter path

To work on cheme-as-code itself, see Contributing and the development commands:

Development

uv sync --all-extras
uv run pytest -n auto   # in parallel (pytest-xdist); plain `uv run pytest` runs serially
uv run ruff format && uv run ruff check
uv run python scripts/build_snippets.py tests/data/reference_pid.xml   # regenerate skill snippets
uv run python scripts/build_skill_manifest.py                          # after changing a skill

The package is organised as a framework of foundation, ten engineering domains, a project layer, interfaces, integrations and templates; see docs/framework/architecture.md for the modules and their import rules, and docs/framework/contributing.md for where new functions, skills, schemas, integrations and tests go. Every capability has a Python function that the CLI wraps, for example chemeascode.domains.process.streams.stream_report(root, case) behind cheme process streams.