WorksPhysics and Astronomy
Nonadiabatic molecular dynamics simulation with external field
Abstract
Nonadiabatic molecular dynamics simulations with classical path approximation (CPA-NAMD) cannot simulate the carrier dynamics under an external field. We develop CPA-NAMD-extF, a first-principles density-matrix framework for calculating field-driven electronic responses along precomputed finite-temperature ionic trajectories. The method combines explicit external-field coupling with self-consistent updates of electronic density while retaining the computational efficiency of the classical-path approximation. Benchmarks against regular TDDFT methods show close agreement for time-dependent dipoles, finite-field currents, and linear optical responses. Applications to the linear absorption spectrum of crystalline and amorphous SiO demonstrate its capability to large and structurally complex systems. This method is also applied to the 2D hybrid perovskite . Finite-temperature calculations show that the second-order opto-current response is strongly affected by structural fluctuations. Real-space DC current density further reveals pronounced Br-centered vortex currents, and its microscopic origin is investigated.
main.pdf
Introduction
Nonadiabatic molecular dynamics (NAMD) has been widely used to investigate various excited carrier dynamics in extended systems,[1, 2] such as carrier cooling,[2, 3, 4, 5, 6, 7, 8] interfacial charge transfer,[9, 10] [11, 12, 13, 14] photoinduced charge separation,15–19 and carrier transport.14,20,21 In particular, by employing the classical path approximation (CPA), the electronic dynamics simulated by NAMD (CPA-NAMD) are propagated as a post-processing step along a precomputed ground-state Born–Oppenheimer molecular-dynamics (BOMD) trajectory, while the feedback of electronic excitation on the nuclear motion is neglected. Consequently, the major computational cost arises from the ground-state BOMD simulation, whereas the subsequent CPA-NAMD propagation requires only a relatively small additional cost while retaining the first-principles DFT description.[10] [22] However, the current CPA-NAMD implementation does not explicitly describe carrier excitation driven by an external field. This is because CPA-NAMD uses Hamiltonians obtained from precomputed ground-state calculations and does not explicitly include the external-field induced modification of the electronic potential. Therefore, this limitation restricts its applicability to field-induced electronic and optical responses.
To describe electronic excitation and current responses driven by external fields in real time, real-time time-dependent density-functional theory (rt-TDDFT) usually provides a direct first-principles approach. In periodic systems, the time-dependent current obtained from rt-TDDFT can be used to extract linear optical responses and nonlinear photocurrents.23–26 However, most real-space or plane-wave rt-TDDFT implementations typically require a very small electronic time step for accurate and stable propagation of the time-dependent Kohn–Sham (KS) orbitals. The resulting computational cost becomes substantial for systems containing hundreds of atoms and for long propagation times.27 Finite-temperature response calculations additionally need electronic propagations over many thermally sampled trajectory segments in order to obtain statistically reliable results.28,29 Separating different nonlinear orders in finite-field calculations can also require reversed fields or multiple field amplitudes.30,31
In this work, we introduce CPA-NAMD-extF, an advancement of CPA-NAMD which can explicitly incorporate external-field coupling into the electronic dynamics. By implementing CPA and propagating the electronic density matrix using the ground-state BOMD trajectories, CPA-NAMD-extF substantially reduces the cost of calculations compared to regular rt-TDDFT simulations. This method allows us to efficiently simulate the external-field-induced optical current for systems containing more than 500 atoms. We benchmark the time-dependent dipoles of small molecules, finite-field currents, and linear optical responses against existing rt-TDDFT implementations to validate our implementation. Then, we use this method to compute the absorption spectra of crystalline and amorphous SiO systems, which are usually challenging for rt-TDDFT calculations. This method is further applied to investigate the finite-temperature shift-current response of the 2D hybrid perovskite (BA)CsPbBr. Moreover, the vortex-type shift current in real space is also investigated to reveal its microscopic origin.
Method and Implementation
CPA-NAMD treats the nuclear motion classically while propagating the electronic dynamics quantum mechanically along a precomputed ground-state BOMD trajectory.10,22 At each BOMD step, the instantaneous adiabatic Kohn–Sham states and eigenenergies are obtained from ground-state DFT calculations and they are used to construct the electronic Hamiltonian. The electronic wavefunctions or density matrix is then propagated along the prescribed Hamiltonian. With CPA, the feedback of the excited carriers on the nuclear motion is neglected, allowing the electronic dynamics to be evaluated as a post-processing step of the ground-state BOMD simulation. CPA is widely used in NAMD simulations, particularly in periodic bulk or low-dimensional materials. This is because these materials usually have heavy ions whose motions are much slower than the process of carrier excitation and transport. Meanwhile, the time-evolving wavefunctions are also mostly delocalized across the material. Such additional force by the wavefunction is relatively weak. In our implementation of NAMD with an external field, CPA is also used. Atomic units are used throughout this paper unless otherwise stated.
In CPA-NAMD-extF, the ions evolve along a precomputed BOMD trajectory, , while the electronic density matrix is explicitly propagated under an external field along such trajectory. During the simulation, the propagated electronic density and the associated Hartree and exchange–correlation potentials are updated self-consistently at each electronic step. By assuming CPA, for the relatively weak external fields considered here, the excitation-induced ionic displacements are small compared with the underlying thermal fluctuations. For each BOMD configuration, we extract the ground-state KS Hamiltonian , the ground-state Hartree–exchange–correlation potential matrix , and the velocity matrix , together with the overlap matrices between KS states at neighboring MD configurations. Here, , , and are computed with the BOMD adiabatic states as the basis. Thus,
where denotes the -th BOMD step, the superscript indicates the adiabatic basis used the operator, and is the eigenenergy obtained at during the BOMD calculation. Similarly, the ground-state Hamiltonian at the next BOMD step represented in the adiabatic basis at is
where is the overlap between the adiabatic states of the two neighboring BOMD steps. The ground-state and the velocity matrix are treated in the same manner. These quantities are calculated within BOMD with negligible additional computational costs. Following the same idea as conventional CPA-NAMD,[10] [14, 32] the ground-state , , and are linearly interpolated within each BOMD step to obtain , , and on the finer electronic time grid (SI, Eq. 5). Because the ionic configuration changes only slightly over each short BOMD interval, the corresponding ground-state charge density and the electronic matrices vary smoothly and can be locally approximated by linear interpolation.32
During the electronic propagation, the electronic excitations alter the Hartree–exchange–correlation potential from its ground-state value. Therefore, we replace the ground-state Hartree–exchange–correlation contribution contained in the KS Hamiltonian with the time-dependent potential constructed from the propagated electronic density. The propagation Hamiltonian is thus written as
Here is updated self-consistently from the propagated density at each electronic time step. In our implementation, the external field is introduced in the velocity gauge through a time-dependent vector potential , related to the electric field by , where is the speed of light.24,33 The field-coupling potential is
Here, denotes the velocity matrix evaluated in the adiabatic KS basis. The corresponding velocity operator, defined as , includes the nonlocal part of the ionic pseudopotential () and is the momentum operator.
Within each BOMD step from to , the adiabatic basis is used throughout this step. We split one BOMD step into several electronic steps. The density matrix and the corresponding charge density are evolved self-consistently within each electronic step using a procedure similar to that reported in Ref.34. Specifically, at each electronic step, a trial charge density is extrapolated from the previous steps, and it is used to construct and the Hamiltonian including external fields at the end of electronic step. With both Hamiltonians constructed for the start and end of this electronic step, the propagating Hamiltonian is further linearly interpolated within this electronic step. The density matrix is then propagated under this Hamiltonian until the end of electronic step; A new electronic charge density is reconstructed from the propagated density matrix and the adiabatic basis. The evolved charge density is mixed with the trial charge density to generate a new charge density for the end of the electronic step. This procedure is repeated until a self-consistent charge density is obtained. In our implementation, the time step of electronic step is around 0.1fs to ensure a stable and efficient calculation. With the external field, self-consistency of the propagated charge density is achieved within 4 to 5 iterations.
To reduce the computational cost, not all the valence and conduction adiabatic states are used for evolution of charge densities. Instead, we truncate the adiabatic-state space and divide it into active () and inactive () subspaces. Under the relatively weak fields considered here, appreciable population changes are expected mainly within the excitation window (active subspace), whereas the deep-valence states (inactive subspace) remain nearly fully occupied. Their occupations are therefore fixed to the corresponding BOMD adiabatic-state occupations. In our implementation, the density matrix in the active subspace is propagated explicitly as
Here, a much finer time step around 100as is used for the propagation. Since both and are expressed using the adiabatic states, the time cost of such propagation is negligible. The charge density entering is constructed from the propagated active-space density matrix together with the contribution of the inactive states evaluated using their fixed BOMD adiabatic-state occupations. The inactive density matrix , composed of deep-valence states, is kept fixed as a diagonal matrix without propagation. However, the field-induced coherence cannot be kept fixed. To account for coupling between the inactive and active subspaces, it is evaluated at each electronic time step using an instantaneous first-order adiabatic approximation (see § 5 of the Supplemental Information for more details). We find that such coherence contributes to the final field-induced current, but it is not necessary to be included in the self-consistent density or potential evolution.
With the electronic density matrix constructed above, the current induced by the external field can be evaluated. The macroscopic cell-averaged current density is written as , and
where is the unit-cell volume. The paramagnetic contribution is evaluated from the electronic density matrix and the velocity matrix as
where the trace denotes a sum over the adiabatic states. Here, the density matrix is assembled in the full active-inactive block as
The diamagnetic contribution is , where is the number of electrons in the unit cell. In the velocity gauge, convergence of the current generally requires a large number of high-energy unoccupied states. Since only a finite number of bands are included in the present calculation, we employ a first-order adiabatic correction derived in Ref.35 to compensate for the missing high-energy-band contributions caused by the finite-band truncation. The correction is given by
Here, is the number of bands included in the current evaluation, and the sum over runs over the occupied reference states. The correction is evaluated from the adiabatic energies and velocity matrix and is linear in the vector potential. Further details of the evaluation of and the finite-band correction are provided in § 5 of the Supplemental Information.
To calculate the linear optical absorption spectrum, we apply a weak -kick perturbation in the velocity gauge. The imaginary part of the dielectric function, , is obtained from the Fourier-transformed current and normalized using an effective -sum rule. The real part, , is then obtained through the Kramers–Kronig relation.36 The absorption coefficient spectrum is thus calculated as
where is the photon energy. Further details of the spectral analysis are provided in § 6 of the Supplemental Information.
Moreover, the field-induced currents allow us to extract higher-order nonlinear responses to the external field, such as the shift current response. The field-induced even-order current can be isolated from the positive-field, negative-field, and zero-field calculations as
Here, is the amplitude of the applied electric field. The term removes the field-independent background, while the combination cancels all odd-order contributions. In the weak-field regime,
and the extracted signal is dominated by the second-order response, i.e. the shift current response. For a monochromatic field at frequency , the direct-current (DC) second-order response corresponds to the zero-frequency component of the current. This component is obtained by averaging the computed even-order current over a time window as . With the DC current computed, the corresponding second-order conductivity is then evaluated as
Here, and denote the beginning and end of the averaging window, respectively. The window is chosen within the constant current-envelope region to span an integer number of external-field periods, i.e., , where is an integer.
Since the BOMD adiabatic states are used as the basis in our simulations, it is possible to obtain the real-space current density . 37 The position-resolved current density operator is expressed as . Thus, we can construct the real-space current density on the FFT grid used in the DFT calculation. Combining the paramagnetic, diamagnetic, and finite-band correction contributions, it is evaluated as
Here, is position-resolved current operator, and the trace is taken over the adiabatic states of the combined active–inactive space . denotes the finite-band adiabatic correction (SI, Eq. (61)). The reference density is the ground-state charge density at the same ionic configuration, whereas is the corresponding time-dependent electronic density. The second term combines the diamagnetic contribution with the occupation-sum part (i.e., first term) of the finite-band correction (SI, Eq. (40)). A detailed derivation is provided in § 7 of the Supplemental Information. By construction, the resulting real-space current density satisfies
For the even-order real-space current density, the density matrix in Eq. (14) is replaced by , where . Thanks to the CPA, can be obtained without additional basis transformations. This is because , , and are computed in the same BOMD adiabatic basis.
Our CPA-NAMD-extF method is implemented based on the pseudopotential plane-wave Quantum ESPRESSO (QE) package.38,39 We modify QE to export the adiabatic KS wave functions and eigenenergies, the ground-state Hartree–exchange–correlation potential and velocity matrices, and the overlap matrices between adiabatic states of neighboring BOMD configurations. CPA-NAMD-extF reads these quantities and interfaces with QE routines to reconstruct the charge density and update the Hartree–exchange–correlation potential on the FFT grid. The implementation supports hybrid MPI/OpenMP parallelization. The stored BOMD data can be reused for external fields with different amplitudes, polarizations, and temporal profiles.
Before we proceed, we first benchmark our CPA-NAMD-extF implementation against existing rt-TDDFT codes to demonstrate its validity. For the time-dependent dipole response, CPA-NAMD-extF closely reproduces the PWmat rt-TDDFT34,40,41 results for HCO single molecule, 1D CHBN conjugated chain, and 2D monolayer WS, as shown in Figure S3. These tests show that the charge density evolution under the external field in our implementation is consistent with existing rt-TDDFT methods. For monolayer MoS, the finite-field time-dependent current obtained with CPA-NAMD-extF can closely reproduce the SALMON reference result in Figure S4.25 With the external field induced current calculation, we further compute the absorption spectrum bulk for crystalline Si, i.e. the linear optical response extracted from the current induced by a weak -kick type external potential. Our result agrees well with the PWmat calculation as shown in Figure S5.

