maxwelllink.em_solvers.gridmd module

GridMD implemented in MaxwellLink: Thermodynamical sampling of molecular properties under large-scale inhomogenenous EM fields.

class maxwelllink.em_solvers.gridmd.GridMDSimulation[source]

Bases: LaserDrivenSimulation

GridMD of the MaxwellLink molecules.

This class samples the inhomogenenous electric field on molecules via a time-dependent stochastic electric field.

\[E(t) = f(t)\]

A thermostat should be attached to the molecules as well for removing the artificial excitation due to the electric field time evolution.

All quantities are in atomic units.

__init__(dt_au, molecules=None, hub=None, grid_diffusion_au=1e-4, dimension=1, efield_map=None, coupling_axis='xyz', 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.

  • grid_diffusion_au (float)

  • dimension (int)

  • efield_map (float | Callable[[float], float] | None)

run(until=None, steps=None)

Run the simulation for a specified duration or number of steps.

Parameters:
  • until (float, optional) – Total simulation time (a.u.). steps must be None.

  • steps (int, optional) – Number of steps to execute. until must be None.

step()

Advance the simulation by one time step.