Input and output formats
This page documents the exact HDF5 layouts produced by TDSE-Z and consumed by zkit.
static/<name>_eigen.h5
Created by TDSEZCore::Output().
Top-level datasets:
/spectrum— 1-D float vector of converged eigenvalues in Hartree./psi_0,/psi_1, … — 1-D or 2-D arrays holding IGA coefficients. When 2-D, shape is(n_dof, 2)with columns[Re, Im]./knots_x,/knots_y,/knots_z— 1-D compact knot vectors from PetIGA.
Top-level group:
/run_metadata— attributes:code_versioninput_fileunitsDimensionSplineDegreeNelementsLMinX,LMaxX,LMinY,LMaxY,LMinZ,LMaxZChargeTargetEigenvalueNBoundStatesSaveNBoundStatesstate_format
/run_metadata/eig_residual— 1-D relative error per saved state.
Reader:
from zkit.io.eigen import read_eigen
eigen = read_eigen("static/h2p_eigen.h5")
print(eigen.values)
print(eigen.vectors.shape)
print(eigen.dimension)
Dimension is inferred from:
/run_metadata/Dimensionnumber of
/knots_*datasetsdipole column width in time-evolution files
td/<name>_observables.h5
Created by TDSEZManager::WriteHDF5().
Top-level datasets:
dipolespopulationsenergiescurrentsautocorrelation
All datasets are 2-D with first dimension = recorded steps.
Column layouts by dimension:
Dataset |
1D width |
2D width |
3D width |
|---|---|---|---|
dipoles |
4 |
7 |
10 |
populations |
1 + N_pop |
1 + N_pop |
1 + N_pop |
energies |
7 |
7 |
7 |
currents |
11 |
11 |
15 |
autocorrelation |
3 |
3 |
3 |
Reader:
from zkit.io.evolution import read_evolution
evolution = read_evolution("td/h2p_observables.h5")
print(evolution.dimension)
print(evolution.time.shape)
print(evolution.dipoles.shape)
print(evolution.energies.shape)
print(evolution.currents.shape)
print(evolution.autocorrelation.shape)
td/<name>_wfs.h5
Created by the TS monitor via a collective VecView into an HDF5 viewer.
Layouts:
Group
wavefunctionwith integer datasets0,1, …, each with trailing Re/Im dimension.Flat top-level datasets with shape
(n_snapshots, <spatial...>, 2).
Reader:
from zkit.io.wavefunction import read_wfs
wfs = read_wfs("td/h2p_wfs.h5")
print(wfs.n_snapshots)
print(wfs.data.shape)
td/<name>_ts.h5
Created by TSView.
Layout:
Group
timestepperwith integer datasets, or integer datasets at top level.
Reader:
from zkit.io.ts import read_timeseries
ts = read_timeseries("td/h2p_ts.h5")
print(ts.times)
TDM outputs
TDSE-Z emits:
static/<name>_tdm_Dx.npystatic/<name>_energies.npystatic/<name>_states.npy
Reader:
from zkit.io.tdm import read_tdm
tdm = read_tdm("static/h2p_eigen.h5")
print(tdm.keys())