A lattice model for simulating solid state reactions.
rxn-ca is a Python library for predicting the outcome of solid-state synthesis reactions using a cellular automaton approach. It uses thermodynamic data from the Materials Project to enumerate possible reactions and simulate phase evolution during synthesis.
git clone https://github.com/mcgalcode/rxn-ca.git
cd rxn-ca
pip install -e .For optional features:
pip install -e ".[optimization]" # Bayesian/genetic optimization
pip install -e ".[workflow]" # Jobflow integration
pip install -e ".[vis]" # Visualization toolsfrom rxn_ca.core.recipe import ReactionRecipe
from rxn_ca.core.heating import HeatingSchedule, HeatingStep
# Define reactants (mole ratios)
reactants = {"MgO": 1, "Al2O3": 1}
# Create heating schedule
heating_schedule = HeatingSchedule.build(
HeatingStep.sweep(500, 1600, stage_length=1, temp_step_size=50),
HeatingStep.hold(1600, stage_length=20)
)
# Create recipe
recipe = ReactionRecipe(
reactant_amounts=reactants,
heating_schedule=heating_schedule
)Full documentation is available at mcgalcode.github.io/rxn-ca
- Getting Started - Installation and setup
- Basic Usage - Complete simulation walkthrough
- Using Jobflow - Parallel simulations on HPC
- Python >= 3.9
- Materials Project API key (get one here)
BSD-3-Clause