Writers
Density writer
- class rhodent.writers.density.DensityWriter(collector)[source]
Calculate density contributions
- Parameters:
collector (
ResultsCollector
) – ResultsCollector object
- property common_arrays: dict[str, ndarray[tuple[int, ...], dtype[float64]] | int | float]
Dictionary of eigenvalues and limits
Energy writer
- class rhodent.writers.energy.EnergyWriter(collector, only_one_pulse)[source]
Calculate energy contributions
- Parameters:
collector (
ResultsCollector
) – ResultsCollector object
- property common_arrays: dict[str, ndarray[tuple[int, ...], dtype[float64]] | int | float]
Dictionary of eigenvalues and limits
Hot-carriers writer
- class rhodent.writers.hcdist.HotCarriersWriter(collector, only_one_pulse)[source]
Calculate hot-carrier totals, and optionally broadened hot-carrier energy distributions
- Parameters:
collector (
ResultsCollector
) – ResultsCollector objectonly_one_pulse (
bool
) – False if the resulting outputs should have one dimension corresponding to different pulses. True if there should be no such dimension. If True, then the calculator must only hold one pulse.
Transition contribution map writer
- class rhodent.writers.tcm.DipoleWriter(collector)[source]
Calculate dipole moment contributions, optionally broadened onto an energy grid as a transition contribution map
- Parameters:
collector (
ResultsCollector
) – ResultsCollector object
- property common_arrays: dict[str, ndarray[tuple[int, ...], dtype[float64]] | int | float]
Dictionary of eigenvalues and limits
Pulse convolution writer
- rhodent.writers.pulserho.calculate_pulserho_and_save(pulserho_fmt, density_matrices)[source]
Read density matrices in frequency space from disk, convolve with Gaussian laser pulse, and inverse Fourier transform to get a time domain response.
Save the pulse density matrces for selected times in the simulation Read density matrices in frequency space from disk
- Parameters:
pulserho_fmt (
str
) –Formatting string for the density matrices saved to disk.
Example:
pulserho_fmt = ‘pulserho/t{time:09.1f}{tag}.npy’
Accepts variables
{time} - Time in as
{tag} - Derivative tag, ‘’, ‘-Iomega’, or ‘-omega2’
{pulsefreq} - Pulse frequency in eV
{pulsefwhm} - Pulse FWHM in fs
density_matrices (
ConvolutionDensityMatrices
) – Object that gives the density matrix in the time domain
DOS Writer
- rhodent.writers.dos.calculate_and_save_dat(out_fname, gpw_file, energies, sigma, zerofermi=False)[source]
Read eigenvalues from ground state and calculate broadened DOS
Save the broadened DOS in a text file
- Parameters:
out_fname (
str
) – Filename of data file where data is to be savedgpw_file (
str
) – Filename of GPAW ground state fileenergies (
list
[float
] |ndarray
[tuple
[int
,...
],dtype
[float64
]]) – Array of energies (in eV) for which the broadened DOS is computedsigma (
float
) – Gaussian broadening width in eVzerofermi (
bool
) – True if energies are to be relative to Fermi level, False if relative to vacuum
PDOS Writer
- rhodent.writers.pdos.calculate_and_save_by_filename(out_fname, **kwargs)[source]
Read eigenvalues and wave functions from ground state and calculate broadened PDOS
The PDOS is projected on each group of atoms in atom_projections
The file format of the resulting data file is inferred from the file name
- Parameters:
out_fname (
str
) – File name of data file where data is to be savedvoronoi – Voronoi weights calculator/reader
energies – Array of energies (in eV) for which the broadened DOS is computed
sigma – Gaussian broadening width in eV
gpw_file – Filename of GPAW ground state file
zerofermi – Eigenvalues relative to Fermi level if true, else relative to vacuum
- rhodent.writers.pdos.calculate_and_save_dat(out_fname, voronoi, energies, sigma, gpw_file, zerofermi=False)[source]
Read eigenvalues and wave functions from ground state and calculate broadened PDOS
The PDOS is projected on each group of atoms in atom_projections
Save the broadened PDOS in a text file
- Parameters:
out_fname (
str
) – File name of data file where data is to be savedvoronoi (
VoronoiWeights
) – Voronoi weights calculator/readerenergies (
list
[float
] |ndarray
[tuple
[int
,...
],dtype
[float64
]]) – Array of energies (in eV) for which the broadened DOS is computedsigma (
float
) – Gaussian broadening width in eVgpw_file (
str
) – Filename of GPAW ground state filezerofermi (
bool
) – Eigenvalues relative to Fermi level if true, else relative to vacuum
- rhodent.writers.pdos.calculate_and_save_npz(out_fname, voronoi, energies, sigma, gpw_file, zerofermi=False, write_extra={}, write_extra_from_voronoi=False)[source]
Read eigenvalues and wave functions from ground state and calculate broadened PDOS
The PDOS is projected on each group of atoms in atom_projections
Save the broadened PDOS in a compressed numpy .npz archive
- Parameters:
out_fname (
str
) – File name of data file where data is to be savedvoronoi (
VoronoiWeights
) – Voronoi weights calculator/readerenergies (
list
[float
] |ndarray
[tuple
[int
,...
],dtype
[float64
]]) – Array of energies (in eV) for which the broadened DOS is computedsigma (
float
) – Gaussian broadening width in eVgpw_file (
str
) – Filename of GPAW ground state filezerofermi (
bool
) – Eigenvalues relative to Fermi level if true, else relative to vacuumwrite_extra (
dict
[str
,Any
]) – Dictionary of extra key-value pairs to write to the .npz filewrite_extra_from_voronoi (
bool
) – If true, and voronoi is a ULM reader, extra key-value pairs are read from voronoi and written to the .npz file
Voronoi Writer
- rhodent.writers.voronoi.calculate_and_save_LCAO_only_by_filename(out_fname, **kwargs)[source]
Save Voronoi weights in LCAO basis to file
The file format of the resulting file is inferred from the file name
- Parameters:
out_fname (
str
) – File name of the voronoi weigths filevoronoi_lcao – Voronoi weights in LCAO basis object
write_extra – Dictionary of extra key-value pairs to write to the data file
- rhodent.writers.voronoi.calculate_and_save_by_filename(out_fname, **kwargs)[source]
Save Voronoi weights to file
The file format of the resulting file is inferred from the file name
- Parameters:
out_fname (
str
) – File name of the voronoi weigths filevoronoi – Voronoi weights object
write_extra – Dictionary of extra key-value pairs to write to the data file
- rhodent.writers.voronoi.calculate_and_save_npz(out_fname, voronoi, write_extra={})[source]
Save Voronoi weights to numpy archive
- Parameters:
out_fname (
str
) – File name of the voronoi weigths filevoronoi (
VoronoiWeights
) – Voronoi weights objectwrite_extra (
dict
[str
,Any
]) – Dictionary of extra key-value pairs to write to the data file
- rhodent.writers.voronoi.calculate_and_save_npz_LCAO_only(out_fname, voronoi_lcao, write_extra={})[source]
Save Voronoi weights in LCAO basis to numpy archive
- Parameters:
out_fname (
str
) – File name of the voronoi weigths filevoronoi_lcao (
VoronoiLCAOWeightCalculator
) – Voronoi weights in LCAO basis objectwrite_extra (
dict
[str
,Any
]) – Dictionary of extra key-value pairs to write to the data file
- rhodent.writers.voronoi.calculate_and_save_ulm(out_fname, voronoi, write_extra={})[source]
Save Voronoi weights to ULM file
- Parameters:
out_fname (
str
) – File name of the voronoi weigths filevoronoi (
VoronoiWeights
) – Voronoi weights objectwrite_extra (
dict
[str
,Any
]) – Dictionary of extra key-value pairs to write to the data file
- rhodent.writers.voronoi.calculate_and_save_ulm_LCAO_only(out_fname, voronoi_lcao, write_extra={})[source]
Save Voronoi weights in LCAO basis to ULM file
- Parameters:
out_fname (
str
) – File name of the voronoi weigths filevoronoi_lcao (
VoronoiLCAOWeightCalculator
) – Voronoi weights in LCAO basis objectwrite_extra (
dict
[str
,Any
]) – Dictionary of extra key-value pairs to write to the data file