maxwelllink.em_solvers.dummy_em module

class maxwelllink.em_solvers.dummy_em.DummyEMSimulation[source]

Bases: object

Minimal dummy EM simulation container.

__init__(hub=None, molecules=None)[source]
Parameters:
  • hub (SocketHub | None)

  • molecules (List | None)

run(until)[source]
Parameters:

until (float)

class maxwelllink.em_solvers.dummy_em.DummyEMUnits[source]

Bases: object

Dummy EM units with 1:1 conversions to atomic units.

__init__()[source]
efield_em_to_au(Emu_vec3)[source]

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)[source]

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)[source]

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()[source]

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.dummy_em.MoleculeDummyWrapper[source]

Bases: object

__init__(molecule)[source]

Lightweight wrapper that associates a Molecule with dummy EM units.

Parameters:

molecule (Molecule) – The molecule to wrap.

calc_amp_vector()[source]

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)[source]

Initialize the wrapped molecule’s driver (non-socket mode).

Notes

Uses the molecule’s cached dt_au but changes its molecule_id from assigned_id.

Parameters:

assigned_id (int)

propagate(efield_vec3)[source]

Propagate the wrapped molecule for one EM step.

Parameters:

efield_vec3 (array-like of float, shape (3,)) – Effective electric field vector in atomic units.