Figure S3. Time-dependent total dipole change obtained from PWmat rt-TDDFT and CPA-NAMD-extF. Panels A–C correspond to HCO, CHBN, and WS, respectively. Black solid and red dashed curves denote the PWmat and CPA-NAMD-extF results, respectively.

Figure S4. Finite-field current benchmark for monolayer MoS. (A) Applied vector potential . (B) Current from CPA-NAMD-extF and SALMON RT-TDDFT. Black solid and red dashed curves denote SALMON and CPA-NAMD-extF, respectively. The current is plotted in units of a.u.

Figure S5. Linear optical-response benchmark for crystalline Si. The left and right panels show and obtained from PWmat rt-TDDFT and CPA-NAMD-extF. Black solid and red dashed curves denote PWmat and CPA-NAMD-extF, respectively.
Results
We next apply CPA-NAMD-extF to the finite-temperature linear optical response of large and complex systems. Specifically, we calculate the absorption spectra of crystalline and amorphous bulk at 300 K. Each supercell contains 576 atoms and 3072 valence electrons. The crystalline model is constructed from an -quartz-derived supercell, whereas the amorphous model is generated using a Monte Carlo bond-switching procedure.42 The BOMD trajectories are generated using QE with the Perdew–Burke–Ernzerhof (PBE) generalized-gradient approximation,43 SG15 norm-conserving pseudopotentials,44 and -point Brillouin-zone sampling. For the real-time electronic propagation, the active spaces span bands 961–1950 for crystalline and 906–1990 for amorphous . For each system, a weak -kick external potential of is applied independently along the , , and directions. Here, the final absorption spectrum is obtained by averaging the three polarization-resolved spectra. As shown in Figure 1, the amorphous structure exhibits broader and smoother absorption features than the crystalline one, together with a more pronounced low-energy absorption tail. This is consistent with previous experimental studies of crystalline and amorphous .45–47 More importantly, the present calculation demonstrates that CPA-NAMD-extF can treat current-based optical responses in structurally ordered or disordered cells containing hundreds of atoms along explicit finite-temperature ionic trajectories. Such systems are computationally demanding, requiring several days of computation on multiple GPUs using conventional rt-TDDFT, particularly for finite-temperature trajectory sampling. In comparison, the present CPA-NAMD-extF calculations for the 576-atom crystalline and amorphous systems only require hours on CPU cores.

