Agent Skill
2/7/2026mxl-meep
This skill should be used when users need MaxwellLink + Meep FDTD workflows, including embedded vs socket coupling, MPI considerations, and recommended templates.
T
taoeli
6GitHub Stars
1Views
npx skills add TaoELi/MaxwellLink
SKILL.md
| Name | mxl-meep |
| Description | This skill should be used when users need MaxwellLink + Meep FDTD workflows, including embedded vs socket coupling, MPI considerations, and recommended templates. |
name: mxl-meep description: This skill should be used when users need MaxwellLink + Meep FDTD workflows, including embedded vs socket coupling, MPI considerations, and recommended templates.
Meep FDTD workflows (MaxwellLink)
Confirm prerequisites
- Ensure
pymeepis installed and importable before generating Meep-based inputs. - Use
mxl.MeepSimulation(not rawmeep.Simulation) when using the unifiedmxl.MoleculeAPI.
Build a Meep-coupled run
- Set
time_units_fsexplicitly and keep it consistent across analysis. - Create molecules with either:
- Embedded driver:
Molecule(driver=..., driver_kwargs=...) - Socket driver:
SocketHub(...)+Molecule(hub=hub, ...)
- Embedded driver:
- For "baseline" EM-only runs (no molecules), use raw
mp.Simulation(...); switch tomxl.MeepSimulation(...)only when MaxwellLink molecules are present (common when generating reference spectra/fields first, then enabling coupling). - Use
boundary_layers=[mp.PML(...)], setresolution, and keepCourant=0.5(Meep default).
Prefer templates
- Start from the copy-ready templates:
skills/mxl-project-scaffold/assets/templates/meep-tls-embeddedskills/mxl-project-scaffold/assets/templates/meep-tls-socket-unixskills/mxl-project-scaffold/assets/templates/slurm-meep-plasmon-rteh-tcp(3D plasmonic structure + RT-Ehrenfest molecular lattice)
- Use SLURM/HPC patterns from
skills/mxl-hpc-slurm/SKILL.mdfor multi-node socket runs.
References
- Recipes:
skills/mxl-meep/references/meep_run_recipes.md - Docs:
docs/source/em_solvers/meep.rst
MPI/libfabric init tips (macOS/local single-rank)
- Sandbox note: sandboxed runs often block the libfabric endpoint; if
MPI_Init_threadfails withep_enable/socket errors, rerun unsandboxed (sandbox_permissions=require_escalated). - When Matplotlib is imported, set
MPLCONFIGDIR=/tmp/mplconfigto avoid cache permission errors.
Other common bugs
- The
dimensions=...input can only be assigned inmxl.Molecule()notmxl.MeepSimulation(). For example, assigningdimensions=1in bothmxl.Molecule()andmxl.MeepSimulation()will lead to runtime error:meep: cannot require a ez component in a 1D grid. - In 1D and 2D simulations,
mxl.Molecule(or molecular drivers) should have a transition dipole moment along z-direction, becausemxl.MeepSimulation()sets themxl.Moleculeto emit only along z-direction in 1D and 2D.
Skills Info
Original Name:mxl-meepAuthor:taoeli
Download