Table of Contents
Fetching ...

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

Xinwei Ji, Andres Felipe Bocanegra Vargas, Gang Meng, Tao E. Li

TL;DR

MaxwellLink addresses the challenge of coupling light and matter across disparate time and length scales by providing a modular, open-source framework that unifies classical EM solvers with diverse molecular drivers through a robust socket-based interface. It supports a spectrum of EM propagation methods—from grid-based FDTD to single-mode cavities—and molecular dynamics models, enabling self-consistent simulations on large HPC resources. The authors demonstrate the framework with four applications: superradiance, radiative energy transfer, vibrational strong coupling, and plasmonic heating, illustrating both accuracy and scalability and highlighting the ability to mix levels of theory for light and matter components. This platform has the potential to accelerate exploration across spectroscopy, quantum optics, plasmonics, and polaritonics by providing a flexible, extensible, and scalable tool for self-consistent light-matter simulations.

Abstract

A major challenge in light-matter simulations is bridging the disparate time and length scales of electrodynamics and molecular dynamics. Current computational approaches often rely on heuristic approximations of either the electromagnetic (EM) or material component, hindering the exploration of complex light-matter systems. Herein, MaxwellLink -- a modular, open-source Python framework -- is developed for the massively parallel, self-consistent propagation of classical EM fields interacting with a large heterogeneous molecular ensemble. The package utilizes a robust TCP/UNIX socket interface to couple EM solvers with a wide range of external molecular drivers. This decoupled architecture allows users to seamlessly switch between levels of theory of either the EM solver or molecules without modifying the counterpart. Crucially, MaxwellLink supports EM solvers spanning from single-mode cavities to full-feature three-dimensional finite-difference time-domain (FDTD) engines, and molecules described by multilevel open quantum systems, force-field and first-principles molecular dynamics, and nonadiabatic real-time Ehrenfest dynamics. Benefiting from the socket-based design, the EM engine and molecular drivers scale independently across multiple high-performance computing (HPC) nodes, facilitating large-scale simulations previously inaccessible to existing numerical schemes. The versatility and accuracy of this code are demonstrated through applications including superradiance, radiative energy transfer, vibrational strong coupling in Bragg resonators, and plasmonic heating of molecular gases. By providing a unified, extensible engine, MaxwellLink potentially offers a powerful platform for exploring emerging phenomena across the research fronts of spectroscopy, quantum optics, plasmonics, and polaritonics.

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

TL;DR

MaxwellLink addresses the challenge of coupling light and matter across disparate time and length scales by providing a modular, open-source framework that unifies classical EM solvers with diverse molecular drivers through a robust socket-based interface. It supports a spectrum of EM propagation methods—from grid-based FDTD to single-mode cavities—and molecular dynamics models, enabling self-consistent simulations on large HPC resources. The authors demonstrate the framework with four applications: superradiance, radiative energy transfer, vibrational strong coupling, and plasmonic heating, illustrating both accuracy and scalability and highlighting the ability to mix levels of theory for light and matter components. This platform has the potential to accelerate exploration across spectroscopy, quantum optics, plasmonics, and polaritonics by providing a flexible, extensible, and scalable tool for self-consistent light-matter simulations.

Abstract

A major challenge in light-matter simulations is bridging the disparate time and length scales of electrodynamics and molecular dynamics. Current computational approaches often rely on heuristic approximations of either the electromagnetic (EM) or material component, hindering the exploration of complex light-matter systems. Herein, MaxwellLink -- a modular, open-source Python framework -- is developed for the massively parallel, self-consistent propagation of classical EM fields interacting with a large heterogeneous molecular ensemble. The package utilizes a robust TCP/UNIX socket interface to couple EM solvers with a wide range of external molecular drivers. This decoupled architecture allows users to seamlessly switch between levels of theory of either the EM solver or molecules without modifying the counterpart. Crucially, MaxwellLink supports EM solvers spanning from single-mode cavities to full-feature three-dimensional finite-difference time-domain (FDTD) engines, and molecules described by multilevel open quantum systems, force-field and first-principles molecular dynamics, and nonadiabatic real-time Ehrenfest dynamics. Benefiting from the socket-based design, the EM engine and molecular drivers scale independently across multiple high-performance computing (HPC) nodes, facilitating large-scale simulations previously inaccessible to existing numerical schemes. The versatility and accuracy of this code are demonstrated through applications including superradiance, radiative energy transfer, vibrational strong coupling in Bragg resonators, and plasmonic heating of molecular gases. By providing a unified, extensible engine, MaxwellLink potentially offers a powerful platform for exploring emerging phenomena across the research fronts of spectroscopy, quantum optics, plasmonics, and polaritonics.

