maxwelllink.em_solvers.laser_driven module¶
Laser driven dynamics for MaxwellLink.
This module defines a lightweight laser driven simulator that applies a user defined driven pulse to excited the molecules. The simulation runs entirely in atomic units and can operate with both socket-connected and embedded (non-socket) molecular drivers.
- class maxwelllink.em_solvers.laser_driven.LaserDrivenSimulation[source]¶
Bases:
DummyEMSimulationLaser driven dynamics of the MaxwellLink molecules.
This class employes a user-defined electric field:
\[E(t) = f(t)\]applied on x, y, z, or any combinations of the molecular dipole vector
All quantities are in atomic units.
- __init__(dt_au, molecules=None, drive=None, coupling_axis='xyz', hub=None, record_history=True)[source]¶
- Parameters:
dt_au (float) – Simulation time step in atomic units.
molecules (iterable of Molecule, optional) – Molecules coupled to the cavity.
drive (float or callable, optional) – Constant drive term or function
drive(t_au).coupling_axis (str, default: "xyz") – Component(s) of the molecular dipole used for coupling.
hub (maxwelllink.sockets.SocketHub, optional) – Socket hub shared by all socket-mode molecules.
record_history (bool, default: True) – Record time, field, velocity, drive, and molecular response histories.
- class maxwelllink.em_solvers.laser_driven.LaserDrivenUnits[source]¶
Bases:
DummyEMUnitsEM units for laser driven simulations (1:1 to atomic units).
- efield_em_to_au(Emu_vec3)¶
Convert the electric field vector from EM units to atomic units (a.u.).
- Parameters:
Emu_vec3 (array-like of float, shape (3,)) – Electric field vector in EM units.
- Returns:
Electric field vector in atomic units.
- Return type:
numpy.ndarray of float, shape (3,)
- source_amp_au_to_em(amp_au_vec3)¶
Convert a source amplitude vector from atomic units (a.u.) to EM units.
- Parameters:
amp_au_vec3 (array-like of float, shape (3,)) – Source amplitude vector in atomic units.
- Returns:
Source amplitude vector in EM units.
- Return type:
numpy.ndarray of float, shape (3,)
- time_em_to_au(time_em)¶
Convert time from EM units to atomic units.
- Parameters:
time_em (float) – Time in EM units.
- Returns:
Time in atomic units.
- Return type:
float
- units_helper()¶
Return a human-readable description of these EM units.
- Returns:
Description of the dummy EM unit system (1:1 conversion).
- Return type:
str
- class maxwelllink.em_solvers.laser_driven.MoleculeLaserDrivenWrapper[source]¶
Bases:
MoleculeDummyWrapperWrapper that adapts a
Moleculeto LaserDrivenSimulation, handling units, sources, and IO.- __init__(molecule, dt_au)[source]¶
Initialize the Laser Driven molecule wrapper.
- Parameters:
molecule (Molecule) – The molecule to wrap.
dt_au (float) – Time step in atomic units.
- append_additional_data(time_au)[source]¶
Store additional molecular data supplied by non-socket drivers.
- Parameters:
time_au (float) – Current simulation time in atomic units.
- calc_amp_vector()¶
Compute and return the current source amplitude vector from the molecule.
- Returns:
Source amplitudes in atomic units.
- Return type:
numpy.ndarray of float, shape (3,)
- initialize_driver(assigned_id)¶
Initialize the wrapped molecule’s driver (non-socket mode).
Notes
Uses the molecule’s cached
dt_aubut changes itsmolecule_idfromassigned_id.- Parameters:
assigned_id (int)
- propagate(efield_vec3)¶
Propagate the wrapped molecule for one EM step.
- Parameters:
efield_vec3 (array-like of float, shape (3,)) – Effective electric field vector in atomic units.