MaxwellLink: A unified framework for self-consistent light-matter simulations
Project description
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 normal-mode cavity and laser driven dynamics, 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.
Key Features
- 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.
- EM dynamics from simple to complex systems.
- Heterogeneous molecular theories 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.
Supported light-matter simulation schemes
The most appealing feature of MaxwellLink is that it enables the self-consistent coupling of one EM solver plus N different molecular drivers concurrently.
The socket communication technique further allows distributed light-matter simulations on different machines and HPC nodes -- both the EM solver and molecular drivers can have their own MPI parallel processes.
As of today, the following EM solvers and molecular drivers are supported.
Supported EM solvers
- Full-feature MEEP FDTD,
- Single-mode cavity,
- Multimode Fabry-Perot cavity, and
- Arbitrary laser driven dynamics.
Supported molecular drivers
- Two-level systems and simple harmonic oscillators,
- QuTiP model Hamiltonians,
- In-house RT-TDDFT/Ehrenfest dynamics using Psi4 integrals,
- ASE classical dynamics,
- Direct socket connection to modified LAMMPS for classical MD via
fix mxl, - Direct socket connection to modified DFTB+ for tight-binding BOMD/real-time Ehrenfest dynamics.
Quick Start
Create a fresh conda environment and install using pip:
pip install maxwelllink
Optional drivers (MEEP FDTD, QuTiP, Psi4, ASE, LAMMPS) can be added by following the instructions in the documentation.
Documentation
Visit the documentation for installation details, tutorials, API reference, and guidelines on extending MaxwellLink.
Tutorials
The jupyter notebook tutorials are located at tutorials/. Users may also view the tutorials rendered at the documentation website.
Running simulations with AI Agents
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 init
Then 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 clean
If 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 hpc
Citation
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]
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 maxwelllink-0.3.6.tar.gz.
File metadata
- Download URL: maxwelllink-0.3.6.tar.gz
- Upload date:
- Size: 4.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
258af766212185941574cceb2e7a2c47d33f0dc8ab9d503c76ccd80e9f79b180
|
|
| MD5 |
a0499997f5a0daa0d80ea318e74b22eb
|
|
| BLAKE2b-256 |
4d04acc3aa178fb29aea5273a13271133f9920f657813ecea6ca833e5478f812
|
File details
Details for the file maxwelllink-0.3.6-py3-none-any.whl.
File metadata
- Download URL: maxwelllink-0.3.6-py3-none-any.whl
- Upload date:
- Size: 4.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cf096d930ca02e8aa22c1c986bb88ec414cf629d711f76a78952283c1523591
|
|
| MD5 |
3a5c2447b63a63b67f21c67d3fd7b60d
|
|
| BLAKE2b-256 |
8d1c04dd6b3b262dd013f581c605ff820cd008360cb706ce2ca80278f4a922c1
|