MaxwellLink is a free and open-source framework for self-consistent light–matter simulations. It connects electromagnetic solvers, such as MEEP FDTD or the built-in single-mode cavity, to a wide range of molecular drivers, from multilevel open quantum systems to (nonadiabatic) first-principles molecular dynamics.
This code supports both exploratory demonstrations and production-scale calculations. In particular, its socket-based architecture allows large-scale self-consistent light–matter simulations to run efficiently across multiple HPC nodes.
The latest version of MaxwellLink (v0.3) ships with AI Agent Skills. With simple natural language inputs, users can easily create input files and run jobs on both local machines and HPC systems.
- Embracing state-of-the-art ecosystems in both computational electrodynamics and quantum chemistry, extending the boundary of light-matter simulations.
- Unified Python interfaces for socket-connected and embedded molecular drivers in light-matter simulations.
- Heterogeneous molecular theories including TLS, QuTiP model Hamiltonians, in-house RT-TDDFT/Ehrenfest dynamics using Psi4 integrals, ASE classical dynamics, and modified LAMMPS via
fix mxl, all in one simulation. - Extensible code structure to add custom EM solvers or molecular drivers with minimal effort.
- Embedded AI Agent Skills to allow users to chat within, e.g., Visual Code IDE + Codex, to directly generate desired input files and even run jobs on both local machines and HPC systems.
Create a fresh conda environment and install using pip:
pip install maxwelllinkOptional drivers (MEEP FDTD, QuTiP, Psi4, ASE, LAMMPS) can be added by following the instructions in the documentation.
Inspired by the recently developed FermiLink agent framework, MaxwellLink now provides an elegant method for integrating with AI agents. All we need is to type in mxl init in a working directory:
mkdir myproject
cd myproject/
mxl initThen we can interact with any local AI agent (Claude Code, OpenAI Codex, Gemini CLI, or their desktop apps, VS Code IDE extensions, etc) for autonomous light-matter simulations by simple natural language prompts.
mxl init will set up the package knowledge base (source code tree + agent skills layer) in your working directory for agent reasoning. After the simulation, we can simply clean up the package knowledge base by:
mxl cleanIf your machine supports SLURM job management (such as HPCs), run the following command to set up the HPC environment, so the agent can automatically use the correct SLURM environments for large-scale HPC simulations.
mxl hpcVisit the documentation for installation details, tutorials, API reference, and guidelines on extending MaxwellLink.
The jupyter notebook tutorials are located at tutorials/. Users may also view the tutorials rendered at the documentation website.
If you find MaxwellLink helpful for your research, please cite the following reference:
- X Ji †, AF Bocanegra Vargas †, G Meng, and TE Li. MaxwellLink: A Unified Framework for Self-Consistent Light-Matter Simulations. J. Chem. Theory Comput. ASAP (2026). [data] [arXiv:2512.06173]