Chemical Reaction Network generator for heterogenous catalysis
Project description
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-v1, 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. Install External Evaluators & Runtimes
care-crn interfaces with several external ML Interatomic Potentials (MLIPs). These must be installed separately.
MLIP Evaluators
-
For FAIRChem-v1 potentials: Install
torch_sparseandtorch_scatterby following the instructions in the PyTorch Geometric page. Then:pip install care-crn[ocp]
-
For other evaluators: You can install MACE, PET-MAD, Orb, and SevenNet by running:
pip install care-crn[mace] pip install care-crn[petmad] pip install care-crn[orb] pip install care-crn[sevennet]
Or all at once:
pip install care-crn[ocp,mace,petmad,orb,sevennet]
NOTE: There is currently a dependency clash during installation of OCP and MACE evaluators related to the
e3nnlibrary (see: this issue for MACE). Installation might result in an incompatibility warning, but both evaluators should work correctly if the installation order shown above is followed.
Julia (Microkinetic modeling)
To run microkinetic simulations with Julia, install it and the required packages:
curl -fsSL https://install.julialang.org | sh -s -- --yes && ~/.juliaup/bin/juliaup add 1.11
julia -e 'import Pkg; Pkg.add("DifferentialEquations"); Pkg.add("LinearSolve");'
⏲ Julia setup time estimate: ~13min (Ubuntu), ~9min (macOS)
3. 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)
-
Clone the repo:
git clone git@github.com:LopezGroup-ICIQ/care.git cd care
-
Create a conda environment:
conda create -n care_env python==3.12 conda activate care_env
-
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.
-
Install optional dependencies:
python3 -m pip install -e .[ocp] python3 -m pip install -e .[mace] # 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
- A Foundational Model for Reaction Networks on Metal Surfaces Authors: S. Morandi, O. Loveday, T. Renningholtz, S. Pablo-García, R. A. Vargas Hernáńdez, R. R. Seemakurthi, P. Sanz Berman, R. García-Muelas, A. Aspuru-Guzik, and N. López DOI: 10.26434/chemrxiv-2024-bfv3d
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file care_crn-0.5.2.tar.gz.
File metadata
- Download URL: care_crn-0.5.2.tar.gz
- Upload date:
- Size: 3.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a6efe051b84664d7f46e53c642b26c5d549f8693ccfd3150d951ae76182be2f
|
|
| MD5 |
efda5217cfc08f0bb0e811119085b082
|
|
| BLAKE2b-256 |
2785f3f1f958249928f480e04a3415c6aef5d1bbf53887987f4b80afe6c841f9
|
Provenance
The following attestation bundles were made for care_crn-0.5.2.tar.gz:
Publisher:
publish-to-pypi.yml on LopezGroup-ICIQ/care
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
care_crn-0.5.2.tar.gz -
Subject digest:
3a6efe051b84664d7f46e53c642b26c5d549f8693ccfd3150d951ae76182be2f - Sigstore transparency entry: 1110818704
- Sigstore integration time:
-
Permalink:
LopezGroup-ICIQ/care@57c553268c9f8150dbd41a9d3bee37431d15fa00 -
Branch / Tag:
refs/tags/v0.5.2 - Owner: https://github.com/LopezGroup-ICIQ
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@57c553268c9f8150dbd41a9d3bee37431d15fa00 -
Trigger Event:
push
-
Statement type:
File details
Details for the file care_crn-0.5.2-py3-none-any.whl.
File metadata
- Download URL: care_crn-0.5.2-py3-none-any.whl
- Upload date:
- Size: 2.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35b97d4809c61c04f4d1e077341d72b5f96a0c390f65a8214e5e3b9b9413285d
|
|
| MD5 |
cc759c7a8d758c931c86cede99a2f17c
|
|
| BLAKE2b-256 |
fb34659285e855706ba577a3f342d0b1d9d32b020fed05e521daf6b02ef8b82c
|
Provenance
The following attestation bundles were made for care_crn-0.5.2-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on LopezGroup-ICIQ/care
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
care_crn-0.5.2-py3-none-any.whl -
Subject digest:
35b97d4809c61c04f4d1e077341d72b5f96a0c390f65a8214e5e3b9b9413285d - Sigstore transparency entry: 1110818711
- Sigstore integration time:
-
Permalink:
LopezGroup-ICIQ/care@57c553268c9f8150dbd41a9d3bee37431d15fa00 -
Branch / Tag:
refs/tags/v0.5.2 - Owner: https://github.com/LopezGroup-ICIQ
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@57c553268c9f8150dbd41a9d3bee37431d15fa00 -
Trigger Event:
push
-
Statement type: