maxwelllink.cavity.rod module¶
A periodic plasmonic rod-on-mirror cavity with a molecular annulus.
- class maxwelllink.cavity.rod.PlasmonicRod[source]¶
Bases:
DummyCavityA gold-cylinder plasmonic cavity with a molecular side annulus.
Geometries adapted from: Brawley et al. Nat. Chem. 17, 439–447 (2025). https://doi.org/10.1038/s41557-024-01723-6
In 3D, one cylinder occupies a square, Bloch-periodic unit cell in the xy plane, with PML only along z. The cylindrical path is a rotationally symmetric, effective-radius approximation on the (r, z) half plane with radial and z-directed PML; it does not reproduce the square-periodic 3D boundary exactly. The transverse plasmon belongs to an
m = +1orm = -1sector, rather than the z-polarizedm = 0sector used byNPoM.Molecular matter occupies an annulus around the metal cylinder. Repeated calls to
place_molecule()place localized molecules in this annulus in 3D.place_region()creates a continuous socket-susceptibility annulus in either 3D or cylindrical coordinates.A localized off-axis molecule breaks rotational symmetry and cannot be represented by one cylindrical Fourier sector. Consequently, the cylindrical path supports the continuous annular region, while discrete annular molecules require the 3D path.
Examples
Continuous cylindrical molecular medium:
>>> from maxwelllink.cavity import PlasmonicRod >>> cav = PlasmonicRod() >>> region = cav.place_region(hub=hub, real_field_only=False) >>> sim = cav.make_simulation(hub=hub, extra_geometry=[region])
Multiple localized molecules in the 3D unit cell:
>>> cav = PlasmonicRod(dimensions=3) >>> molecules = [ ... cav.place_molecule(hub=hub, hotspot="x_plus"), ... cav.place_molecule(hub=hub, hotspot="x_minus"), ... ] >>> sim = cav.make_simulation(hub=hub, molecules=molecules)
- __init__(radius_nm=RADIUS_NM, lattice_gap_nm=LATTICE_GAP_NM, rod_height_nm=ROD_HEIGHT_NM, mirror_nm=MIRROR_NM, substrate_nm=SUBSTRATE_NM, adhesion_nm=ADHESION_NM, film_nm=FILM_NM, air_nm=AIR_NM, annulus_width_nm=ANNULUS_WIDTH_NM, background_index=1.7, omega_ref=3550.0, units='cm-1', material=None, adhesion_material=None, substrate_material=None, dimensions=CYLINDRICAL, m=-1, polarization='y', source_amplitude=SOURCE_AMPLITUDE, resolution=RESOLUTION, top_pml_nm=TOP_PML_NM, bottom_pml_nm=BOTTOM_PML_NM, radial_padding_nm=RADIAL_PADDING_NM, radial_pml_nm=RADIAL_PML_NM, cell_radius_mode='equal-area', monitor_radius_nm=None)[source]¶
Initialize the plasmonic cylinder-on-mirror cavity.
- Parameters:
radius_nm (float, default: 280.0) – Radius of the gold cylinder.
lattice_gap_nm (float, default: 500.0) – Edge-to-edge separation between neighboring cylinders. The 3D lattice period is
2 * radius_nm + lattice_gap_nm.rod_height_nm (float, default: 100.0) – Height of the gold cylinder.
mirror_nm (float, default: 200.0) – Thickness of the bottom gold mirror.
substrate_nm (float, default: 40.0) – Thickness of the Al2O3 layer above the mirror.
adhesion_nm (float, default: 4.0) – Thickness of the Cr adhesion layer beneath the cylinder.
film_nm (float, default: 200.0) – Height of the dielectric film containing the cylinder. It must be thicker than
rod_height_nm + adhesion_nm.air_nm (float, default: 200.0) – Vacuum height between the film and the top PML.
annulus_width_nm (float, default: 50.0) – Default radial width of molecular matter around the cylinder.
background_index (float, default: 1.7) – Refractive index of the nonresonant film.
omega_ref (float, default: 3550.0) – Reference frequency (or wavelength) in
units.units (str, default: "cm-1") – Units of
omega_ref: “cm-1”, “eV”, “au”, “nm”, or “um”.material (mp.Medium or None, optional) – Cylinder and mirror material. Default:
meep.materials.Au.adhesion_material (mp.Medium or None, optional) – Adhesion material. Default:
meep.materials.Cr.substrate_material (mp.Medium or None, optional) – Substrate material. Default:
meep.materials.Al2O3_aniso.dimensions (int, default: mxl.CYLINDRICAL) –
mxl.CYLINDRICALfor the (r, z) reduction or 3 for the full periodic unit cell.m (int, default: -1) – Cylindrical azimuthal sector,
+1or-1. Ignored in 3D.polarization ({"x", "y"}, default: "y") – Transverse incident polarization. The two choices are degenerate in the cylindrical geometry but select Ex or Ey in 3D.
source_amplitude (float, default: 1e2) – Gaussian probe amplitude used by
linear_spectrum(). The large default follows the finite-temperature LAMMPS-water amplitude ladder and suppresses thermal-emission noise relative to the driven response. It can also be overridden for one measurement withlinear_spectrum(..., source_amplitude=...).resolution (float, default: 125.0) – Meep pixels per micrometer.
top_pml_nm (float) – Top and bottom z-directed PML thicknesses.
bottom_pml_nm (float) – Top and bottom z-directed PML thicknesses.
radial_padding_nm (float, default: 500.0) – Cylindrical clearance between the effective unit-cell radius and the radial PML.
radial_pml_nm (float, default: 800.0) – Cylindrical outer radial PML thickness.
cell_radius_mode ({"equal-area", "half-period", "manual"}) – Effective unit-cell radius used by the cylindrical flux monitor.
"equal-area"preserves the area of the square 3D unit cell.monitor_radius_nm (float or None, optional) – Effective cylindrical radius when
cell_radius_mode="manual".
- property allowed_bounds_nm¶
Per-axis allowed bounds in nm, e.g.
{"x": (-704.5, 704.5)}.
- emission_setup(offset_nm=(0.0, 0.0, 0.0), component=None)[source]¶
Reject the unvalidated local-dipole setup inherited from the base.
- estimate_driver_count(region)[source]¶
Estimate the number of FDTD grid points in an annular region.
This geometric estimate is not the actual socket-driver count. The modified Meep susceptibility writes the authoritative count to its hub’s
driver_count_fileafter the material grid is initialized.
- linear_spectrum(omega_min, omega_max, units='cm-1', **kwargs)¶
Compute the far-field linear spectrum of the cavity: the probe declared by
optical_setup().This gives transmission/reflection/absorption for mirror cavities and scattering/absorption/extinction for plasmonic nanocavities.
For the local-dipole (Purcell) observables, use
purcellinstead.- Parameters:
omega_min (float) – Frequency window in
units.omega_max (float) – Frequency window in
units.units (str, default: "cm-1") – Units of the window: “cm-1”, “eV”, “au”, “nm”, or “um”.
**kwargs – Forwarded to
MeepCavityMeasurement:molecules,hub,extra_geometry,nfreq,decay_by,steps,max_time,min_time,source_amplitude, and extra Meep keyword arguments.
- Returns:
Dictionary with arrays
omega_cminv,wavelength_nm,frequency_meep, and the observables of the declared probe.- Return type:
dict
- make_simulation(molecules=None, hub=None, sources=None, extra_geometry=(), **meep_kwargs)¶
Build the
mxl.MeepSimulationfor this cavity.Pass
hubandmoleculesfor molecule-level coupling via sockets;Pass
hubandextra_geometryfor grid-level coupling via sockets;Pass
moleculesalone for molecule-level coupling via embedded drivers (withdriveranddriver_kwargsin the molecules);Pass nothing at all for a pure Meep simulation.
- Parameters:
molecules (sequence of mxl.Molecule or None, optional) – Molecules to include in the simulation.
hub (
SocketHubor None, optional) – Socket hub shared by socket-mode molecules.sources (sequence or None, optional) – Additional native Meep sources (laser excitation etc.).
extra_geometry (sequence, optional) – Geometry appended after the cavity structure, e.g. the region from
place_region.**meep_kwargs – Extra keyword arguments forwarded to the simulation; they override the cavity defaults on conflicts.
- meep_to_nm(value_meep)¶
Convert a length from Meep units to nanometers.
- nm_to_meep(value_nm)¶
Convert a length from nanometers to Meep units.
- optical_setup()[source]¶
Normal-incidence reflection probe used by
linear_spectrum().The reference is the empty cell. The full structure is backed by a thick gold mirror, so the returned loss/absorption spectrum is
1 - reflection, matching the reference simulations.
- place_molecule(hub=None, driver=None, offset_nm=(0.0, 0.0, 0.0), size_nm=None, sigma_nm=None, hotspot=None, **molecule_kwargs)[source]¶
Create one localized molecule inside the 3D molecular annulus.
Call this method repeatedly, selecting a named cardinal hotspot and/or supplying
offset_nm, to place multiple molecules. The defaults are one grid point forsigmaand four grid points for the molecular box, which fit the reference 50 nm annulus at resolution 125.Cylindrical cells cannot use this route because an off-axis localized molecule is not representable in one azimuthal Fourier sector. Use
place_region()for cylindrical annular matter.
- place_region(epsilon=None, hub=None, width_nm=None, rescaling_factor=1.0, **susceptibility_kwargs)[source]¶
Create a continuous molecular annulus around the metal cylinder.
The annulus extends from
radius_nmtoradius_nm + width_nmand vertically across the Cr-plus-cylinder height. Pass the returned object tomake_simulation()asextra_geometry=[region]. The cavity inserts it before the metal geometry, whose precedence carves out the inner radius exactly.- Parameters:
epsilon (float or None, optional) – Background permittivity of the molecular medium. Default:
background_index ** 2.hub (
SusceptibilitySocketHubor None, optional) – Socket hub of the grid-level route.width_nm (float or None, optional) – Radial annulus width. Default:
annulus_width_nmfrom the constructor.rescaling_factor (float, default: 1.0) – Rescaling factor of
mp.MXLSocketSusceptibility.**susceptibility_kwargs – Forwarded to
mp.MXLSocketSusceptibility, for examplereal_field_only=True.
- Returns:
Molecular outer disk (a radial block in cylindrical coordinates, a cylinder in 3D); the metal geometry carves out its center during simulation assembly.
- Return type:
mp.Block or mp.Cylinder
- plot(ax=None, **kwargs)¶
Visualize the cavity structure and its optical setup.
- Parameters:
ax (matplotlib Axes or None, optional) – Axes to draw into. A new figure is created when None.
**kwargs – Forwarded to
mp.Simulation.plot2Din 2D and 3D.
- Returns:
The axes containing the plot.
- Return type:
matplotlib Axes
- purcell(omega_min, omega_max, units='cm-1', offset_nm=(0.0, 0.0, 0.0), component=None, **kwargs)[source]¶
Reject Purcell calculations until a rod-specific setup is available.