SHO driver¶
The SHO driver implements a classical simple harmonic oscillator (SHO) with a
single frequency and dipole moment. It is provided by
maxwelllink.mxl_drivers.python.models.SHOModel and ships with
MaxwellLink for lightweight regression tests and benchmark scenarios.
Note
The SHO driver advances the classical phase-space variables \((q,\,p)\) generated by the Hamiltonian
written in atomic units with unit mass. Here \(\mathbf{e}_i\) denotes the orientation unit vector of the dipole. The equations of motion are integrated with the velocity Verlet algorithm, and the emitted dipole current returned to Maxwell’s equations is
Requirements¶
No additional packages are required beyond MaxwellLink’s dependencies.
numpy(already bundled) is used for the velocity Verlet integration.
Usage¶
Socket mode¶
mxl_driver --model sho --port 31415 \
--param "omega=0.242, mu0=187, orientation=2, p_initial=1e-2, \
q_initial=0.0, checkpoint=false, restart=false"
Non-socket mode¶
mxl.Molecule(
driver="sho",
driver_kwargs={
"omega": 0.242,
"mu0": 187.0,
"orientation": 2,
"p_initial": 1e-2,
"q_initial": 0.0,
},
# ...
)
Parameters¶
Name |
Description |
|---|---|
|
Oscillator frequency in atomic units. Default: |
|
Dipole-coordinate coupling prefactor \(\mu_{0}\) in atomic units, so
that the instantaneous dipole is \(\mu(t)=\mu_{0}\,q(t)\); scales the
emitted source amplitude. Default: |
|
Dipole orientation: |
|
Initial momentum \(p\) of the oscillator in atomic units. Default: |
|
Initial position \(q\) of the oscillator in atomic units. Default: |
|
When |
|
When |
|
When |
Returned data¶
time_au– Simulation time in atomic units.energy_au– Instantaneous oscillator energy \(\tfrac{1}{2}\omega_0^{2} q^{2} + \tfrac{1}{2} p^{2}\) in atomic units.mux_au,muy_au,muz_au– Dipole vector components (non-zero along the selected orientation) in atomic units.p_au– Oscillator momentum \(p\) at the current step in atomic units.q_au– Oscillator position \(q\) at the current step in atomic units.
Notes¶
The driver exposes a deterministic analytic evolution; see
tests/test_sho/test_singlemode_sho_energy_conservation.pyfor a single-mode strong-coupling energy-conservation reference.This driver is intended for demonstration and benchmarking. For productive classical molecular dynamics, prefer the LAMMPS or DFTB+ socket driver, or the ASE Python driver.