zkit.simulation

High-level simulation reader for TDSEZ.

class zkit.simulation.Run(run_dir, basename)

Bases: object

Read all outputs of a TDSEZ simulation run.

Parameters:
  • run_dir (Union[str, Path]) – Directory containing the td/ and static/ subdirectories.

  • basename (Union[str, Path]) – Input basename such as h2p.inp or full path to the input file.

Examples

>>> run = zkit.Run("build", "h2p.inp")
>>> run.dim
1
>>> run.dipoles.shape
(101, 4)
path(kind)

Output file of this run: eigen, tdm, observables, wfs, surff or ts (static/<name>_eigen.h5, td/<name>_observables.h5, …; the names of earlier TDSE-Z versions are found too).

Parameters:

kind (str)

Return type:

Path

property meta: SimulationMeta
property dim: int
property evolution: TimeEvolution
property spectrum: EigenData
property wavefunctions: WavefunctionSeries
property kh: KHQuiver

Quiver of a Mode = kh run (times, weights, alpha (N, 3), window, omega).

property multipole: MultipoleInfo

Plane-wave coupling order, direction n, c and magnetic flag of the run.

property surff: SurffSpectrum

t-SURFF spectrum (td/<name>_surff.h5).

property physics: Physics
property ts: TSSeries
property time: np.ndarray
property dipoles: np.ndarray
property populations: np.ndarray
property energies: np.ndarray
property currents: np.ndarray
property autocorrelation: np.ndarray
zkit.simulation.Simulation

alias of Run

zkit.simulation.load(run_dir, basename)

Load a simulation run.

Parameters:
  • run_dir (str | Path)

  • basename (str | Path)

Return type:

Run