Skip to main content

MaxwellLink: A unified framework for self-consistent light-matter simulations

Project description

MaxwellLink icon

Docs badge PyPI version License: GPLv2 Python versions arXiv:2512.06173 10.1021/acs.jctc.5c02028

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, supporting
    • full-feature MEEP FDTD,
    • single-mode cavity,
    • multimode Fabry-Perot cavity, and
    • arbitrary laser driven dynamics.
  • Heterogeneous molecular theories in one simulation, including
    • two-level systems and simple harmonic oscillators,
    • QuTiP model Hamiltonians,
    • in-house RT-TDDFT/Ehrenfest dynamics using Psi4 integrals,
    • ASE classical dynamics,
    • direction socket connection to modified LAMMPS for classical MD via fix mxl,
    • direction socket connection to modified DFTB+ for tight-binding BOMD/real-time Ehrenfest dynamics.
  • 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.

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:

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

maxwelllink-0.3.5.tar.gz (4.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

maxwelllink-0.3.5-py3-none-any.whl (4.4 MB view details)

Uploaded Python 3

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page