Octopus
dm_propagation_oct_m Module Reference

Data Types

type  dmp_t
 Density matrix dissipation. More...
 

Functions/Subroutines

subroutine, public dm_propagation_init_run (adiabatic_st, namespace, space, gr, st, hm, mc)
 Initialise the adiabatic states prior to running TB propagation. More...
 
subroutine dmp_init (this, namespace, st)
 Initialise an instance of density matrix dissipation. More...
 
subroutine, public dm_propagation_run (dmp, namespace, space, gr, ions, st, mc, hm, ks, iter, dt, ext_partners, update_energy)
 Apply dissipation to a TD run via the Linblad formalism. More...
 
subroutine orthogonality_check_ks (ik, st, gr)
 Check orthonality and electron number of TDKS wavefunctions We constructed the density matrix from the TDKS wavefunctions, as. More...
 
subroutine construct_residuals (adiabatic_st, ik, st, gr, conj_psi_phi, resd)
 Construct the residual basis from the TDKS wavefunctions. More...
 
subroutine construct_density_matrix (ik, st, conj_psi_phi, rho_mat)
 Construct the full density matrix in the adiabatic and residual basis. More...
 
subroutine population_in_adiabatic (ik, st, rho_mat, pop)
 Calculate population in adiabatic basis. More...
 
subroutine update_st (dmp, ik, gr, resd, st, rho_mat)
 Diagonalize the density matrix and update the wavefunction and occupation. More...
 
subroutine update_wfc_occ (adiabatic_st, ik, st, gr, resd, rho_mat, occ)
 Transform the wavefunctions into real-space basis The wavefunctions in real-space basis are given by: More...
 
subroutine update_wfc_occ_procrustes (adiabatic_st, ik, st, gr, resd, rho_mat, occ)
 Make TDKS wavefunctions continuous by maximizing their overlap. More...
 
subroutine dissipation (dmp, bst, st, ik, dt, nn)
 Apply dissipation to the density matrix This subroutine applies the dissipation operator to the density matrix using Taylor expansion of the matrix exponential upto order 4. More...
 

Function/Subroutine Documentation

◆ dm_propagation_init_run()

subroutine, public dm_propagation_oct_m::dm_propagation_init_run ( type(states_elec_t), intent(inout)  adiabatic_st,
type(namespace_t), intent(in)  namespace,
type(electron_space_t), intent(in)  space,
type(grid_t), intent(in)  gr,
type(states_elec_t), intent(in)  st,
type(hamiltonian_elec_t), intent(in)  hm,
type(multicomm_t), intent(in)  mc 
)

Initialise the adiabatic states prior to running TB propagation.

Definition at line 190 of file dm_propagation.F90.

◆ dmp_init()

subroutine dm_propagation_oct_m::dmp_init ( class(dmp_t), intent(out)  this,
type(namespace_t), intent(in)  namespace,
type(states_elec_t), intent(in)  st 
)
private

Initialise an instance of density matrix dissipation.

Definition at line 220 of file dm_propagation.F90.

◆ dm_propagation_run()

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 
)

Apply dissipation to a TD run via the Linblad formalism.

Parameters
[in,out]dmpDensity matrix propagation instance
[in]spaceSpin dimension
[in]grUnderlying mesh
[in]ionsGeometry
[in,out]stTime-dependent wfcs
[in]mcMPI communicator
[in,out]hmHamiltonian, updated at each time step
[in,out]ksKohn-Sham potential
[in]iterNumber of iterations
[in]dtTime step
[in]ext_partnersExternal interaction partners
[in]update_energyWhether update energy when solve adabatic wfcs

Definition at line 313 of file dm_propagation.F90.

◆ orthogonality_check_ks()

subroutine dm_propagation_oct_m::orthogonality_check_ks ( integer, intent(in)  ik,
type(states_elec_t), intent(in)  st,
type(grid_t), intent(in)  gr 
)
private

Check orthonality and electron number of TDKS wavefunctions We constructed the density matrix from the TDKS wavefunctions, as.

\[ \rho_{ij} = \langle \psi_i | \left( \sum_l f_l | \psi_l \rangle \langle \psi_l | \right) | \psi_j \rangle \]

where \( f_l \) is the occupation of the state \(l\) at \(k\)-point.

