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.
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, i.e., 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 in 1D, 2D, 3D, and cylindrical coordinates (3D simulations at 2D cost),
- 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, - (beta version) Lorentz-Bath model for studying energy transfer between polaritons and dark modes,
- (beta version) Direct socket connection to modified DFTB+ for tight-binding BOMD/real-time Ehrenfest dynamics.
- (beta version) Direct socket connection to modified CP2K for real-time TDDFT/Ehrenfest dynamcis in both non-periodic and periodic systems.
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. 22, 2725–2738 (2026). [data] [arXiv:2512.06173]
Publications using MaxwellLink
-
X Ji, and TE Li. Nonlinear Freezing of Vibrational Polariton Transport via Mesoscale Simulations. Nano Lett. acs.nanolett.6c03367 (2026). [data]
-
Meng, G.; Li, T. E. Molecular Electrodynamic Relaxation in Dielectric and Plasmonic Cavities Submitted (2026).
Metadata
Release files for maxwelllink 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| maxwelllink-0.5.0.tar.gz | 4.7 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| maxwelllink-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.8 MB
Release files / maxwelllink-0.5.0.tar.gz
| Download URL | maxwelllink-0.5.0.tar.gz |
|---|---|
| Size | 4.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af5dc48ccb1f9ab29308631cbebf24b36b5893482dfff9170e0089044ce0105c
|
|
BLAKE2b-256 checksum How to use checksums |
75fc75c1c01c6712388eee0da52b92c81530745c7c2ebf1fd93158bbcc716ffa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / maxwelllink-0.5.0-py3-none-any.whl
| Download URL | maxwelllink-0.5.0-py3-none-any.whl |
|---|---|
| Size | 5.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
512024415e0d075604803186579f7968ea3fc5ec2b0b56a14a005f020bdec886
|
|
BLAKE2b-256 checksum How to use checksums |
5d488f74817c26f96806ce5963a90387bfe2ab8b3d3ff209e846dd8ebe207ce0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for maxwelllink 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.