Figure 1. Absorption spectra of crystalline and amorphous 576-atom models at 300 K calculated with CPA-NAMD-extF. The spectra are obtained by averaging the independently calculated -, -, and -polarized weak -kick responses. Absorption intensities are shown in arbitrary units.
As the main nonlinear-response application, we investigate the 2D hybrid perovskite , where . This material is experimentally reported to un-
dergo a ferroelectric-to-paraelectric transition at the Curie temperature K.48 Following the experimentally determined ferroelectric and paraelectric structures reported in Ref. 48, we construct a supercell for each phase. Each structure contains 352 atoms and 1216 valence electrons. The ferroelectric and paraelectric structures are shown in Figure 2(A) and (B), respectively. In the ferroelectric structure, the ordered arrangement of the cations induces an asymmetric distortion of the inorganic framework through ordered hydrogen-bonding interactions, establishing a polar axis along the crystallographic direction. By contrast, the paraelectric structure reflects orientational disorder of the cations and a higher average symmetry of the inorganic framework. For the subsequent field-response calculations, the Cartesian axis is chosen along the crystallographic direction for both the ferroelectric and paraelectric phases. BOMD calculations are performed using QE with the PBE functional, SG15 norm-conserving pseudopotentials,44 DFT-D3 dispersion correction,49 and -point Brillouin-zone sampling. The 300 and 450 K simulations are initialized from the ferroelectric and paraelectric structures, respectively. For the real-time electronic propagation, the active spaces span bands 193–1187 of the ferroelectric structure and 193–1243 of the paraelectric structure.

