|
| | Z_vector_UL (const std::string &xc_kernel, const int &nspin, const int &naos, const std::vector< int > &nocc, const std::vector< int > &nvirt, const UnitCell &ucell, const std::vector< double > &orb_cutoff, const Grid_Driver &gd, const psi::Psi< T > &psi_ks, const ModuleBase::matrix &eig_ks, std::weak_ptr< PotLRBase > pot_hxc_gs, const K_Vectors &kv, const std::vector< Parallel_Blkcyclic > &pX, const Parallel_Blkcyclic &pc, const Parallel_Orbitals &pmat, const std::string &dft_functional, const int nk, const int local_dimension, const int global_dimension) |
| | ZeqULR (const std::vector< int > &nocc_in, const std::vector< int > &nvirt_in, const std::vector< Parallel_Blkcyclic > &pX_in, const int nk_in, const int local_dimension, const int global_dimension) |
| virtual | ~ZeqULR () |
| void | hPsi (const T *const psi_in, T *const hpsi, const int ld_psi, const int nband) |
| void | hPsi (const T *psi_in, T *hpsi, const int ld_psi, const int nband, const std::vector< std::vector< ct::Tensor > > &window_density) |
| std::vector< T > | matrix () |
| | The full (replicated) matrix, column by column. Only used by the LAPACK solver.
|
|
| void | set_dm (const int is, const T *const X, const std::vector< ct::Tensor > *density_add) override |
| | rebuild the density matrices the operators read, from the is block of X
|
| void | apply (const T *const psi_in, T *const hpsi, const int ld_psi, const int nband, const std::vector< std::vector< ct::Tensor > > *window_density) |
| virtual void | band_extra (const T *const X, T *const out) const |
| | optional per-band contribution that does not fit the 2x2 block structure. NOTE matrix() deliberately does NOT call this: it exists for the right-hand side, which is not a linear operator, while matrix() is only ever used for the LHS.
|
template<typename
T>
class LR::Z_vector_UL< T >
Open-shell (spin-unrestricted) counterpart of Z_vector_L.
Left-hand side of the Z-vector equation: the orbital Hessian built with the GROUND-STATE kernel, $H_{ai\sigma}[D^Z]+Z_{ai\sigma}(\epsilon_{a\sigma}-\epsilon_{i\sigma})$.
Factor 2.0 on the Hxc blocks (the closed-shell Z_vector_L uses 4.0): there pot_hxc_gs is S2_gs = S2_singlet/2, so recovering $H^S=2K^S=4\cdot$pot needs 4. Here pot_hxc_gs is S2_updown, which IS one $K_{\sigma\sigma'}$ component with no halving, so only the $H=2K$ factor remains. The spin sum $\sum_{\sigma'}$ that the singlet combination had baked in is now done by the block loop in ZeqULR::hPsi.