Parameters
[in]ikK-point index
[in]stTime-dependent wfcs
[in]grUnderlying mesh

Definition at line 412 of file dm_propagation.F90.

◆ construct_residuals()

subroutine dm_propagation_oct_m::construct_residuals ( type(states_elec_t), intent(in)  adiabatic_st,
integer, intent(in)  ik,
type(states_elec_t), intent(in)  st,
type(grid_t), intent(in)  gr,
complex(real64), dimension(:, :), intent(out)  conj_psi_phi,
complex(real64), dimension(:, :, :), intent(out)  resd 
)
private

Construct the residual basis from the TDKS wavefunctions.

The residual basis vectors are defined as

\[ | d_n \rangle = | \psi_n \rangle - \sum_{i=1}^{N} | \phi_i \rangle \langle \phi_i | \psi_n \rangle \]

where \( | \psi_n \rangle \) are the TDKS wavefunctions, and \( | \phi_i \rangle \) are the adiabatic states.

The resulting residuals \( | d_n \rangle \) are stored in resd, a 3D array with shape (np, dim, nst).

Parameters
[in]adiabatic_stAdiabatic basis
[in]ikK-point index
[in]stTime-dependent wfcs
[in]grUnderlying mesh
[out]conj_psi_phi(i, j) = <\phi, d_j | \psi_i >
[out]resdResiduals

Definition at line 481 of file dm_propagation.F90.

◆ construct_density_matrix()

subroutine dm_propagation_oct_m::construct_density_matrix ( integer, intent(in)  ik,
type(states_elec_t), intent(in)  st,
complex(real64), dimension(:, :), intent(in)  conj_psi_phi,
complex(real64), dimension(:, :), intent(out)  rho_mat 
)
private

Construct the full density matrix in the adiabatic and residual basis.

The density matrix elements in the combined basis are given by

\[ \rho_{ij} = \langle \chi_i | \left( \sum_l f_l\, | \psi_l \rangle \langle \psi_l | \right) | \chi_j \rangle \]

where \( \{ \chi_i \} = \{ \phi_1, \dots, \phi_N, d_1, \dots, d_N \} \) is the complete basis, consisting of adiabatic states \( \phi_i \) and residuals \( d_i \), and \( f_l \) is the occupation of state \( \psi_l \).

Parameters
[in]ikk-point index
[in]stTime-dependent wfcs
[in]conj_psi_phi(i, j) = <\phi, d_j | \psi_i >
[out]rho_matThe full density matrix

Definition at line 543 of file dm_propagation.F90.

◆ population_in_adiabatic()

subroutine dm_propagation_oct_m::population_in_adiabatic ( integer, intent(in)  ik,
type(states_elec_t), intent(in)  st,
complex(real64), dimension(:, :), intent(in)  rho_mat,
real(real64), intent(inout)  pop 
)
private

Calculate population in adiabatic basis.

Number of electrons in the adiabatic basis is

\[ pop = \sum_{i,k} \rho_{ii} w_k \]

Parameters
[in]ikK-point index
[in]stTime-dependent wfcs
[in]rho_matThe full density matrix
[in,out]popPopulation in the adiabatic basis

Definition at line 577 of file dm_propagation.F90.

◆ update_st()

subroutine dm_propagation_oct_m::update_st ( type(dmp_t), intent(in)  dmp,
integer, intent(in)  ik,
type(grid_t), intent(in)  gr,
complex(real64), dimension(:, :, :), intent(in)  resd,
type(states_elec_t), intent(inout)  st,
complex(real64), dimension(:, :), intent(inout)  rho_mat 
)
private

Diagonalize the density matrix and update the wavefunction and occupation.

This routine solves the generalized eigenvalue problem:

\[ \rho \psi = \lambda B \psi, \]

where \( \rho \) is the density matrix, \( B \) is the overlap matrix, and \( \psi \) are the wavefunctions.

Definition at line 608 of file dm_propagation.F90.

◆ update_wfc_occ()

subroutine dm_propagation_oct_m::update_wfc_occ ( type(states_elec_t), intent(in)  adiabatic_st,
integer, intent(in)  ik,
type(states_elec_t), intent(inout)  st,
type(grid_t), intent(in)  gr,
complex(real64), dimension(:, :, :), intent(in)  resd,
complex(real64), dimension(:, :), intent(in)  rho_mat,
real(real64), dimension(1:2*st%nst), intent(in)  occ 
)
private

