|
| Onsite_Proj_tools (const pseudopot_cell_vnl *nlpp_in, const UnitCell *ucell_in, const psi::Psi< std::complex< FPTYPE >, Device > *psi_in, const K_Vectors *kv_in, const ModulePW::PW_Basis_K *wfc_basis_in, const Structure_Factor *sf_in, const ModuleBase::matrix &wg, const ModuleBase::matrix &ekb) |
|
| Onsite_Proj_tools (const std::vector< int > &nproj, const std::vector< int > &lproj, const ModuleBase::realArray &tab, const ModuleBase::matrix &nhtol, std::complex< FPTYPE > *vkb_buf, const UnitCell *ucell_in, const psi::Psi< std::complex< FPTYPE >, Device > *psi_in, const K_Vectors *kv_in, const ModulePW::PW_Basis_K *wfc_basis_in, const Structure_Factor *sf_in, const ModuleBase::matrix &wg, const ModuleBase::matrix &ekb) |
|
| ~Onsite_Proj_tools () |
|
void | cal_becp (int ik, int npm, std::complex< FPTYPE > *becp_in=nullptr, const std::complex< FPTYPE > *ppsi_in=nullptr) |
| calculate the becp = <psi|beta> for all beta functions
|
|
void | cal_dbecp_s (int ik, int npm, int ipol, int jpol) |
| calculate the dbecp_{ij} = <psi|\partial beta/\partial varepsilon_{ij}> for all beta functions stress_{ij} = -1/omega \sum_{n,k}f_{nk} \sum_I \sum_{lm,l'm'}D_{l,l'}^{I} becp * dbecp_{ij} also calculated
|
|
void | cal_dbecp_f (int ik, int npm, int ipol) |
| calculate the dbecp_i = <psi|\partial beta/\partial \tau^I_i> for all beta functions
|
|
void | cal_force_dftu (int ik, int npm, FPTYPE *force, const int *orbital_corr, const std::complex< FPTYPE > *vu, const int size_vu, const FPTYPE *h_wg) |
|
void | cal_force_dspin (int ik, int npm, FPTYPE *force, const ModuleBase::Vector3< double > *lambda, const FPTYPE *h_wg) |
|
void | cal_stress_dftu (int ik, int npm, FPTYPE *stress, const int *orbital_corr, const std::complex< FPTYPE > *vu, const int size_vu, const FPTYPE *h_wg) |
|
void | cal_stress_dspin (int ik, int npm, FPTYPE *stress, const ModuleBase::Vector3< double > *lambda, const FPTYPE *h_wg) |
|
std::complex< FPTYPE > * | get_becp () |
|
std::complex< FPTYPE > * | get_dbecp () |
|
|
using | gemm_op = ModuleBase::gemm_op< std::complex< FPTYPE >, Device > |
| rename the operators for CPU/GPU device
|
|
using | cal_stress_nl_op = hamilt::cal_stress_nl_op< FPTYPE, Device > |
|
using | cal_dbecp_noevc_nl_op = hamilt::cal_dbecp_noevc_nl_op< FPTYPE, Device > |
|
using | resmem_complex_op = base_device::memory::resize_memory_op< std::complex< FPTYPE >, Device > |
|
using | resmem_complex_h_op = base_device::memory::resize_memory_op< std::complex< FPTYPE >, base_device::DEVICE_CPU > |
|
using | setmem_complex_op = base_device::memory::set_memory_op< std::complex< FPTYPE >, Device > |
|
using | delmem_complex_op = base_device::memory::delete_memory_op< std::complex< FPTYPE >, Device > |
|
using | delmem_complex_h_op = base_device::memory::delete_memory_op< std::complex< FPTYPE >, base_device::DEVICE_CPU > |
|
using | syncmem_complex_h2d_op = base_device::memory::synchronize_memory_op< std::complex< FPTYPE >, Device, base_device::DEVICE_CPU > |
|
using | syncmem_complex_d2h_op = base_device::memory::synchronize_memory_op< std::complex< FPTYPE >, base_device::DEVICE_CPU, Device > |
|
using | resmem_var_op = base_device::memory::resize_memory_op< FPTYPE, Device > |
|
using | resmem_var_h_op = base_device::memory::resize_memory_op< FPTYPE, base_device::DEVICE_CPU > |
|
using | setmem_var_op = base_device::memory::set_memory_op< FPTYPE, Device > |
|
using | delmem_var_op = base_device::memory::delete_memory_op< FPTYPE, Device > |
|
using | delmem_var_h_op = base_device::memory::delete_memory_op< FPTYPE, base_device::DEVICE_CPU > |
|
using | syncmem_var_h2d_op = base_device::memory::synchronize_memory_op< FPTYPE, Device, base_device::DEVICE_CPU > |
|
using | syncmem_var_d2h_op = base_device::memory::synchronize_memory_op< FPTYPE, base_device::DEVICE_CPU, Device > |
|
using | resmem_int_op = base_device::memory::resize_memory_op< int, Device > |
|
using | delmem_int_op = base_device::memory::delete_memory_op< int, Device > |
|
using | syncmem_int_h2d_op = base_device::memory::synchronize_memory_op< int, Device, base_device::DEVICE_CPU > |
|
using | cal_vq_op = hamilt::cal_vq_op< FPTYPE, Device > |
|
using | cal_vq_deri_op = hamilt::cal_vq_deri_op< FPTYPE, Device > |
|
using | cal_vkb_op = hamilt::cal_vkb_op< FPTYPE, Device > |
|
using | cal_vkb_deri_op = hamilt::cal_vkb_deri_op< FPTYPE, Device > |
|
|
void | allocate_memory (const ModuleBase::matrix &wg, const ModuleBase::matrix &ekb, const std::vector< int > &nproj, const std::vector< int > &nch) |
| allocate the memory for the variables
|
|
void | delete_memory () |
| delete the memory for the variables
|
|
void | transfer_gcar (int npw, int npw_max, const FPTYPE *gcar_in) |
| count zero gcar indexes and prepare zero_indexes, do gcar_y /= gcar_x, gcar_z /= gcar_y
|
|
void | save_vkb (int npw, int ipol) |
| save the 0-value dvkbs for calculating the dbecp_i in the force calculation
|
|
void | revert_vkb (int npw, int ipol) |
| revert the 0-value dvkbs for calculating the dbecp_i in the force calculation
|
|
template<typename FPTYPE, typename Device>
class hamilt::Onsite_Proj_tools< FPTYPE, Device >
Nonlocal pseudopotential tools in plane wave basis set. used for calculating force and stress for different algorithm the main functions are:
- cal_becp: calculate the becp = <psi|beta> for all beta functions
- cal_dbecp_s: calculate the dbecp_{ij} = <psi|\partial beta/\partial varepsilon_{ij}> for all beta functions stress_{ij} = -1/omega \sum_{n,k}f_{nk} \sum_I \sum_{lm,l'm'}D_{l,l'}^{I} becp * dbecp_{ij} also calculated
- cal_dbecp_f: calculate the dbecp_i = <psi|\partial beta/\partial \tau^I_i> for all beta functions
- cal_force: calculate the force^I_i = - \sum_{n,k}f_{nk} \sum_{lm,l'm'}D_{l,l'}^{I} becp * dbecp_i