SIRIUS 7.5.0
Electronic structure library and applications
|
Representation of Kohn-Sham Hamiltonian. More...
Public Member Functions | |
Hamiltonian_k (Hamiltonian0< T > const &H0__, K_point< T > &kp__) | |
Hamiltonian_k (Hamiltonian_k< T > &&src__) | |
Hamiltonian0< T > const & | H0 () const |
template<typename F , int what> | |
std::pair< sddk::mdarray< T, 2 >, sddk::mdarray< T, 2 > > | get_h_o_diag_pw () const |
template<int what> | |
std::pair< sddk::mdarray< T, 2 >, sddk::mdarray< T, 2 > > | get_h_o_diag_lapw () const |
auto | U () const -> U_operator< T > const & |
void | apply_fv_h_o (bool apw_only__, bool phi_is_lo__, wf::band_range b__, wf::Wave_functions< T > &phi__, wf::Wave_functions< T > *hphi__, wf::Wave_functions< T > *ophi__) const |
Apply first-variational LAPW Hamiltonian and overlap matrices. More... | |
void | set_fv_h_o (la::dmatrix< std::complex< T > > &h__, la::dmatrix< std::complex< T > > &o__) const |
Setup the Hamiltonian and overlap matrices in APW+lo basis. More... | |
void | set_fv_h_o_it (la::dmatrix< std::complex< T > > &h__, la::dmatrix< std::complex< T > > &o__) const |
Add interstitial contribution to apw-apw block of Hamiltonian and overlap. More... | |
void | set_fv_h_o_lo_lo (la::dmatrix< std::complex< T > > &h__, la::dmatrix< std::complex< T > > &o__) const |
Setup lo-lo block of Hamiltonian and overlap matrices. More... | |
void | set_fv_h_o_apw_lo (Atom const &atom, int ia, sddk::mdarray< std::complex< T >, 2 > &alm_row, sddk::mdarray< std::complex< T >, 2 > &alm_col, sddk::mdarray< std::complex< T >, 2 > &h, sddk::mdarray< std::complex< T >, 2 > &o) const |
Setup apw-lo and lo-apw blocks of LAPW Hamiltonian and overlap matrices. More... | |
template<typename F > | |
std::enable_if_t< std::is_same< T, real_type< F > >::value, void > | apply_h_s (wf::spin_range spins__, wf::band_range br__, wf::Wave_functions< T > const &phi__, wf::Wave_functions< T > *hphi__, wf::Wave_functions< T > *sphi__) const |
Apply pseudopotential H and S operators to the wavefunctions. More... | |
template<typename F > | |
std::enable_if_t<!std::is_same< T, real_type< F > >::value, void > | apply_h_s (wf::spin_range spins__, wf::band_range br__, wf::Wave_functions< T > const &phi__, wf::Wave_functions< T > *hphi__, wf::Wave_functions< T > *sphi__) const |
template<typename F > | |
std::enable_if_t< std::is_same< T, real_type< F > >::value, void > | apply_s (wf::spin_range spin__, wf::band_range br__, wf::Wave_functions< T > const &phi__, wf::Wave_functions< T > &sphi__) const |
apply S operator More... | |
void | apply_b (wf::Wave_functions< T > &psi__, std::vector< wf::Wave_functions< T > > &bpsi__) const |
Apply magnetic field to first-variational LAPW wave-functions. More... | |
Private Member Functions | |
Hamiltonian_k (Hamiltonian_k< T > const &src__)=delete | |
Copy constructor is forbidden. | |
Hamiltonian_k< T > & | operator= (Hamiltonian_k< T > const &src__)=delete |
Assignment operator is forbidden. | |
Private Attributes | |
Hamiltonian0< T > const & | H0_ |
K-point independent part of Hamiltonian. More... | |
K_point< T > & | kp_ |
std::shared_ptr< U_operator< T > > | u_op_ |
Hubbard correction. More... | |
Representation of Kohn-Sham Hamiltonian.
In general, Hamiltonian consists of kinetic term, local part of potential and non-local part of potential:
\[ H = -\frac{1}{2} \nabla^2 + V_{loc}({\bf r}) + \sum_{\alpha} \sum_{\xi \xi'} |\beta_{\xi}^{\alpha} \rangle D_{\xi \xi'}^{\alpha} \langle \beta_{\xi'}^{\alpha}| \]
Definition at line 174 of file hamiltonian.hpp.
sirius::Hamiltonian_k< T >::Hamiltonian_k | ( | Hamiltonian0< T > const & | H0__, |
K_point< T > & | kp__ | ||
) |
Definition at line 40 of file hamiltonian_k.cpp.
sirius::Hamiltonian_k< T >::~Hamiltonian_k |
Definition at line 60 of file hamiltonian_k.cpp.
|
inline |
Definition at line 197 of file hamiltonian.hpp.
template std::pair< sddk::mdarray< double, 2 >, sddk::mdarray< double, 2 > > sirius::Hamiltonian_k< T >::get_h_o_diag_pw< std::complex< double >, 3 > | ( | ) | const |
Definition at line 78 of file hamiltonian_k.cpp.
template std::pair< sddk::mdarray< double, 2 >, sddk::mdarray< double, 2 > > sirius::Hamiltonian_k< T >::get_h_o_diag_lapw< 3 > | ( | ) | const |
Definition at line 201 of file hamiltonian_k.cpp.
|
inline |
Definition at line 208 of file hamiltonian.hpp.
void sirius::Hamiltonian_k< T >::apply_fv_h_o | ( | bool | apw_only__, |
bool | phi_is_lo__, | ||
wf::band_range | b__, | ||
wf::Wave_functions< T > & | phi__, | ||
wf::Wave_functions< T > * | hphi__, | ||
wf::Wave_functions< T > * | ophi__ | ||
) | const |
Apply first-variational LAPW Hamiltonian and overlap matrices.
Check the documentation of Hamiltonain::set_fv_h_o() for the expressions of Hamiltonian and overlap matrices and Basis functions for Kohn-Sham wave-functions expansion for the definition of the LAPW+lo basis.
For the set of wave-functions expanded in LAPW+lo basis (k-point index is dropped for simplicity)
\[ \psi_{i} = \sum_{\mu} \phi_{\mu} C_{\mu i} \]
where \( \mu = \{ {\bf G}, j \} \) is a combined index of LAPW and local orbitals we want to contrusct a subspace Hamiltonian and overlap matrices:
\[ H_{i' i} = \langle \psi_{i'} | \hat H | \psi_i \rangle = \sum_{\mu' \mu} C_{\mu' i'}^{*} \langle \phi_{\mu'} | \hat H | \phi_{\mu} \rangle C_{\mu i} = \sum_{\mu'} C_{\mu' i'}^{*} h_{\mu' i}(\psi) \]
\[ O_{i' i} = \langle \psi_{i'} | \psi_i \rangle = \sum_{\mu' \mu} C_{\mu' i'}^{*} \langle \phi_{\mu'} | \phi_{\mu} \rangle C_{\mu i} = \sum_{\mu'} C_{\mu' i'}^{*} o_{\mu' i}(\psi) \]
where
\[ h_{\mu' i}(\psi) = \sum_{\mu} \langle \phi_{\mu'} | \hat H | \phi_{\mu} \rangle C_{\mu i} \]
and
\[ o_{\mu' i}(\psi) = \sum_{\mu} \langle \phi_{\mu'} | \phi_{\mu} \rangle C_{\mu i} \]
For the APW block of \( h_{\mu' i}(\psi) \) and \( o_{\mu' i}(\psi) \) we have:
\[ h_{{\bf G'} i}(\psi) = \sum_{{\bf G}} \langle \phi_{\bf G'} | \hat H | \phi_{\bf G} \rangle C_{{\bf G} i} + \sum_{j} \langle \phi_{\bf G'} | \hat H | \phi_{j} \rangle C_{j i} \]
\[ o_{{\bf G'} i}(\psi) = \sum_{{\bf G}} \langle \phi_{\bf G'} | \phi_{\bf G} \rangle C_{{\bf G} i} + \sum_{j} \langle \phi_{\bf G'} | \phi_{j} \rangle C_{j i} \]
and for the lo block:
\[ h_{j' i}(\psi) = \sum_{{\bf G}} \langle \phi_{j'} | \hat H | \phi_{\bf G} \rangle C_{{\bf G} i} + \sum_{j} \langle \phi_{j'} | \hat H | \phi_{j} \rangle C_{j i} \]
\[ o_{j' i}(\psi) = \sum_{{\bf G}} \langle \phi_{j'} | \phi_{\bf G} \rangle C_{{\bf G} i} + \sum_{j} \langle \phi_{j'} | \phi_{j} \rangle C_{j i} \]
APW-APW contribution, muffin-tin part:
\[ h_{{\bf G'} i}(\psi) = \sum_{{\bf G}} \langle \phi_{\bf G'} | \hat H | \phi_{\bf G} \rangle C_{{\bf G} i} = \sum_{{\bf G}} \sum_{\alpha} \sum_{\xi'} a_{\xi'}^{\alpha *}({\bf G'}) b_{\xi'}^{\alpha}({\bf G}) C_{{\bf G} i} \]
\[ o_{{\bf G'} i}(\psi) = \sum_{{\bf G}} \langle \phi_{\bf G'} | \phi_{\bf G} \rangle C_{{\bf G} i} = \sum_{{\bf G}} \sum_{\alpha} \sum_{\xi'} a_{\xi'}^{\alpha *}({\bf G'}) a_{\xi'}^{\alpha}({\bf G}) C_{{\bf G} i} \]
APW-APW contribution, interstitial effective potential part:
\[ h_{{\bf G'} i}(\psi) = \int \Theta({\bf r}) e^{-i{\bf G'}{\bf r}} V({\bf r}) \psi_{i}({\bf r}) d{\bf r} \]
This is done by transforming \( \psi_i({\bf G}) \) to the real space, multiplying by effectvive potential and step function and transforming the result back to the \( {\bf G} \) domain.
APW-APW contribution, interstitial kinetic energy part:
\[ h_{{\bf G'} i}(\psi) = \int \Theta({\bf r}) e^{-i{\bf G'}{\bf r}} \Big( -\frac{1}{2} \nabla \Big) \Big( \nabla \psi_{i}({\bf r}) \Big) d{\bf r} \]
and the gradient of the wave-function is computed with FFT as:
\[ \Big( \nabla \psi_{i}({\bf r}) \Big) = \sum_{\bf G} i{\bf G}e^{i{\bf G}{\bf r}}\psi_i({\bf G}) \]
APW-APW contribution, interstitial overlap:
\[ o_{{\bf G'} i}(\psi) = \int \Theta({\bf r}) e^{-i{\bf G'}{\bf r}} \psi_{i}({\bf r}) d{\bf r} \]
APW-lo contribution:
\[ h_{{\bf G'} i}(\psi) = \sum_{j} \langle \phi_{\bf G'} | \hat H | \phi_{j} \rangle C_{j i} = \sum_{j} C_{j i} \sum_{L'\nu'} a_{L'\nu'}^{\alpha_j *}({\bf G'}) \langle u_{\ell' \nu'}^{\alpha_j}Y_{\ell' m'}|\hat h^{\alpha_j} | \phi_{\ell_j}^{\zeta_j \alpha_j} Y_{\ell_j m_j} \rangle = \sum_{j} C_{j i} \sum_{\xi'} a_{\xi'}^{\alpha_j *}({\bf G'}) h_{\xi' \xi_j}^{\alpha_j} \]
\[ o_{{\bf G'} i}(\psi) = \sum_{j} \langle \phi_{\bf G'} | \phi_{j} \rangle C_{j i} = \sum_{j} C_{j i} \sum_{L'\nu'} a_{L'\nu'}^{\alpha_j *}({\bf G'}) \langle u_{\ell' \nu'}^{\alpha_j}Y_{\ell' m'}| \phi_{\ell_j}^{\zeta_j \alpha_j} Y_{\ell_j m_j} \rangle = \sum_{j} C_{j i} \sum_{\nu'} a_{\ell_j m_j \nu'}^{\alpha_j *}({\bf G'}) o_{\nu' \zeta_j \ell_j}^{\alpha_j} \]
lo-APW contribution:
\[ h_{j' i}(\psi) = \sum_{\bf G} \langle \phi_{j'} | \hat H | \phi_{\bf G} \rangle C_{{\bf G} i} = \sum_{\bf G} C_{{\bf G} i} \sum_{L\nu} \langle \phi_{\ell_{j'}}^{\zeta_{j'} \alpha_{j'}} Y_{\ell_{j'} m_{j'}} |\hat h^{\alpha_{j'}} | u_{\ell \nu}^{\alpha_{j'}}Y_{\ell m} \rangle a_{L\nu}^{\alpha_{j'}}({\bf G}) = \sum_{\bf G} C_{{\bf G} i} \sum_{\xi} h_{\xi_{j'} \xi}^{\alpha_{j'}} a_{\xi}^{\alpha_{j'}}({\bf G}) \]
\[ o_{j' i}(\psi) = \sum_{\bf G} \langle \phi_{j'} | \phi_{\bf G} \rangle C_{{\bf G} i} = \sum_{\bf G} C_{{\bf G} i} \sum_{L\nu} \langle \phi_{\ell_{j'}}^{\zeta_{j'} \alpha_{j'}} Y_{\ell_{j'} m_{j'}} | u_{\ell \nu}^{\alpha_{j'}}Y_{\ell m} \rangle a_{L\nu}^{\alpha_{j'}}({\bf G}) = \sum_{\bf G} C_{{\bf G} i} \sum_{\nu} o_{\zeta_{j'} \nu \ell_{j'}}^{\alpha_{j'}} a_{\ell_{j'} m_{j'} \nu}^{\alpha_{j'}}({\bf G}) \]
lo-lo contribution:
\[ h_{j' i}(\psi) = \sum_{j} \langle \phi_{j'} | \hat H | \phi_{j} \rangle C_{j i} = \sum_{j} C_{j i} h_{\xi_{j'} \xi_j}^{\alpha_j} \delta_{\alpha_j \alpha_{j'}} \]
\[ o_{j' i}(\psi) = \sum_{j} \langle \phi_{j'} | \phi_{j} \rangle C_{j i} = \sum_{j} C_{j i} o_{\zeta_{j'} \zeta_{j} \ell_j}^{\alpha_j} \delta_{\alpha_j \alpha_{j'}} \delta_{\ell_j \ell_{j'}} \delta_{m_j m_{j'}} \]
[in] | apw_only | True if only APW-APW block of H and O are applied. |
[in] | phi_is_lo | True if input wave-functions are pure local orbitals. |
[in] | b | Range of bands. |
[in] | phi | Input wave-functions. |
[out] | hphi | Result of Hamiltonian, applied to wave-functions. |
[out] | ophi | Result of overlap operator, applied to wave-functions. |
Definition at line 774 of file hamiltonian_k.cpp.
void sirius::Hamiltonian_k< T >::set_fv_h_o | ( | la::dmatrix< std::complex< T > > & | h__, |
la::dmatrix< std::complex< T > > & | o__ | ||
) | const |
Setup the Hamiltonian and overlap matrices in APW+lo basis.
The Hamiltonian matrix has the following expression:
\[ H_{\mu' \mu}=\langle \varphi_{\mu' } | \hat H | \varphi_{\mu } \rangle = \left( \begin{array}{cc} H_{\bf G'G} & H_{{\bf G'}j} \\ H_{j'{\bf G}} & H_{j'j} \end{array} \right) \]
APW-APW block:
\begin{eqnarray*} H_{{\bf G'} {\bf G}}^{\bf k} &=& \sum_{\alpha} \sum_{L'\nu', L\nu} a_{L'\nu'}^{\alpha *}({\bf G'+k}) \langle u_{\ell' \nu'}^{\alpha}Y_{\ell' m'}|\hat h^{\alpha} | u_{\ell \nu}^{\alpha}Y_{\ell m} \rangle a_{L\nu}^{\alpha}({\bf G+k}) + \frac{1}{2}{\bf G'} {\bf G} \cdot \Theta({\bf G - G'}) + \tilde V_{eff}({\bf G - G'}) \\ &=& \sum_{\alpha} \sum_{\xi' } a_{\xi'}^{\alpha *}({\bf G'+k}) b_{\xi'}^{\alpha}({\bf G+k}) + \frac{1}{2}{\bf G'} {\bf G} \cdot \Theta({\bf G - G'}) + \tilde V_{eff}({\bf G - G'}) \end{eqnarray*}
APW-lo block:
\[ H_{{\bf G'} j}^{\bf k} = \sum_{L'\nu'} a_{L'\nu'}^{\alpha_j *}({\bf G'+k}) \langle u_{\ell' \nu'}^{\alpha_j}Y_{\ell' m'}|\hat h^{\alpha_j} | \phi_{\ell_j}^{\zeta_j \alpha_j} Y_{\ell_j m_j} \rangle \]
lo-APW block:
\[ H_{j' {\bf G}}^{\bf k} = \sum_{L\nu} \langle \phi_{\ell_{j'}}^{\zeta_{j'} \alpha_{j'}} Y_{\ell_{j'} m_{j'}} |\hat h^{\alpha_{j'}} | u_{\ell \nu}^{\alpha_{j'}}Y_{\ell m} \rangle a_{L\nu}^{\alpha_{j'}}({\bf G+k}) \]
lo-lo block:
\[ H_{j' j}^{\bf k} = \langle \phi_{\ell_{j'}}^{\zeta_{j'} \alpha_{j'}} Y_{\ell_{j'} m_{j'}} |\hat h^{\alpha_{j}} | \phi_{\ell_j}^{\zeta_j \alpha_j} Y_{\ell_j m_j} \rangle \delta_{\alpha_j \alpha_{j'}} \]
The overlap matrix has the following expression:
\[ O_{\mu' \mu} = \langle \varphi_{\mu'} | \varphi_{\mu} \rangle \]
APW-APW block:
\[ O_{{\bf G'} {\bf G}}^{\bf k} = \sum_{\alpha} \sum_{L\nu} a_{L\nu}^{\alpha *}({\bf G'+k}) a_{L\nu}^{\alpha}({\bf G+k}) + \Theta({\bf G-G'}) \]
APW-lo block:
\[ O_{{\bf G'} j}^{\bf k} = \sum_{\nu'} a_{\ell_j m_j \nu'}^{\alpha_j *}({\bf G'+k}) \langle u_{\ell_j \nu'}^{\alpha_j} | \phi_{\ell_j}^{\zeta_j \alpha_j} \rangle \]
lo-APW block:
\[ O_{j' {\bf G}}^{\bf k} = \sum_{\nu'} \langle \phi_{\ell_{j'}}^{\zeta_{j'} \alpha_{j'}} | u_{\ell_{j'} \nu'}^{\alpha_{j'}} \rangle a_{\ell_{j'} m_{j'} \nu'}^{\alpha_{j'}}({\bf G+k}) \]
lo-lo block:
\[ O_{j' j}^{\bf k} = \langle \phi_{\ell_{j'}}^{\zeta_{j'} \alpha_{j'}} | \phi_{\ell_{j}}^{\zeta_{j} \alpha_{j}} \rangle \delta_{\alpha_{j'} \alpha_j} \delta_{\ell_{j'} \ell_j} \delta_{m_{j'} m_j} \]
Definition at line 310 of file hamiltonian_k.cpp.
void sirius::Hamiltonian_k< T >::set_fv_h_o_it | ( | la::dmatrix< std::complex< T > > & | h__, |
la::dmatrix< std::complex< T > > & | o__ | ||
) | const |
Add interstitial contribution to apw-apw block of Hamiltonian and overlap.
Definition at line 661 of file hamiltonian_k.cpp.
void sirius::Hamiltonian_k< T >::set_fv_h_o_lo_lo | ( | la::dmatrix< std::complex< T > > & | h__, |
la::dmatrix< std::complex< T > > & | o__ | ||
) | const |
Setup lo-lo block of Hamiltonian and overlap matrices.
Definition at line 617 of file hamiltonian_k.cpp.
void sirius::Hamiltonian_k< T >::set_fv_h_o_apw_lo | ( | Atom const & | atom, |
int | ia, | ||
sddk::mdarray< std::complex< T >, 2 > & | alm_row, | ||
sddk::mdarray< std::complex< T >, 2 > & | alm_col, | ||
sddk::mdarray< std::complex< T >, 2 > & | h, | ||
sddk::mdarray< std::complex< T >, 2 > & | o | ||
) | const |
Setup apw-lo and lo-apw blocks of LAPW Hamiltonian and overlap matrices.
Definition at line 525 of file hamiltonian_k.cpp.
|
inline |
Apply pseudopotential H and S operators to the wavefunctions.
F | Type of the subspace matrix. |
[in] | spins | Range of spins. |
[in] | br | Range of bands. |
[in] | phi | Input wave-functions [storage: CPU && GPU]. |
[out] | hphi | Result of Hamiltonian, applied to wave-functions [storage: CPU || GPU]. |
[out] | sphi | Result of S-operator, applied to wave-functions [storage: CPU || GPU]. |
In non-collinear case (spins in [0,1]) the Hamiltonian and S operator are applied to both components of spinor wave-functions. Otherwise they are applied to a single component.
Definition at line 439 of file hamiltonian.hpp.
|
inline |
Definition at line 498 of file hamiltonian.hpp.
|
inline |
apply S operator
F | Type of the subspace matrix. |
[in] | spins | Range of spins. |
[in] | br | Range of bands. |
[in] | phi | Input wave-functions [storage: CPU && GPU]. |
[out] | sphi | Result of S-operator, applied to wave-functions [storage: CPU || GPU]. |
In non-collinear case (spins in [0,1]) the S operator is applied to both components of spinor wave-functions. Otherwise they are applied to a single component.
Definition at line 516 of file hamiltonian.hpp.
void sirius::Hamiltonian_k< T >::apply_b | ( | wf::Wave_functions< T > & | psi__, |
std::vector< wf::Wave_functions< T > > & | bpsi__ | ||
) | const |
Apply magnetic field to first-variational LAPW wave-functions.
Definition at line 1396 of file hamiltonian_k.cpp.
|
private |
K-point independent part of Hamiltonian.
Definition at line 178 of file hamiltonian.hpp.
|
private |
Definition at line 179 of file hamiltonian.hpp.
|
private |
Hubbard correction.
In general case it is a k-dependent matrix
Definition at line 182 of file hamiltonian.hpp.