Figure 2. Relaxed structure models of (BA)CsPbBr. (A) Ferroelectric structure used to initialize the 300 K simulation. (B) Paraelectric structure used to initialize the 450 K simulation. Both models are supercells. For both structures, the Cartesian direction used for the field-response calculations is aligned with the crystallographic direction.
Because 300 and 450 K lie below and above the experimentally reported Curie temperature, respectively, the two trajectories provide finite-temperature simulations on opposite sides of the phase transition. For each temperature, we first equilibrate the system for 4 ps in the NVT ensemble using ab initio MD, followed by a 4 ps NVE production trajectory used for response sampling. Owing to the high computational expense of the nonlinear response calculations, we do not perform the current calculation over the full 4 ps trajectory. Instead, 51 snapshots are sampled at an interval of 80 fs. This is because the nonlinear response is determined by the atomic structure, which evolves on picosecond and subpicosecond time scales. An 80fs interval can still show a smooth evolution of shift current response. Starting from each snapshot, a 20 fs field-driven electronic propagation is performed along the corresponding ionic trajectory segment. Across the 51 sampled configurations, the average
PBE HOMO–LUMO gaps are 2.56 eV at 300 K and 2.38 eV at 450 K. The electronic density matrix is propagated with a time step of 0.1 fs. Positive-field, negative-field, and zero-field calculations are carried out along the Cartesian direction using an optical field with a photon energy of 4.0 eV and a peak field amplitude of 0.01 V/Å (SI, Eq. (53)). The three time-dependent current traces are combined to isolate the even-order current response. Its quadratic scaling with field amplitude is verified in the weak-field regime, as shown in the SI (Figure S6), confirming that the response is dominated by the second-order contribution. The second-order conductivity is then extracted from this response.

Figure S6. Linear scaling of the configuration-averaged DC current with . (A) Results for the 300 K NVE trajectory. (B) Results for the 450 K NVE trajectory. For each temperature, the same 13 thermal configurations are used at , , and V Å. Red filled circles represent the configuration-averaged DC currents at each field amplitude. The vertical axis shows . All calculations use a photon energy of 4.0 eV. The even-order current is averaged over 16 complete optical cycles, corresponding to the sampled time window from 3.1 to 19.6 fs. The production calculations reported in the main text use V Å. The lines are guides to the eye.
The finite-temperature second-order response is shown in Figure 3. Figure 3A presents the values obtained along the 300 K and 450 K NVE trajectories. At 300 K, the response remains negative throughout the trajectory and fluctuates around a clearly nonzero mean, indicating that the sampled thermal configurations generally exhibit a nonvanishing nonlinear response. By contrast, the response at 450 K has an overall smaller magnitude and frequently changes sign. Although individual thermal configurations along the high-temperature trajectory can still generate finite second-order responses, these responses tend to vanish when averaged over a relatively long time range. The different statistical behaviors of the two trajectories are more clearly revealed by the cumulative averages in Figure 3B.

Figure 3. Finite-temperature second-order conductivity of (BA)CsPbBr calculated with CPA-NAMD-extF. (A) along the 300 and 450 K NVE trajectories. (B) Corresponding cumulative trajectory averages. Black circles and red squares denote the 300 and 450 K results, respectively.
At 300 K, the cumulative average remains close to a finite value over most of the sampled trajectory and reaches A/V at 4 ps. By contrast, the cumulative average at 450 K gradually approaches zero from an initially positive value, indicating progressive cancellation between positive and negative contributions. These results demonstrate that a single static configuration cannot reliably represent the macroscopic finite-temperature nonlinear response, highlighting the need to explicitly sample and average over multiple thermal configurations along finite-temperature trajectories.
Furthermore, we calculate the real-space current distributions of the relaxed ferroelectric (FE) and paraelectric (PE) structures to reveal the microscopic current in real space. The same external field as in the finite-temperature calculations is used. Following the procedure described above, we construct the even-order real-space current and average it over an integer number of optical periods. The resulting time-averaged current is denoted as the DC current . Figure 4 shows the DC real-space current distributions in the FE and PE structures. Panels A and B show pronounced spatial variations of the current normal to the – plane, with large amplitudes concentrated near Br atoms. The slab-resolved currents in panels C–F further reveal pronounced Br-centered local current circulation. For both FE and PE structures, these vortex currents tend to cancel each other in the total current .

