Skip to main content

Chemical Reaction Network generator for heterogenous catalysis

Project description

PyPI version DOI License: MIT Python 3.11 Python package codecov PyPI Downloads Powered by RDKit

CARE: Catalysis Automated Reaction Evaluator

CARE (Catalytic Automated Reaction Evaluator) is a framework for the automated generation and manipulation of chemical reaction networks (CRNs) in heterogeneous catalysis. CARE is powered by ML-based energy evaluators (GAME-Net-UQ, FairChem, MACE potentials, etc.) and includes kinetic functionalities enabling the quantification of catalytic activity for reactions containing thousands of elementary steps.

🪛 Installation

1. From PyPI

pip install care-crn

2. ML evaluators

care-crn interfaces with several external ML models, most of them ML interatomic potentials (MLIPs). These must be installed separately as they depend on different versions of Pytorch, causing conflicts. You can install FairChemV1 or FairChemV2, MACE, UPET, Orb-v2, and SevenNet by running:

pip install care-crn[mace]
pip install care-crn[fairchemv1]
pip install care-crn[fairchemv2]
pip install care-crn[petmad]
pip install care-crn[orb]
pip install care-crn[sevennet]
pip install care-crn[gamenetuq]

Note: as each ML model depends on specific versions of Python packages (pytorch, e3nn, ase, etc.), starting from care-crn==0.6.0 you will need to create one distinct environment for each ML evaluator you want to employ.

3. Julia microkinetic solver

To run microkinetic simulations, the workflow relies on a Julia backend for high-performance ODE integration. No manual installation is required. Thanks to juliapkg, the first time you execute a simulation that requires the Julia solver, the package will automatically:

  1. Download a private, compatible version of Julia (if you don't already have one).
  2. Install the necessary Julia packages (DifferentialEquations.jl, etc.) defined in src/care/juliapkg.json into an isolated environment.

Note: The very first time you run a simulation, it may take a few extra minutes to download and precompile these dependencies. Subsequent runs will be instantaneous.

⏲ Julia setup time estimate: ~13min (Ubuntu), ~9min (macOS)


4. Developer Installation

If you want to contribute to the code or use the very latest (unstable) version, you can install from the source.

  • Total installation time estimates: ~18min (Ubuntu), ~11min (macOS).
  • 💾 Required disk space: ~6.5 GB (Conda environment), ~4.3 GB (Julia+dependencies)
  1. Clone the repo:

    git clone git@github.com:LopezGroup-ICIQ/care.git
    cd care
    
  2. Create a conda environment:

    conda create -n care_env python==3.12
    conda activate care_env
    
  3. Install the package in "editable" mode:

    python3 -m pip install -e .
    

    NOTE: macOS users might need to launch a new shell at this point in order for the entry points to work correctly.

  4. Install optional dependencies:

    python3 -m pip install -e .[mace]
    python3 -m pip install -e .[fairchemv2]
    # etc.
    

💥 Usage

Blueprint generation

The blueprint can be constructed in two ways, by providing (i) the network carbon and oxygen cutoffs ncc and noc, or (ii) the chemical space as list of SMILES.

gen_crn_blueprint -h  # documentation
gen_crn_blueprint -ncc 2 -noc 1 -o output_name  # Example from ncc and noc
gen_crn_blueprint -cs "CCO" "C(CO)O" -o output_name # Example from user-defined chemical space

CRNs in CARE are stored as compressed .json files.

from care.io import load_network

crn = load_network("blueprint.json.gz")

Evaluation of intermediate and reaction properties

The range of catalyst materials on which CRNs can be evaluated depends on the domain of the data-driven energy evaluator employed. Currently, CARE provides interfaces to GAME-Net-UQ, FairChem-v1 potentials, MACE, Orb, PET-MAD, and SevenNet.

eval_crn -h  # documentation
eval_crn [-i INPUT] [-bp BP] [-o OUTPUT] [-ncpu NUM_CPU]

This script requires an input toml file defining the material/surface of interest, the model of choice and its settings. The output is a ReactionNetwork object stored as pickle file. You can find examples of input files here.

For macOS we noticed a lower performance in the CRN generation due to Python multiprocessing (see Contexts and start methods in the documentation)

Microkinetic simulation

run_kinetic [-i INPUT] [-crn CRN] [-o OUTPUT]

This script runs microkinetic simulation starting from the evaluated reaction network and an input toml file defining the reaction conditions, solver, inlet conditions. The results are stored as a pickle object file.

Run all together

You can run the entire pipeline (blueprint generation ➡ energy evaluation ➡ kinetic simulation) running the care_run script:

care_run -h  # documentation
care_run -i input.toml -o output_name

This will generate a output_name folder with the generated reaction network and additional results from the kinetic simulation. Examples of input .toml files can be found here.

📖 Tutorials

We currently provide two tutorials, available in the notebooks directory:

✒️ License

The code is released under the MIT license.

📜 Reference

Morandi, S., Loveday, O., Renningholtz, T. et al. An end-to-end framework for reactivity in heterogeneous catalysis. Nat. Chem. Eng. (2026). https://doi.org/10.1038/s44286-026-00361-8

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

care_crn-0.6.0.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

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

care_crn-0.6.0-py3-none-any.whl (226.4 kB view details)

Uploaded Python 3

File details

Details for the file care_crn-0.6.0.tar.gz.

File metadata

  • Download URL: care_crn-0.6.0.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for care_crn-0.6.0.tar.gz
Algorithm Hash digest
SHA256 079bbe859f7e5630602ee3f846430498d74cccc55ea7ca6d6a99a432acaa3ce3
MD5 e6f2b0392d989546750f99f5e7316714
BLAKE2b-256 46b99c25f083ac498fdd96df0feb20e6146f75341854aaf315ea1584ce16149e

See more details on using hashes here.

Provenance

The following attestation bundles were made for care_crn-0.6.0.tar.gz:

Publisher: publish-to-pypi.yml on LopezGroup-ICIQ/care

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

File details

Details for the file care_crn-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: care_crn-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 226.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for care_crn-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d8ae57d18407256c8928fb5a985cbd27a075a12b1d88e877ec6db1155322542
MD5 8903225996064889e99695fea5281461
BLAKE2b-256 f938f5b56ced72476c7397fa5b0edf273c6c1bd8226890b62edb3c9c92a59df3

See more details on using hashes here.

Provenance

The following attestation bundles were made for care_crn-0.6.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on LopezGroup-ICIQ/care

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