Related Experiment Video
Updated: Dec 27, 2025

An Open-Source, Fully Customizable 5-Choice Serial Reaction Time Task Toolbox for Automated Behavioral Training of Rodents
Published on: January 19, 2022
PyBERTHART: A Relativistic Real-Time Four-Component TDDFT Implementation Using Prototyping Techniques Based on Python
Matteo De Santis1,2, Loriano Storchi2,3, Leonardo Belpassi2
1Dipartimento di Chimica, Biologia e Biotecnologie, Università degli Studi di Perugia, Via Elce di Sotto 8, 06123 Perugia, Italy.
Abstract:
We present a real-time time-dependent four-component Dirac-Kohn-Sham (RT-TDDKS) implementation based on the BERTHA code. This new implementation takes advantage of modern software engineering, including the prototyping techniques. The software design follows a three step approach: (i) the prototype implementation of a time-propagation algorithm in nonrelativistic real-time TDDFT within the Psi4NumPy framework, which provides a suitable environment for the creation of a clear, readable, and easy to test reference code in Python, (ii) the design of an original Python application programming interface for the relativistic four-component code BERTHA (PyBERTHA), which has an efficient computational kernel for relativistic integrals written in FORTRAN, and (iii) the porting of the time-propagation scheme enveloped within the Psi4NumPy framework to PyBERTHA. The propagation scheme consequently resides in a single readable Python computer code that is easy to maintain and in which the key quantities, such as the Dirac-Kohn-Sham and dipole matrices, can be accessed directly from the PyBERTHA module. For linear algebra operations (matrix-matrix multiplications and diagonalization) we use the highly optimized procedures implemented in the popular NumPy library. The overhead introduced by the Python interface to BERTHA is almost negligible (less than 1% evaluated on the SCF procedure), and the interoperability between different programming languages (FORTRAN, C, and Python) does not affect the numerical stability of the time-propagation scheme. Our new RT-TDDKS implementation has been employed to investigate the stability of the time-propagation procedure in combination with a density-fitting algorithm (both for the Coulomb and for the exchange-correlation matrix construction), which are employed in BERTHA to speed up the Dirac-Kohn-Sham matrix evaluation. On the basis of systematic calculations, employing several density-fitting basis sets of increasing accuracy, we showed that quantitative agreement can be achieved in combination with extended-fitting basis sets, with an error in the Coulomb energy below 1 μ-hartree. Convergence of the transition energies increasing of quality of the fitting basis sets has been also observed. Our data suggest that the error in the Coulomb energy may also represent a good estimate of the fitting basis set quality for real-time electron dynamics simulations. Further, we study the applicability of the RT-TDDKS method in combination with both weak- and extreme strong-field regime. Numerical results of excited-state transitions for the Group 12 atoms are reported and compared with a previous real-time Dirac-Kohn-Sham implementation (Repisky et al. J. Chem. Theory Comput. 2015, 11, 980-991). Finally, calculations of high harmonic generation in the hydrogen molecule and Au dimer have been also carried out. We were able to generate high harmonics with relatively well-defined peaks up to the 21st and 13th order in the case of H2 and Au2, respectively. Our findings show that the four-component structure of the Dirac-Kohn-Sham Hamiltonian provides a suitable theoretical framework, with no intrinsic unfavorable features, to study molecules in the strong-field regime.
Related Concept Videos
Properties of DTFT II
The frequency differentiation property is illustrated by considering a DTFT pair and differentiating both sides with respect to ω.
Properties of DTFT I
The linearity property of DTFTs is fundamental. If two discrete-time signals are multiplied by constants a and b respectively, and then combined to...
Relation of DFT to z-Transform
To understand how the DFT works, it's helpful to consider the z-transform, which is a method for representing discrete sequences in the complex frequency domain. The z-transform involves summing the...
Discrete-time Fourier transform
One of the notable...
Design Example
The Aufbau Principle and Hund's Rule