Figure 4. DC real-space current distributions in the FE and PE structures. All quantities shown are derived from the time-averaged even-order real-space current . (A) FE and (B) PE normal current components on the – projection after averaging along . In panels A and B, the red–blue background shows the current component normal to the – plane, with red indicating current flowing into the plane and blue indicating current flowing out of the plane. The dashed lines mark the boundaries between slabs 1 and 2 along the direction. See Figure 2 for the atomic structure. Slab 1 corresponds to [0, 0.25) [0.75, 1), and slab 2 corresponds to [0.25, 0.75). (C,D) FE currents averaged over slabs 1 and 2, respectively, in the – plane. (E,F) PE currents averaged over slabs 1 and 2, respectively, in the – plane. In panels C–F, black arrows indicate the in-plane current, while the red–blue background shows the signed two-dimensional curl normal to the – plane, with opposite colors corresponding to opposite circulation directions. Panels A and B share the same color scale, while panels C–F share a common color scale and arrow scale. Pb, Br, and Cs atoms are shown in panels A and B, whereas the organic components are omitted.
It is interesting to investigate the microscopic origin of these Br-centered vortex currents. We decompose the total real-space current into the density-matrix–velocity (), interband adiabatic correction, and explicit components, as defined in Eq. (14). We find that the component dominates the Br-centered vorticity. By further decomposing into (i.e., ), we find that these vortex currents arise mainly from specific pairs. By further taking into account the real-space expression in Eq. (14),
Here, is the duration of the time-averaging window. Our calculations show that only a few intermediate states contribute significantly to the vortex currents. We find that when and are mainly characterized by Br orbitals and is mostly characterized by a Br orbital, the overall vortex current is maximized. To illustrate how this – orbital coupling can generate circulation, we construct a minimal hydrogenic model with onsite and orbitals. The analytical derivation in § 8 of the Supplemental Information shows that such coupling can generate an atom-centered circulating current pattern.
Before we finish, we want to talk about limitations of the present CPA-NAMD-extF framework. Since the velocity gauge and the finite number of states are used for electronic dynamics, it suffers from the common problem that some contributions from states outside the truncated adiabatic states cannot be fully described. The finite-band correction partially compensates for missing high-energy contributions to the current but does not provide a full correction. Moreover, it becomes worse with the ground-state adiabatic states as the basis for excitations by strong fields. In this case, the Houston basis or a dense k-point sampling will be appropriate but their computational cost will be huge for large systems. The current method is therefore most reliable in the relatively weak field regime.
In summary, we have developed CPA-NAMD-extF for CPA-NAMD simulation with external fields. The method combines reduced-space density-matrix propagation with self-consistent electronic-density updates. Benchmarks against SALMON and PWmat validate the implementation for finite-field currents and linear optical responses. Calculations of 576-atom SiO further demonstrate its applicability to large and structurally complex systems. Such system will be very challenging for regular rt-TDDFT calculations. For (BA)CsPbBr, the finite-temperature second-order response shows strong fluctuations, highlighting the importance of explicit thermal sampling. Real-space current reveals pronounced Br-centered vortex currents in both the ferroelectric and paraelectric structures. Band- and orbital-resolved analysis further identifies a dominant local channel involving Br characterized states coupled through Br characterized intermediate states. A minimal hydrogenic model illustrates how such – orbital coupling can generate atom-centered circulation. Overall, CPA-NAMD-extF provides an efficient framework for charge density evolution under external fields within the framework of CPA-NAMD.
The CPA-NAMD-extF Method
CPA-NAMD-extF propagates the electronic density matrix within an active adiabatic subspace along precomputed field-free Born–Oppenheimer molecular dynamics (BOMD) trajectories generated using Quantum ESPRESSO (QE).[1, 2] The electronic propagation is performed under a time-dependent external field in the velocity gauge.[3, 4] With the classical-path approximation (CPA), the ions remain on the precomputed BOMD trajectory, and the field-induced electronic response is not fed back into the nuclear forces or ionic motion.[5, 6, 7]
For each BOMD configuration in a trajectory, the instantaneous adiabatic Kohn-Sham (KS) orbitals are obtained by solving the ground-state Kohn–Sham equation,
The ground-state KS Hamiltonian matrix , the ground-state Hartree–exchange-correlation potential matrix , and the velocity matrix are then represented in the instantaneous adiabatic KS basis at .
To reduce the computational cost, the instantaneous adiabatic KS states are divided into an active subspace and an inactive deep-valence subspace . The active–active density-matrix block is propagated self-consistently, whereas the inactive–inactive block keeps its ground-state occupations fixed. The time-dependent electronic density is constructed from both blocks. The corresponding inactive charge density is constructed as
Here, denotes the ground-state occupation of the inactive KS state at . The inactive subspace charge density is evaluated and stored at every BOMD time point. Field-induced inactive–active coherences are reconstructed instantaneously for current evaluation but are not included in the self-consistent density.
To represent the active-space matrices at in the active adiabatic KS basis at , we use the overlap matrix between the KS states at two adjacent BOMD configurations, defined as
The overlap matrix is used to represent the active-space matrices at in the adiabatic KS basis at . For , the transformation is given by
Here, the superscript indicates the adiabatic KS basis in which the matrix is represented, and the matrices are restricted to the active subspace . After this transformation, the active-space matrices at and are represented in the same adiabatic KS basis at . These matrices are then linearly interpolated from the BOMD time grid onto the finer electronic propagation time grid.
For , the interpolation is given by
This procedure yields the active-space matrices , , and at any time within each BOMD interval, represented in the adiabatic KS basis at . During electronic propagation from to , the active adiabatic KS basis at is kept fixed. For notational simplicity, the basis superscript is omitted below when discussing propagation within a single BOMD interval. Atomic units are used throughout unless otherwise stated.
The vector potential is related to the external electric field by
Here, is the speed of light, and is used in the present calculations. With the sign convention adopted here, the external field potential is
Using the interpolated matrices , , and , the propagation Hamiltonian is constructed as
Here, represents the part of the Hamiltonian independent of the propagated electronic density, obtained by interpolation along the BOMD trajectory.
The active-space density matrix is propagated self-consistently at each electronic step, following a procedure similar to that reported in Ref. 8. The propagation is initialized at using the ground-state occupations:
Here, denotes the ground-state occupation of the active KS state . One BOMD step (e.g., ) is split into several smaller electronic steps (e.g., ). At each electronic step from to , an initial trial charge density at is extrapolated from the converged charge densities of previous electronic steps. This trial density is used to construct the propagation Hamiltonian at according to Eq. (8). The propagation Hamiltonian at time is then linearly interpolated within the electronic step. The active-space density matrix is then propagated as
This equation is integrated using a fourth-order Runge–Kutta method. The propagated density matrix is then used to reconstruct the active-space electronic density:
The total electronic density is constructed by adding the inactive deep-valence contribution:
Here, is defined in Eq. (2) and remains fixed within each BOMD interval. The reconstructed density is compared with the trial density . If the prescribed convergence criterion is satisfied (i.e., ), the reconstructed density and the propagated density matrix are accepted as the converged values. Otherwise, the two densities are linearly mixed:
Here, is the density-mixing parameter. The mixed density is used as the trial density for the next self-consistent iteration. The density-matrix propagation and density mixing are repeated until the prescribed convergence criterion is satisfied. This self-consistent procedure yields the time-dependent density matrix and electronic density at each electronic step.
At the boundary between two adjacent BOMD intervals, the converged active-space density matrix is transformed from the adiabatic KS basis at to that at . Such transformation is given by
Here, is the overlap matrix defined in Eq. (3). The transformed density matrix serves as the initial condition for electronic propagation in the next BOMD interval.
After convergence of the active-space self-consistent propagation, the current is evaluated using an effective density matrix in the combined space . The density matrix is assembled as
The active-space density matrix is obtained from the self-consistent propagation, while contains the frozen ground-state occupations which are fixed. The inactive–active coherence is reconstructed instantaneously for current evaluation, with . These off-diagonal blocks are not included in the self-consistent electronic density.
To calculate , we introduce the Hamiltonian in the subspace , written in block form as
Here, is the self-consistent active-space propagation Hamiltonian. The inactive-space Hamiltonian is approximated by its diagonal ground-state form, . The inactive–active coupling is approximated by the external-field contribution, , neglecting the time-dependent Hartree–exchange-correlation contribution to this block. The corresponding active–inactive block satisfies .
Using Eqs. (16) and (15), together with the approximations described above, the block of the Liouville equation becomes
Here, is defined as
In the following, the time derivative of is neglected. (33) then reduces to
To solve this algebraic equation, we diagonalize the converged active-space propagation Hamiltonian using its unitary eigenvector matrix :
Here, denotes the instantaneous state- eigenvalue of the active-space propagation Hamiltonian. The inactive–active density-matrix block and its source term are transformed into this eigenbasis as and . Since is approximated by its diagonal ground-state form, (35) can be solved elementwise as
The reconstructed coherence is transformed back to the adiabatic KS basis at using for current evaluation. Although not explicitly propagated, remains time dependent through the external potential and active-space eigenstates.
With the reconstructed density matrix , the macroscopic cell-averaged current density is calculated as , and
where is the unit-cell volume. The paramagnetic contribution is evaluated as
Here, the trace is taken over the subspace , including the active–active, inactive–inactive, and reconstructed inactive–active contributions. The diamagnetic contribution is , where is the number of electrons in the unit cell.
In the velocity gauge, current convergence generally requires a large number of high-energy unoccupied states. To partially compensate for the missing contributions caused by finite-band truncation, we employ the first-order adiabatic correction derived in Ref. 9. The correction is given by
Here, is the number of bands retained in the current evaluation, and the sum over runs over the occupied ground-state KS states. The adiabatic energies are taken from the ground-state KS calculations at each BOMD configuration, whereas the velocity matrix elements are interpolated onto the electronic propagation time grid.
Current Post-Processing
The macroscopic current density is evaluated according to Eq. (38). For linear optical responses, the paramagnetic and finite-band correction currents are used for spectral analysis, while nonlinear responses are extracted from the total current.
Linear-Response Analysis
For linear-response calculations, a weak -kick perturbation is applied in the velocity gauge. Using the relation between the electric field and vector potential defined in Eq. (6), the -kick is introduced through a step-like vector potential:
which corresponds to an electric field
Here, is the time-integrated kick strength, is the kick time, denotes the field-polarization direction, and is the step function. The kick strength is chosen sufficiently small to ensure a linear response.
The paramagnetic and finite-band correction currents are used for spectral analysis. The current projected along the field-polarization direction is defined as
The zero-field reference is subtracted to obtain the induced current , where is taken as the current just before the application of such kick field. To suppress spectral oscillations caused by a finite-time propagation, a Gaussian damping window is applied:
where is the broadening parameter, and and define the time interval used for spectral analysis. A zero-frequency offset associated with the step-like vector potential is also removed. The processed current is constructed as
where
The coefficient is chosen so that the processed current has a vanishing zero-frequency component within the analysis window.
The Fourier transform is defined as
Under this convention, the Fourier transform of the -kick electric field is
The raw imaginary part of the dielectric function is obtained from the Fourier-transformed current:
An effective -sum normalization is applied to determine the absolute spectral weight:
Here, denotes the frequency range used for normalization. This procedure rescales the raw spectrum so that its integrated spectral weight matches the effective -sum spectral weight corresponding to electrons.
The real part of the dielectric function is obtained through the Kramers–Kronig relation:[10]
Here, denotes the Cauchy principal value. In practice, the integral is evaluated over the available finite frequency window.
The absorption coefficient is then calculated as
where is the photon energy.
Nonlinear-Response Analysis
For nonlinear-response calculations, finite-amplitude oscillatory fields are applied. The monochromatic perturbation is introduced through the vector potential
where is the vector-potential amplitude, is a -shaped turn-on envelope that smoothly increases from zero to unity, is the field-onset time, is the optical frequency, and is the phase. In the constant-envelope region where , the electric-field amplitude is
The field-induced even-order current is isolated from the positive-field, negative-field, and zerofield calculations as
Here, removes the field-independent background, while the positive- and negative-field combination cancels all odd-order contributions. In the weak-field regime,
so the extracted current is dominated by the second-order response.
For a monochromatic field at frequency , the DC second-order response corresponds to the zero-frequency component of the even-order current. This component is obtained by averaging over a selected time window:
The corresponding second-order conductivity is calculated as
Here, and denote the beginning and end of the averaging window. The window is chosen within the constant-envelope region to span an integer number of optical periods, , where is an integer.
Real-Space Current
To construct the real-space current density, we first express the finite-band adiabatic correction in a density-matrix form. Starting from Eq. (40), the off-diagonal contribution to the macroscopic current density is
Here, denotes the ground-state occupation of state , following the occupation convention used in Eq. (40). Note that since the conduction band has , the summation is expanded to subspace . The occupation-sum part is left for further evaluation. This equation can be further simplified owing to the real-valued and hermiticity of .
This identity holds for the complete double sum rather than for individual matrix elements.
Using this identity, we introduce the correction matrix
The diagonal elements are set to zero. This is because the diagonal elements of vanish, and the following trace only involves off-diagonal matrix elements. For numerically degenerate states, the corresponding matrix elements are also set to zero, with the same pairs excluded from the original correction sum. The resulting matrix is Hermitian. Substituting Eq. (60) into Eq. (59), we obtain
Thus, provides an equivalent matrix representation of the off-diagonal finite-band correction. It is used only for current evaluation and does not enter the self-consistent electronic-density update.
We next derive the real-space current density. Using the position-resolved current operator defined in the main text and inserting the adiabatic KS states, we express the contribution from as
Here, denotes the adiabatic KS orbital at the current BOMD configuration . The local diamagnetic contribution is . Here, is the self-consistent electronic density defined in Eq. (12), constructed from the propagated active-space density matrix and the frozen inactive-state contribution. The reconstructed inactive–active coherences are included in for current evaluation but do not contribute to . The occupation-sum part of Eq. (40) is represented positionally by , where is the ground-state reference density. Combining these contributions gives the explicit term in the real-space current density.
To evaluate the real-space current density, we discretize the spatial coordinates onto the DFT FFT grid with points. At each grid point , Eq. (63) gives
The first term contains the density-matrix–velocity () contribution and the off-diagonal finite-band correction, while the second combines the diamagnetic contribution and the occupation-sum correction. Using the normalization of the KS orbitals and the electronic densities, the spatial average gives
Thus, the spatially averaged real-space current reproduces the macroscopic current, including the finite-band correction.
The even-order real-space current is obtained using the same positive- and negative-field combination as in Eq. (55):
The DC real-space current is then calculated by averaging over the selected time window,
Its spatial average reproduces the macroscopic DC current defined in Eq. (57):
Real-Space Current Decomposition and Hydrogenic Model
To investigate the microscopic origin of the Br-centered current vortices shown in Figure 4, we analyze the time-averaged even-order real-space current in the zero-temperature ferroelectric (FE) and paraelectric (PE) structures. The DC current maps are obtained by averaging the even-order real-space current over an integer number of optical periods.
For the spatial visualization shown in Figure 4A and B, the current is averaged along the axis and projected onto the – plane. The structure is further divided into two slabs along the direction, with fractional-coordinate intervals and . The corresponding slab-averaged currents are projected onto the – plane shown in Figure 4C–F. The signed two-dimensional vorticity normal to each projection plane is calculated as
where and are two orthogonal directions along and , respectively. The spatial derivatives are evaluated on the FFT grid. The resulting vorticity maps characterize the local circulation patterns shown in Figure 4C–F.
According to Eq. (64), the real-space current consists of the density-matrix–velocity (), off-diagonal finite-band correction ( related terms), and explicit field–density contributions . The off-diagonal finite-band correction cancels in the even-order response because it is linear in the external field. For a representative current field of the FE structure, the term is the dominant one. We focus only on the contribution in the following microscopic analysis. The even-order current is evaluated as
where .
To identify the electronic states associated with the Br-centered current vortices, we decompose the even-order current into contributions from individual pairs of adiabatic KS states.
where we define the band-pair contribution as
with
For the band-pair analysis, the time average is evaluated over 16 complete optical cycles from 3.0 to 19.5 fs using piecewise-linear integration of the saved current samples. By checking all pairs of for their contributions of vorticity, the highest-ranked FE pair, is selected as an example. Other contributing pairs show a similar mechanism, as discussed later. To further identify the orbital channels associated with these band pairs, we decompose the time-averaged current into contributions from each intermediate state . Since the density-matrix element is only a complex number, the vorticity of currents comes completely from the KS states and velocity matrix. For the representative FE pair , we find that state contributes most to the vorticity. Atomic-orbital projections show that states 535 and 543 are predominantly of Br 4 character, whereas state 149 is predominantly of Br 4 character. The corresponding real-space probability densities are shown in Figure S1. Other state- with orbital character and state- with orbital character also introduce significant vortex current. This suggests that the local Br 4–4 velocity coupling is an important microscopic channel associated with the Br-centered current vortices.

