![]() |
Octopus
|
Data Types | |
| type | dmp_t |
Functions/Subroutines | |
| subroutine | dmp_init (this, namespace, st, space, hm) |
| Initialise an instance of density matrix dissipation. More... | |
| subroutine, public | dm_propagation_init_run (dmp, namespace, space, gr, ions, st, hm, mc, from_scratch) |
| Initialise the adiabatic states prior to running TD propagation. More... | |
| subroutine, public | dm_end_run (system_grp, dmp) |
| subroutine, public | dm_propagation_run (dmp, namespace, space, gr, ions, st, mc, hm, ks, iter, dt, ext_partners, update_energy) |
| Density matrix propagation. More... | |
| subroutine | total_population (ik, st, gr, nrm2, pop) |
| Calculate total population. More... | |
| subroutine | population_in_adiabatic (ik, ad_st, st, overlap, pop) |
| Calculate number of electrons in the adiabatic basis. More... | |
| subroutine | construct_residuals (gr, namespace, ad_st, st, ik, othn, overlap_ad_ks, nrm2_tdks, nresd, overlap_resd_ks, resd) |
| Construct the residual basis and its overlap with TDKS wavefunctions. More... | |
| subroutine | construct_density_matrix (nresd, ik, st, overlap_ad_ks, overlap_resd_ks, rho_mat) |
| Construct the full density matrix in the adiabatic and residual basis. More... | |
| subroutine | broadcast_occupation (occ, kpt, nst, parstate) |
| subroutine | dissipation (hm, st, namespace, nresd_k, dt, dmp, rho_mat_k) |
| Evolve the density matrix in time under dissipation. More... | |
| subroutine | lindblad_uniform (dmp, kpt, nresd_k, dt, rho_mat_k) |
| Evolve the density matrix in time under uniform dissipation. More... | |
| subroutine | transition_rate_uniform (uniform, ad_st, ik, rtrans) |
| Calculate state transition rates assuming uniform electron-phonon coupling. More... | |
| subroutine | lindblad_operator_uniform (nst, nresd, rtrans, den_mat, l_mat) |
| Calculate the Lindblad dissipator matrix for uniform decay. More... | |
| subroutine | lindblad_2times (dmp, kpt, nresd_k, dt, rho_mat_k) |
| Evolve the density matrix using the phenomenological two-time (T1/T2) relaxation model. More... | |
| subroutine | lindblad_from_epw (dmp, hm, kpt, system_grp, namespace, nresd_k, dt, rho_mat_k) |
| Evolve the density matrix under EPW-derived Lindblad dissipation. More... | |
| subroutine | collision_from_epw (dmp, hm, kpt, system_grp, namespace, nresd_k, dt, rho_mat_k) |
| Evolve the density matrix subject to the electron-phonon collision integral. More... | |
| subroutine | dm_propagation_update_trans_rate (this, hm, system_grp, namespace) |
| Read and update the EPW transition matrix only when the vector field index changes. More... | |
| subroutine | iopar_open_trans_rate (namespace, ions, hm, system_grp, dmp) |
| Read in metadata of transition rates, build intra/inter communicators and shared memory window. More... | |
| subroutine | iopar_read_trans_rate (ia, system_grp, namespace, dmp) |
| Read in transition rates to the shared memory window and then broadcast via internode communicator. More... | |
| subroutine | iopar_close_trans_rate (system_grp, dmp) |
| Finalize transition rate resources. More... | |
| subroutine | build_epw_kmap (namespace, kpoints, dmp) |
| Map internal k-point indices to the 1D EPW Monkhorst-Pack grid and verify mesh compatibility. More... | |
| integer function | get_vector_field_index (dmp, hm, namespace) |
| Get the flattened 1D index of the current vector potential on the discrete EPW vector field grid. More... | |
| real(real64) function | get_trans_rate (dmp, nik_mp, jbnd, ibnd, k, kq, p_block) |
| Get transition rate from state (k, ibnd) to (kq, jbnd). More... | |
| subroutine | lindblad_operator_epw (dmp, ik, nik_skip, nresd, rho_diag, den_mat, l_mat) |
| Calculate the Lindblad dissipator matrix using EPW electron-phonon scattering rates. More... | |
| subroutine | lifetime (dmp, ik, ibnd, nik_skip, gam) |
| Calculate the total scattering rate (inverse lifetime) for a given state. More... | |
| subroutine | get_gamma (dmp, ik, ibnd, nik_skip, gam_in, gam_out) |
| Calculate in/out scattering rates (Gamma) for a specific state (ik, ibnd). More... | |
| subroutine | update_st (dmp, ik, gr, namespace, nresd, overlap_ad_ks, overlap_resd_ks, nrm2_tdks, resd, st, rho_mat, pop) |
| Diagonalize the density matrix to update occupations and wavefunctions. More... | |
| subroutine | update_wfc_occ (ik, ad_st, resd, gr, nresd, occ, v_mat, st, pop) |
| Update states directly from diagonalization (no Procrustes). More... | |
| subroutine | update_wfc_occ_procrustes (ik, ad_st, resd, gr, nresd, overlap_ad_ks, overlap_resd_ks, nrm2_tdks, occ_tilde, v_mat, st, pop) |
| Update states using Procrustes transformation to ensure time continuity. More... | |
| logical function | is_hermitian (n, mat) |
| Check if a matrix is Hermitian. More... | |
Variables | |
| real(real32), dimension(:), pointer, volatile | ave_trans |
| Average transition rates in shared memory. More... | |
|
private |
Initialise an instance of density matrix dissipation.
Definition at line 198 of file dm_propagation.F90.
| subroutine, public dm_propagation_oct_m::dm_propagation_init_run | ( | type(dmp_t), intent(inout) | dmp, |
| type(namespace_t), intent(in) | namespace, | ||
| type(electron_space_t), intent(in) | space, | ||
| type(grid_t), intent(in) | gr, | ||
| type(ions_t), intent(in) | ions, | ||
| type(states_elec_t), intent(in) | st, | ||
| type(hamiltonian_elec_t), intent(in) | hm, | ||
| type(multicomm_t), intent(in) | mc, | ||
| logical, intent(in) | from_scratch | ||
| ) |
Initialise the adiabatic states prior to running TD propagation.
Definition at line 413 of file dm_propagation.F90.
| subroutine, public dm_propagation_oct_m::dm_end_run | ( | type(mpi_grp_t), intent(in) | system_grp, |
| type(dmp_t), intent(inout) | dmp | ||
| ) |
Definition at line 465 of file dm_propagation.F90.
| subroutine, public dm_propagation_oct_m::dm_propagation_run | ( | type(dmp_t), intent(inout) | dmp, |
| type(namespace_t), intent(in) | namespace, | ||
| type(electron_space_t), intent(in) | space, | ||
| type(grid_t), intent(in) | gr, | ||
| type(ions_t), intent(in) | ions, | ||
| type(states_elec_t), intent(inout) | st, | ||
| type(multicomm_t), intent(in) | mc, | ||
| type(hamiltonian_elec_t), intent(inout) | hm, | ||
| type(v_ks_t), intent(inout) | ks, | ||
| integer, intent(in) | iter, | ||
| real(real64), intent(in) | dt, | ||
| type(partner_list_t), intent(in) | ext_partners, | ||
| logical, intent(in), optional | update_energy | ||
| ) |
Density matrix propagation.
| [in,out] | dmp | Density matrix propagation options |
| [in] | space | Electron space |
| [in] | gr | Grid |
| [in,out] | st | TDKS |
| [in,out] | hm | Hamiltonian, updated at each time step |
| [in,out] | ks | Kohn-Sham potential |
| [in] | iter | Time step index |
| [in] | dt | Time step size |
| [in] | ext_partners | External partners |
| [in] | update_energy | Whether to update the energy of the system |
Definition at line 485 of file dm_propagation.F90.
|
private |
Calculate total population.
\[ N = \sum_{k} \omega_{k} \sum_{n} |\psi_{n,k}|^2 f_{n,k} \]
| [in] | ik | k-point index |
| [in] | st | TDKS states |
| [in] | gr | Grid |
| [out] | nrm2 | Norm square of the TDKS wavefunctions |
| [in,out] | pop | Total population |
Definition at line 601 of file dm_propagation.F90.
|
private |
Calculate number of electrons in the adiabatic basis.
\[ pop_i = \sum_{j} f_j * |S^{\phi,\psi}_{i,j}|^2 \]
| [in] | ik | k-point index |
| [in,out] | ad_st | Adiabatic states |
Definition at line 633 of file dm_propagation.F90.
|
private |
Construct the residual basis and its overlap with TDKS wavefunctions.
Two options are provided for constructing the residual basis:
\[ |d_j\rangle = |\psi_j\rangle - \sum_{i=1}^N S^{\phi,\psi}_{ij} |\phi_i\rangle \]
\[ |d_j\rangle = \mathcal{N} \left( |\psi_j\rangle - \sum_{i=1}^N S^{\phi,\psi}_{ij} |\phi_i\rangle - \sum_{k=1}^{N_{\mathrm{res}}} S^{d,\psi}_{kj} |d_k\rangle \right) \]
Where:
| [in] | gr | Grid |
| [in] | ad_st | Adiabatic states |
| [in] | st | TDKS states |
| [in] | ik | k-point index |
| [in] | othn | construct orthonormal basis or not |
| [in] | overlap_ad_ks | <\phi | \psi> |
| [in] | nrm2_tdks | <\psi | \psi> |
| [out] | nresd | number of residual states |
| [out] | overlap_resd_ks | <d | \psi> |
| [in,out] | resd | Residuals |
Definition at line 677 of file dm_propagation.F90.
|
private |
Construct the full density matrix in the adiabatic and residual basis.
The density matrix is composed of four blocks. Exploiting Hermiticity, only the ad-ad, ad-resd, and resd-resd blocks need to be explicitly computed:
\[ \begin{aligned} \rho_{ij} &= \sum_{l=1}^N \left(S^{\phi,\psi}_{il} \sqrt{f_l} \right) \left( S^{\phi,\psi}_{jl} \sqrt{f_l} \right)^*, \quad &\text{(ad-ad)} \ \rho_{i,j+N} &= \sum_{l=1}^N \left(S^{\phi,\psi}_{il} \sqrt{f_l} \right) \left( S^{d,\psi}_{jl} \sqrt{f_l} \right)^*, \quad &\text{(ad-resd)} \ \rho_{i+N,j+N} &= \sum_{l=1}^N \left(S^{d,\psi}_{il} \sqrt{f_l} \right) \left( S^{d,\psi}_{jl} \sqrt{f_l} \right)^*. \quad &\text{(resd-resd)} \end{aligned} \]
The remaining resd-ad block is simply the complex conjugate transpose.
| [in] | nresd | Number of irreducible residuals |
| [in] | ik | k-point index |
| [in] | st | TDKS states |
| [in] | overlap_ad_ks | <phi | psi> |
| [in] | overlap_resd_ks | <d | psi> |
| [out] | rho_mat | The full density matrix |
Definition at line 805 of file dm_propagation.F90.
|
private |
Definition at line 885 of file dm_propagation.F90.
|
private |
Evolve the density matrix in time under dissipation.
The dissipation process is governed by the open quantum system master equation. Depending on the calculation mode, the dissipation can be evaluated in two forms:
\[ \mathcal{L}_D[\rho] = \sum_{\mu} \gamma_{\mu} \left( L_{\mu} \rho L_{\mu}^{\dagger} - \frac{1}{2} \{L_{\mu}^{\dagger} L_{\mu}, \rho\} \right) \]
where the damping rates and operators are determined by the chosen strategy (uniform decay, 2-times model, or rates read from EPW).Definition at line 939 of file dm_propagation.F90.
|
private |
Evolve the density matrix in time under uniform dissipation.
The time integration is performed using a 4th-order Taylor expansion of the Lindblad master equation.
Definition at line 976 of file dm_propagation.F90.
|
private |
Calculate state transition rates assuming uniform electron-phonon coupling.
Assuming \( E_j > E_i \) and \( N_{ph} = [\exp(\Delta E / k_B T_{ph}) - 1]^{-1} \):
\[ \Gamma_{j \to i} = \Gamma^0 (1 - f_i)(1 + N_{ph}), \quad \Gamma_{i \to j} = \Gamma^0 (1 - f_j) N_{ph} \]
Definition at line 1042 of file dm_propagation.F90.
|
private |
Calculate the Lindblad dissipator matrix for uniform decay.
\[ L_{il} = -\frac{1}{2} \sum_{j \neq i} \Gamma_{i \to j} \rho_{il}, \quad L_{li} = -\frac{1}{2} \sum_{j \neq i} \Gamma_{i \to j} \rho_{li}, \quad L_{jj} = \sum_{i \neq j} \Gamma_{i \to j} \rho_{ii} \]
Definition at line 1093 of file dm_propagation.F90.
|
private |
Evolve the density matrix using the phenomenological two-time (T1/T2) relaxation model.
\[ \begin{aligned} \rho_{ii}(t+dt) &= \rho^{\mathrm{GS}}_{ii} + \left( \rho_{ii}(t) - \rho^{\mathrm{GS}}_{ii} \right) e^{-dt/T_1} \ \rho_{ij}(t+dt) &= \rho_{ij}(t) e^{-dt/T_2} \quad (i \neq j) \end{aligned} \]
Where \( \rho^{\mathrm{GS}}_{ii} \) corresponds to dmpocc_gs(ist, ik_), and \( T_1, T_2 \) are dmptmodel(1:2).
Definition at line 1135 of file dm_propagation.F90.
|
private |
Evolve the density matrix under EPW-derived Lindblad dissipation.
The time integration is performed using a 4th-order Taylor expansion of the Lindblad master equation.
Definition at line 1176 of file dm_propagation.F90.
|
private |
Evolve the density matrix subject to the electron-phonon collision integral.
The dissipative dynamics are modeled analytically over the time step \(dt\):
Populations (diagonals) evolve via Fermis Golden Rule:
\[\rho_{ii} \leftarrow \rho_{ii} e^{-\Gamma_{out} dt} + \frac{\Gamma_{in}}{\Gamma_{out}} (1 - e^{-\Gamma_{out} dt})\]
Coherences (off-diagonals) decay via the Relaxation Time Approximation:
\[\rho_{ij} \leftarrow \rho_{ij} e^{-(\Gamma_i + \Gamma_j) dt / 2}\]
Definition at line 1265 of file dm_propagation.F90.
|
private |
Read and update the EPW transition matrix only when the vector field index changes.
Definition at line 1332 of file dm_propagation.F90.
|
private |
Read in metadata of transition rates, build intra/inter communicators and shared memory window.
Definition at line 1354 of file dm_propagation.F90.
|
private |
Read in transition rates to the shared memory window and then broadcast via internode communicator.
Definition at line 1439 of file dm_propagation.F90.
|
private |
Finalize transition rate resources.
Deallocates the k-map, closes the file handle, and frees the memory window.
Definition at line 1468 of file dm_propagation.F90.
|
private |
Map internal k-point indices to the 1D EPW Monkhorst-Pack grid and verify mesh compatibility.
Definition at line 1492 of file dm_propagation.F90.
|
private |
Get the flattened 1D index of the current vector potential on the discrete EPW vector field grid.
Definition at line 1540 of file dm_propagation.F90.
|
private |
Get transition rate from state (k, ibnd) to (kq, jbnd).
Maps k-points and bands to a 1D index in shared memory. Applies Pauli blocking (1-f) by default.
Definition at line 1595 of file dm_propagation.F90.
|
private |
Calculate the Lindblad dissipator matrix using EPW electron-phonon scattering rates.
\[ \begin{aligned} L_{il} &= -\frac{1}{2} \sum_{j, kq} \Gamma_{(i,k) \to (j,kq)} \rho_{il} \ L_{li} &= -\frac{1}{2} \sum_{j, kq} \Gamma_{(i,k) \to (j,kq)} \rho_{li} \ L_{ii} &= \sum_{j, kq} f_{j,kq} \Gamma_{(j,kq) \to (i,k)} \end{aligned} \]
Definition at line 1638 of file dm_propagation.F90.
|
private |
Calculate the total scattering rate (inverse lifetime) for a given state.
\[ \Gamma_{i,k} = \sum_{kq, j} \left( \Gamma_{(i,k) \to (j,kq)} + f_{j,kq} \Gamma^{0}_{(j,kq) \to (i,k)} \right) \]
Definition at line 1688 of file dm_propagation.F90.
|
private |
Calculate in/out scattering rates (Gamma) for a specific state (ik, ibnd).
The scattering rates are defined as:
\[ \Gamma_{out}(i, \mathbf{k}) = \sum_{j, \mathbf{k}_q} W_{i\mathbf{k} \rightarrow j\mathbf{k}_q} (1 - f_{j\mathbf{k}_q}) \]
\[ \Gamma_{in}(i, \mathbf{k}) = \sum_{j, \mathbf{k}_q} W_{j\mathbf{k}_q} \rightarrow i\mathbf{k} (1 - f_{i\mathbf{k}}) f_{j\mathbf{k}_q} \]
Definition at line 1728 of file dm_propagation.F90.
|
private |
Diagonalize the density matrix to update occupations and wavefunctions.
Depending on the basis orthogonality, the routine solves either a standard or a generalized eigenvalue problem:
\[ \begin{aligned} \rho c_k &= \tilde{f}_k c_k \quad &\text{(Orthonormal basis)} \ \rho c_k &= \tilde{f}_k \mathbf{S} c_k \quad &\text{(General basis)} \end{aligned} \]
Where:
Definition at line 1775 of file dm_propagation.F90.
|
private |
Update states directly from diagonalization (no Procrustes).
Reverses LAPACK ascending order ( \( m = N+N_{\mathrm{resd}}+1-j \)):
\[ |\psi^{\mathrm{new}}_j \rangle = \sum_i C_{i, m} |\phi, d \rangle_i, \quad f_j = \tilde{f}_{m} \]
( \(C\): v_mat, \(\tilde{f}\): occ, \(|\phi,d\rangle\): combined basis)
Definition at line 1863 of file dm_propagation.F90.
|
private |
Update states using Procrustes transformation to ensure time continuity.
\[ \begin{aligned} S^{\tilde{\psi},\psi} &= \mathrm{diag}(\sqrt{\tilde{f}}) \left( C_{\mathrm{ad}}^\dagger S^{\phi,\psi} + C_{\mathrm{resd}}^\dagger S^{d,\psi} \right) \mathrm{diag}(\sqrt{f}) \ U^{\mathrm{proj}} &= U V^\dagger \quad \text{(via SVD: } S^{\tilde{\psi},\psi} = U \Sigma V^\dagger \text{)} \ |\Psi^{\mathrm{temp}}_j \rangle &= \sum_{l} \left( \sum_{i} C_{li} \sqrt{\tilde{f}_i} U^{\mathrm{proj}}_{ij} \right) |\phi,d \rangle_l \ f^{\mathrm{new}}_j &= |\Psi^{\mathrm{temp}}_j|^2 \,/\, |\psi_j|^2, \quad |\psi^{\mathrm{new}}_j\rangle = |\Psi^{\mathrm{temp}}_j\rangle \,/\, \sqrt{f^{\mathrm{new}}_j} \end{aligned} \]
( \(\tilde{f}, f\): regularized occ_tilde, stocc; \(C\): v_mat; \(S^{\phi,\psi},
S^{d,\psi}\): overlap_ad/resd_ks)
Definition at line 1927 of file dm_propagation.F90.
|
private |
Check if a matrix is Hermitian.
Definition at line 2038 of file dm_propagation.F90.
|
private |
Average transition rates in shared memory.
Definition at line 193 of file dm_propagation.F90.