Transform the wavefunctions into real-space basis The wavefunctions in real-space basis are given by:

\[ \psi = \sum_{i=1}^{N} c_i \phi_i + c_{i+N} \, \mathrm{resd}_i, \]

where \( \phi_i \) are the adiabatic states and \( \mathrm{resd}_i \) are the residual basis vectors.

Definition at line 685 of file dm_propagation.F90.

◆ update_wfc_occ_procrustes()

subroutine dm_propagation_oct_m::update_wfc_occ_procrustes ( type(states_elec_t), intent(in)  adiabatic_st,
integer, intent(in)  ik,
type(states_elec_t), intent(inout)  st,
type(grid_t), intent(in)  gr,
complex(real64), dimension(:, :, :), intent(in)  resd,
complex(real64), dimension(:, :), intent(in)  rho_mat,
real(real64), dimension(1:2*st%nst), intent(in)  occ 
)
private

Make TDKS wavefunctions continuous by maximizing their overlap.

Applies a unitary transformation to \( \tilde{\Psi} \) such that the overlap with the input wavefunctions is maximized.

The resulting wavefunctions \( \psi_i \) are given by:

\[ \psi_i = \sum_{j=1}^{2N} \tilde{\psi}_j \, (U_{\mathrm{proj}})_{j i} = \sum_{j=1}^{2N} \sum_{l=1}^{2N} \chi_l \, (\rho_{\mathrm{mat}})_{l j} \, (U_{\mathrm{proj}})_{j i} \]

where \( U_{\mathrm{proj}} = U V^{\mathrm{T}} \), and \( U \) and \( V \) are obtained from the singular value decomposition (SVD) of the overlap matrix \( S \):

\[ S = U \Sigma V^{\mathrm{T}} \]

Here, \( \rho_{\mathrm{mat}} \) contains the eigenvectors of the density matrix, and \( \{ \chi_i \} = \{ \phi_1, \dots, \phi_N, d_1, \dots, d_N \} \) is the complete basis.

The occupation associated with state \( \psi_i \) is given by \( |\psi|^2 \), where:

\[ \psi = \sum_{j=1}^{2N} \sum_{l=1}^{2N} \chi_l \, (\rho_{\mathrm{mat}})_{l j} \, \sqrt{\mathrm{occ}_j} \, (U_{\mathrm{proj}})_{j i} \]

Definition at line 756 of file dm_propagation.F90.

◆ dissipation()

subroutine dm_propagation_oct_m::dissipation ( type(dmp_t), intent(in)  dmp,
type(states_elec_t), intent(in)  bst,
type(states_elec_t), intent(in)  st,
integer, intent(in)  ik,
real(real64), intent(in)  dt,
complex(real64), dimension(:,:), intent(inout)  nn 
)
private

Apply dissipation to the density matrix This subroutine applies the dissipation operator to the density matrix using Taylor expansion of the matrix exponential upto order 4.

Note
The following equation is relevant to the implementation:

\[ \overrightarrow{D}^{\mathrm{inter}}_{ab;cd} = \sum_{k=1}^{k_{\mathrm{max}}}\sum_{\substack{m,n = 0 \\ m \neq n}}^{N-1}\ & \gamma^{m \to n}_{k}\Bigg( \delta_{c,(m;k)}\ \delta_{(n;k),a} \ \delta_{b,(n;k)}\ \delta_{(m;k),d}- \frac{1}{2}\big[ & \delta_{c,a}\ \delta_{b,(m;k)}\ \Delta_{l_1}\ \delta_{(m;k),d}+ \delta_{b,d}\ \\ & \delta_{c,(m;k)}\ \Delta_{l_1}\delta_{(m;k),a}\big]\Bigg) \]

where \( \overrightarrow{D}^{\mathrm{inter}}\) is the interband dissipator using vectorized Lindblad formalism, \( \gamma^{m \to n}_{k}\) is the damping factor for the transition from band \(m\) to band \(n\) at $\f k
Parameters
[in]dmpDensity matrix propagation instance
[in]bstAdiabatic basis
[in]stTime-dependent wfcs
[in]ikK-point index
[in]dtTime step
[in,out]nnDensity matrix

Definition at line 867 of file dm_propagation.F90.