Figure S1. Real-space probability-density isosurfaces of the representative FE states. (A,B) States and forming the selected band pair. (C) The leading intermediate state . Only the Pb–Br framework is shown, and the crystallographic axes are indicated at the lower left.
To further illustrate how local – velocity coupling can generate an azimuthal current kernel, we construct a minimal hydrogenic model. The model describes the spatial geometry of the current kernel rather than the quantitative electronic structure or current magnitude of Br. Working in atomic units and neglecting the nonlocal pseudopotential contribution, the velocity operator is
We consider a intermediate state and two orthogonal orbitals centered on the same atom:
The normalized hydrogenic orbitals are
where .
The velocity matrix element between the and states is
The remaining Cartesian components vanish by spatial symmetry. Using the same procedure for the and states, the relevant velocity matrix elements are
where and are Cartesian unit vectors.
Following the intermediate-state decomposition in Eq. (73), the contribution of the state to the current kernel between and is
Substituting the hydrogenic orbitals and velocity matrix elements gives
To examine the spatial structure of this kernel, we introduce cylindrical coordinates, and . Since , Eq. (80) becomes
As shown in Figure S2, coupling between two orthogonal orbitals through a common state naturally produces an azimuthal current contribution.

Figure S2. Spatial structure of the hydrogenic current kernel. The normalized kernel is defined as , with . (A) Magnitude in the plane at , with arrows indicating its azimuthal direction. (B) Corresponding magnitude in the plane at , showing the out-of-plane localization of the kernel circulating in the plane. Both panels share the same linear color scale. Coordinates are given in units of the Bohr radius .
Additional Results
Unless otherwise stated, the QE calculations used to generate the electronic-structure data for CPA-NAMD-extF employ the PBE exchange-correlation functional and SG15 PBE norm-conserving pseudopotentials. A plane-wave cutoff of 50 Ry and -point sampling are adopted throughout. Ground-state electronic structures, wave-function overlaps, and velocity matrix elements are generated with QE during BOMD.
Benchmark of the Time-Dependent Dipole Response
We first benchmark the time-dependent dipole response against PWmat rt-TDDFT in order to validate the charge-density response. Three systems are considered: an molecule, a conjugated 1D chain , and monolayer 2D . The same ionic trajectories and external fields are used in both TDDFT and CPA-NAMD-extF calculations, thereby eliminating differences associated with ionic motion and enabling a direct comparison of the electronic dipole dynamics.
All systems are charge neutral and non-spin-polarized. CPA-NAMD-extF uses the same ionic trajectories as the PWmat rt-TDDFT calculations. The PWmat trajectories have a time step of 0.1 fs, from which one atomic configuration is sampled every 1 fs for the QE BOMD calculations, yielding 101 configurations over 0–100 fs. Spatial symmetry is disabled, and the nonlocal pseudopotential contribution is included in the velocity matrix elements. The system sizes, temperatures, and electronic-state windows are summarized in Table S1.
| System | No. of atoms | No. of valence electrons | Temperature (K) | Active window |
| 28 | 76 | 300 | 15–150 | |
| 6 | 24 | 500 | 1–41 | |
| 48 | 416 | 500 | 97–322 |
Table S1. Structural information and active electronic-state windows used in the dipole benchmark.
Table S1: Structural information and active electronic-state windows used in the dipole benchmark.
CPA-NAMD-extF uses an electronic time step of 0.1 fs, corresponding to 10 electronic steps between adjacent QE BOMD configurations. The total propagation time is 100 fs. The external field is polarized along and has a Gaussian-envelope sinusoidal form,
with . Here, denotes the Gaussian width parameter. The field parameters are listed in Table S2. PWmat and CPA-NAMD-extF use the same field waveform and parameters.
| System | Field direction | (W cm) | (V Å) | (fs) | (fs) | (eV) | |
| 0.6138 | 50 | 15 | 2.00 | ||||
| 0.5490 | 50 | 15 | 2.00 | ||||
| 0.6138 | 50 | 15 | 2.00 |
Table S2. External-field parameters used in the dipole benchmark.
Table S2: External-field parameters used in the dipole benchmark.
For CPA-NAMD-extF, the corresponding vector potential is
Using the conventional sign definition of the electric dipole moment, the electronic, ionic, and total dipole moments are
Because both methods use the same ionic trajectory, their ionic contributions are identical. We therefore compare the change in the total dipole moment, . As shown in Figure S3, these three calculations show very close agreement. The dominant oscillation frequencies, phases, and temporal envelopes are well reproduced, with no systematic drift over 100 fs. The remaining discrepancies are primarily small local amplitude differences.
Benchmark of the Real-Time Current Response
We next benchmark the real-time current against SALMON rt-TDDFT using a fixed monolayer MoS supercell. Both calculations use the same atomic structure, simulation cell, vacuum thickness, and external field. Fixing the ions isolates the electronic propagation and current evaluation.
A monochromatic field polarized along is applied using Eq. (53). The parameters are V Å, eV, , fs, and a 2 fs switching ramp. The applied vector potential is shown in Figure S4(A).
The CPA-NAMD-extF active window contains KS states 1–1068. The QE BOMD time step is 0.5 fs and the electronic time step is 0.025 fs, giving 20 electronic steps per BOMD step. The ionic coordinates are identical at all reference time points. SALMON uses an electronic time step of 0.2 as. The CPA-NAMD-extF current is evaluated from Eq. (38), including the paramagnetic, diamagnetic, and finite-band adiabatic-correction terms. We compare the component, .
The two currents show nearly identical oscillation frequencies, phases, and peak positions, with only small local amplitude differences. These results support the accuracy of the CPA-NAMD-extF real-time current evaluation for this periodic benchmark.
Benchmark of the Linear Optical Response
Finally, we benchmark the linear optical response of crystalline Si against PWmat RT-TDDFT. A supercell constructed from the two-atom primitive cell is used, containing 128 Si atoms. A weak -kick is applied along [111]. The kick magnitude is 0.002 ,
corresponding to . The kick is applied at fs. PWmat first propagates for 0.2 fs with a 1 fs time step, followed by 10 fs with a 0.01 fs time step. For CPA-NAMD-extF, the fixed-ion QE reference data are generated at 0.05 fs intervals. The total propagation time is 15 fs.
The time-dependent current is processed using the linear-response procedure described above. The CPA-NAMD-extF spectra are linearly interpolated onto the PWmat energy grid, and the comparison is performed over the common energy range of 0.4–20 eV.
These two calculations show negligible differences as shown in Figure S5. Some very small differences are mainly confined to the relative intensities of weak high-energy features. These results support the reliability of CPA-NAMD-extF for describing the linear optical response of crystalline Si under the present benchmark conditions.
Weak-Field Scaling of the Second-Order Response
To verify the quadratic scaling of the DC current with field amplitude, we perform calculations using different field strengths but with the same thermal configurations of the 300 and 450 K trajectories.
In the weak-field regime, the even-order current satisfies
Consequently, the time-averaged DC current satisfies
Therefore, the DC current should scale linearly with within the weak-field regime. For each temperature, we select 13 starting configurations from the NVE trajectory between 1.04 and 2.00 ps at intervals of 80 fs, giving a total of 26 starting configurations. For each configuration, calculations with positive and negative field amplitudes, together with a zero-field reference, are performed for , 0.010, and 0.020 V Å. All other computational parameters, including the photon energy of 4.0 eV, are kept unchanged. The even-order current is averaged over 16 complete optical cycles to obtain for each configuration. The resulting DC currents are then averaged over the 13 configurations to obtain at each field amplitude. This procedure yields 39 DC-current values at each temperature (13 configurations and 3 field amplitudes).
As shown in Figure S6, the configuration-averaged DC current exhibits approximately linear scaling with at both temperatures. At 300 K, the configuration-averaged DC current remains negative, whereas at 450 K, it is positive with a much smaller magnitude. The approximately linear scaling indicates that the even-order current is dominated by the second-order contribution in the weak-field regime. These results also support the use of V Å for the second-order response calculations reported in the main text.
References
- [1]Giannozzi, P. et al. QUANTUM ESPRESSO: a modular and open-source software project for quantum simulations of materials. Journal of Physics: Condensed Matter 2009, 21, 395502.DOI
- [2]Giannozzi, P. et al. Advanced capabilities for materials modelling with Quantum ESPRESSO. Journal of Physics: Condensed Matter 2017, 29, 465901.
- [3]Yabana, K.; Sugiyama, T.; Shinohara, Y.; Otobe, T.; Bertsch, G. F. Time-dependent density functional theory for strong electromagnetic fields in crystalline solids. Physical Review B 2012, 85, 045134.DOI
- [4]Pemmaraju, C.; Vila, F.; Kas, J.; Sato, S.; Rehr, J.; Yabana, K.; Prendergast, D. Velocity-gauge real-time TDDFT within a numerical atomic orbital basis set. Computer Physics Communications 2018, 226, 30–38.DOI
- [5]Augustin, S. D.; Rabitz, H. The classical path approximation in time-dependent quantum collision theory. The Journal of Chemical Physics 1978, 69, 4195–4200.DOI
- [6]Tully, J. C. Molecular dynamics with electronic transitions. The Journal of Chemical Physics 1990, 93, 1061–1071.DOI
- [7]Akimov, A. V.; Prezhdo, O. V. The PYXAID Program for Non-Adiabatic Molecular Dynamics in Condensed Matter Systems. Journal of Chemical Theory and Computation 2013, 9, 4959–4972.DOI
- [8]Wang, Z.; Li, S.-S.; Wang, L.-W. Efficient Real-Time Time-Dependent Density Functional Theory Method and its Application to a Collision of an Ion with a 2D Material. Physical Review Letters 2015, 114, 063004.pubmed.ncbi.nlm.nih.gov/25723218
- [9]Yakovlev, V. S.; Wismer, M. S. Adiabatic corrections for velocity-gauge simulations of electron dynamics in periodic potentials. Computer Physics Communications 2017, 217, 82–88.DOI
- [10]Kuzmenko, A. B. Kramers–Kronig constrained variational analysis of optical spectra. Review of Scientific Instruments 2005, 76, 083108.DOI