Paper Structure

This paper contains 25 sections, 32 equations, 5 figures, 3 tables.

Figures (5)

  • Figure 1: Modular design in the MaxwellLink package for self-consistent EM-molecular simulations. The EM solver interfaces with various abstract Molecule instances, which store only EM-relavent information such as the molecular location and size within a real-space EM grid. These abstract Molecule instances communicate with external molecular drivers via a SocketHub instance using the TCP/UNIX socket protocol. The corresponding Python input for launching MaxwellLink simulations is provided in Code Listing \ref{['code:sample']}. Python molecular drivers can also attach directly to the abstract Molecule instances without employing the socket interface.
  • Figure 2: Superradiance of $N$ TLSs in 2D vacuum. (a) Time-resolved excited-state population dynamics where the TLSs are initialized in the same coherent state. Simulation results for $N=1$ (solid red) and $N=4$ (solid blue) TLSs are compared with the corresponding analytical spontaneous emission decay dynamics (black dotted). (b) Time cost for TCP socket communication per TLS driver. Up to $2^{16}$ independent TLS drivers, initialized across 32 computing nodes (4096 CPU cores), connect to the MEEP EM solver concurrently via TCP socket communication.
  • Figure 3: Radiative energy transfer from a TLS donor to an HCN acceptor in 3D vacuum. (a) Excited-state spectrum of the HCN molecule at its optimized geometry, calculated at the B3LYP/cc-pVDZ level of theory. The in-house RT-TDDFT code within MaxwellLink (dotted red) is compared with the LR-TDDFT calculations available in Psi4 (solid black). (b) Energy gain in the HCN acceptor for an excited TLS donor transferring energy via classical electric fields (setup shown in the inset). The HCN acceptor is modeled using varying levels of theory: RT-TDDFT (solid red), RT-Ehrenfest dynamics (dash-dotted gray), a TLS containing only the strongest electronic transition in HCN (solid black), and multi-level models using the QuTiP interface containing the lowest 30 (dashed cyan) or 182 (dotted blue) TDDFT singlet states. The kinetic energy contribution in the RT-Ehrenfest dynamics is highlighted by the shadowed gray region.
  • Figure 4: Vibrational strong coupling of liquid water using MaxwellLink. (a) IR spectra of liquid water under single-mode CavMD, where a lossless cavity mode at $\omega_{\rm{c}}=3550 \ \text{cm}^{-1}$ (vertical dashed line) is coupled to the liquid water dipole moment along the $z$-axis. (b) Corresponding Maxwell-MD simulation results for liquid water confined in a 1D Bragg resonator. The inset displays a visualization of the 1D Bragg resonator (dielectric layers in the background and EM fields represented by color gradients) and the corresponding transmission spectrum. The three dashed vertical lines in the inset correspond to the three vibrational bands of liquid water. In the single-mode CavMD and Maxwell-MD simulations, a single LAMMPS driver, containing varying numbers of H2O molecules, is coupled to the single-mode or MEEP FDTD EM solver, respectively. (c) MaxwellLink stepping time versus the number of CPU cores used by the LAMMPS driver. The driver code utilizes MPI for parallel calculations of $N_{\ch{H2O}}$H2O molecules, with the number of CPU cores equal to $N_{\ch{H2O}}/216$.
  • Figure 5: Vibrational heating of HCN molecules on top of 3D plasmonic metamaterials. (a) The simulation setup contains a square lattice of HCN molecules (oriented along the $y$-direction) above a 3D plasmonic metamaterial consisting of a square lattice of cylindrical Pt rods on a semi-infinite Si substrate. A single unit cell containing one Pt rod and 256 HCN molecules is simulated, with periodic boundary conditions applied along the $xy$-plane and absorbing boundary conditions along the $z$-direction. (b) Absorption spectrum of the plasmonic metamaterial in the absence of HCN molecules. This geometry supports a surface plasmonic mode near resonance with the C-H stretch mode of HCN at $\omega_{\rm v}=3466$ cm$^{-1}$ (dashed green). (c) Electric field intensity distribution in a unit cell following a $y$-polarized Gaussian pulse excitation of the plasmonic mode in the absence of molecules. (d)-(f) Real-space energy gain distribution of individual HCN molecules under the same Gaussian pulse excitation of the hybrid plasmonic-molecular system. The molecules are simulated using (d) TLSs, (e) first-principles Born--Oppenheimer MD, and (f) RT-Ehrenfest dynamics at the B3LYP/cc-pVDZ level of theory.