ALchemist: Active Learning Toolkit for Chemical and Materials Research
ALchemist is a modular Python toolkit that brings active learning and Bayesian optimization to experimental design in chemical and materials research. It is designed for scientists and engineers who want to efficiently explore or optimize high-dimensional variable spacesβwithout writing codeβusing an intuitive graphical interface.
NREL Software Record: SWR-25-102
Full user guide and documentation:
https://nrel.github.io/ALchemist/
ALchemist accelerates discovery and optimization by combining:
- Flexible variable space definition: Real, integer, and categorical variables with bounds or discrete values.
- Probabilistic surrogate modeling: Gaussian process regression via BoTorch or scikit-optimize backends.
- Advanced acquisition strategies: Efficient sampling using qEI, qPI, qUCB, and qNegIntegratedPosteriorVariance.
- Modern web interface: React-based UI with FastAPI backend for seamless active learning workflows.
- Autonomous optimization: Human-out-of-the-loop optimization for real-time process control.
- Experiment tracking: CSV logging, reproducible random seeds, and error tracking.
- Extensibility: Abstract interfaces for models and acquisition functions enable future backend and workflow expansion.
- Interactive Optimization: Desktop GUI or web UI for manual experiment design
- Programmatic Workflows: Python Session API for scripts and notebooks
- Autonomous Operation: REST API for real-time process control (reactors, synthesis, etc.)
- Remote Collaboration: Web-based interface accessible from any device
Requirements: Python 3.11 or higher
We recommend using Anaconda to manage your Python environments.
1. Create a new environment:
conda create -n alchemist-env python=3.11
conda activate alchemist-env2. Install ALchemist:
Option A: From PyPI (recommended):
pip install alchemist-nrelOption B: From GitHub:
pip install git+https://github.com/NREL/ALchemist.gitOption C: Development install (for contributors):
git clone https://github.com/NREL/ALchemist.git
cd ALchemist
pip install -e .All dependencies are specified in pyproject.toml and will be installed automatically.
Note: The web UI is pre-built and included in the package. You do not need Node.js/npm to use ALchemist unless you're developing the frontend.
Web Application (Recommended):
alchemist-web
# Opens at http://localhost:8000Desktop Application:
alchemist
# Launches CustomTkinter GUIDevelopment Mode (Frontend Developers):
# Terminal 1: Backend with hot-reload
python run_api.py
# Terminal 2: Frontend with hot-reload
cd alchemist-web
npm install # First time only
npm run dev
# Opens at http://localhost:5173Docker Deployment:
docker pull ghcr.io/nrel/alchemist:latest
docker run -p 8000:8000 ghcr.io/nrel/alchemist:latest
# Or build from source:
cd docker
docker-compose up --buildFor step-by-step instructions, see the Getting Started section of the documentation.
ALchemist/
βββ alchemist_core/ # Core Python library
βββ alchemist-web/ # React frontend application
βββ api/ # FastAPI backend
βββ docker/ # Docker configuration files
βββ scripts/ # Build and development scripts
βββ tests/ # Test suite
βββ docs/ # Documentation (MkDocs)
βββ memory/ # Development notes and references
βββ run_api.py # API server entry point
ALchemist is under active development at NREL as part of the DataHub project within the ChemCatBio consortium. It is designed to be approachable for non-ML researchers and extensible for advanced users. Planned features include:
- Enhanced initial sampling and DoE methods
- Additional model types and acquisition strategies
- Improved visualization tools
- GUI reimplementation in PySide6 for broader compatibility
- Support for multi-output models and multi-objective optimization
If you encounter any issues or have questions, please open an issue on GitHub or contact ccoatney@nrel.gov.
For the latest known issues and troubleshooting tips, see the Issues & Troubleshooting Log.
We appreciate your feedback and bug reports to help improve ALchemist!
This project is licensed under the BSD 3-Clause License. See the LICENSE file for details.
