Rhodent: Post-Processing for rt-TDDFT
- Rhodent is a modular Python package that post-processes rt-TDDFT data to compute observables like dipole spectra, stored energy, and induced densities.
- It employs an induced Kohn–Sham density matrix formalism to transform GPAW’s LCAO outputs into orbital-based representations for detailed energy and spatial analyses.
- It supports a pulse convolution method to reconstruct responses to new perturbations, offering a reusable and efficient analytical workflow.
Rhodent, stylized as rhodent, is a modular Python package for post-processing real-time time-dependent density functional theory (rt-TDDFT) calculations. It is designed to read time- or frequency-domain response data, build the induced Kohn–Sham density matrix in the basis of ground-state orbitals, and compute observables including dipole spectra, hot-carrier distributions, stored energy, and induced densities, together with spatial or energetic decompositions. In its current version, the package targets non-periodic, spin-paired, LCAO-based rt-TDDFT output from GPAW, while being structured for extension to additional rt-TDDFT codes and representations (Fojt et al., 30 Aug 2025).
1. Scope, motivation, and domain of application
Rhodent addresses a practical fragmentation in the rt-TDDFT software ecosystem. Many community codes, including GPAW, Octopus, CP2K, Turbomole, and SIESTA, implement rt-TDDFT, but their analysis capabilities differ. This creates a common workflow mismatch: a calculation may need to be propagated in one code because of its numerical method or exchange-correlation functionality, while the desired analysis method is available in another. Rhodent is intended as a common post-processing layer for this setting, rather than as a new rt-TDDFT propagator (Fojt et al., 30 Aug 2025).
The package is organized around the proposition that weak-field response information can be centralized in the induced Kohn–Sham density matrix and reused for multiple analyses. On that basis, Rhodent provides analysis of hot carriers, energies, induced densities, and dipole moments, as well as various decompositions of those quantities. The abstract further states that, under the assumption of linear response, the package can calculate the response to a narrow-band laser from the response to a broad-band perturbation, thereby greatly speeding up the analysis of frequency-dependent excitations (Fojt et al., 30 Aug 2025).
Its demonstrated application space includes systems consisting of Al and Ag clusters and organic molecules. This suggests a primary emphasis on finite systems and electronically driven dynamics in the femtosecond or optical regime, although the current limitations are stated explicitly rather than left implicit.
2. Central formalism: induced Kohn–Sham density matrices
The core object in Rhodent is the time-dependent Kohn–Sham density matrix expressed in the basis of ground-state orbitals. If are the time-dependent Kohn–Sham orbitals with occupations , the density matrix is
and the induced density matrix is
The package description states that all information about the linear response to a weak perturbation is contained in (Fojt et al., 30 Aug 2025).
Frequency-domain analysis is obtained by Fourier transforming and normalizing by the Fourier transform of the driving perturbation:
For a finite time grid , , Rhodent uses the discrete transform
0
To reduce end-point noise, the time signal is multiplied by a Gaussian window 1, which is equivalent to a frequency-domain broadening. This is a standard but consequential implementation choice because the broadening enters every downstream spectral quantity derived from 2.
For GPAW’s LCAO representation, the time-dependent orbitals are expanded as
3
A basis-transformation matrix
4
is then used to construct
5
This transformation is the bridge between the native LCAO density matrix and the orbital-basis representation used by Rhodent’s calculators.
3. Implemented observables and decomposition machinery
Rhodent provides a family of “Calculator” classes that consume 6 or 7 and return observables. The implemented set is broad enough to cover both direct spectroscopic quantities and resolved analyses in energy or real space (Fojt et al., 30 Aug 2025).
The induced density is written as
8
The package description notes that this quantity may optionally be filtered to include only transitions above or below an energy cutoff 9. That makes the induced density not only an observable but also a decomposition target.
The induced dipole moment is defined as
0
After Fourier transformation and normalization by 1, the polarizability 2 is obtained. For the absorption oscillator strength along 3,
4
Stored-energy analysis is more structured. The time-dependent total energy change, excluding the external field term, is decomposed into 5, with contributions assigned to individual electron–hole pairs 6:
7
The package explicitly associates this representation with sums, filters, and transition-contribution maps in the energy plane. In practice, this makes Rhodent not merely a spectrum generator but a diagnostic framework for identifying which occupied–unoccupied channels dominate a response.
Hot-carrier distributions are constructed from the equal-occupation sector of 8, which is second order in the perturbation:
9
After diagonalization, or by using diagonal elements directly, the corresponding energy-resolved populations are broadened by Gaussians:
0
Spatial projection is formulated through atomic Voronoi weights,
1
which can be used to project densities, dipoles, energies, and hot carriers onto one or several atoms. Transition-contribution maps are then built by binning occupied and unoccupied states using Gaussian kernels,
2
4. Linear-response reuse and the pulse-convolution method
One of Rhodent’s distinctive capabilities is its linear-response “convolution trick,” which allows the response to a new pulse to be reconstructed from an existing broad-band simulation rather than by rerunning the underlying rt-TDDFT calculation (Fojt et al., 30 Aug 2025).
The starting assumption is strict linearity in the electron–hole block:
3
If a reference simulation with perturbation 4 has already produced 5, then for a new pulse 6 of the same spatial form,
7
Inverse Fourier transformation then yields 8 without repeating the expensive propagation. In discrete form, the package description gives
9
with zero-padding, 0, used to avoid circular aliasing.
The stated conditions for this reuse are restrictive and important: the new pulse must have the same spatial form, the same or a later start time, and no new high-frequency content. Within those conditions, Rhodent converts one broad-band simulation into a reusable response kernel for a class of narrow-band or otherwise reshaped pulses. The abstract characterizes this as a way to greatly speed up the analysis of frequency-dependent excitations, and that characterization follows directly from the avoidance of repeated rt-TDDFT propagations.
5. Software architecture and supported workflows
The internal architecture is divided between “Response” objects and “Calculator” objects. Response objects ingest rt-TDDFT outputs and build 1 or 2; Calculator objects operate on those responses to compute observables such as dipoles, energies, densities, hot carriers, densities of states, projected densities of states, and transition-contribution maps (Fojt et al., 30 Aug 2025).
At present, supported inputs are GPAW’s LCAO .h5 files or on-the-fly Fourier-built 3 files. This is a sharply defined scope: Rhodent is not yet a general front end for arbitrary rt-TDDFT outputs, even though the design is explicitly extensible. To add support for another code, the package description specifies that one provides a new subclass of Response capable of reading that code’s trajectory or frequency-domain output and constructing 4. To add a new observable, one implements a new Calculator that consumes 5 and applies the corresponding formulas.
The package also supports caching of intermediate dense 6 arrays to NumPy .npy files. This is not a minor convenience: because the basis transformation can dominate the analysis cost, reusing stored intermediate arrays allows multiple downstream analyses without repeating the transformation step. The documented example workflow includes loading a time-dependent GPAW wavefunction file, building the time-domain response, instantiating hot-carrier, dipole, and energy calculators, and then saving the resulting arrays. A second example applies pulse convolution after building a broad-band frequency-domain response.
This design implies a separation between data ingestion, common-state representation, and observable-specific post-processing. That separation is explicit in the package description rather than inferred from the code examples alone.
6. Computational characteristics, limitations, and projected extensions
Rhodent’s main computational cost is associated with three operations: transforming GPAW’s LCAO density matrix 7 into the ground-state Kohn–Sham basis, assembling 8 for every time slice, and performing zero-padded FFTs for pulse convolution. The memory footprint scales as 9, and in parallel runs each process holds a copy of the transformation matrix 0 (Fojt et al., 30 Aug 2025).
The package description does not publish hard benchmarks. Instead, it states that typical mid-sized clusters with 200 atoms and about 500 Kohn–Sham states run end-to-end analysis in minutes on a single workstation once the trajectory is dumped. This is the only explicit performance characterization given, and it is presented with the caveat that no formal benchmark suite is yet reported.
The present limitations are equally explicit. Current scope is restricted to non-periodic, spin-paired systems and LCAO-based rt-TDDFT from GPAW. Future extensions listed in the package description include support for grid- and plane-wave-based rt-TDDFT codes such as Octopus and CP2K via new Response subclasses; support for periodic and spin-polarized systems; truncation or compression schemes for large Kohn–Sham bases; new calculators for charge-current responses, spin-dipole and magnetization dynamics, non-linear response orders, and correlation-function analyses; and higher-level plotting routines with Jupyter integration (Fojt et al., 30 Aug 2025).
In that sense, Rhodent occupies a specific position in the rt-TDDFT software landscape. It is not a universal analysis layer already, but a modular orbital-basis framework that formalizes a reusable response representation and then builds a post-processing stack around it. A plausible implication is that its long-term significance will depend on whether the current GPAW-centered implementation successfully generalizes across the code heterogeneity that motivated the package in the first place.