1#ifndef DELTA_SPIN_LCAO_H
2#define DELTA_SPIN_LCAO_H
10#include <unordered_map>
15#ifndef __DELTASPINTEMPLATE
16#define __DELTASPINTEMPLATE
25template <
typename TK,
typename TR>
30 const std::vector<ModuleBase::Vector3<double>>& kvec_d_in,
35 const std::vector<double>& orb_cutoff);
56 for(
int is=0;is<this->spin_num;is++)
58 this->update_lambda_[is] =
true;
63 void cal_force_stress(
const bool cal_force,
64 const bool cal_stress,
90 const std::unordered_map<
int, std::vector<double>>& nlm1_all,
91 const std::unordered_map<
int, std::vector<double>>& nlm2_all,
117 void cal_force_IJR(
const int& iat1,
120 const std::unordered_map<
int, std::vector<double>>& nlm1_all,
121 const std::unordered_map<
int, std::vector<double>>& nlm2_all,
130 void cal_stress_IJR(
const int& iat1,
133 const std::unordered_map<
int, std::vector<double>>& nlm1_all,
134 const std::unordered_map<
int, std::vector<double>>& nlm2_all,
145 void pre_coeff_array(
const std::vector<TR>& coeff,
const int row_size,
const int col_size);
148 std::vector<hamilt::HContainer<TR>*>
pre_hr;
154 bool initialized =
false;
Definition sltk_grid_driver.h:43
3 elements vector
Definition vector3.h:22
Definition parallel_orbitals.h:9
A class to compute two-center integrals.
Definition two_center_integrator.h:35
Definition base_matrix.h:20
virtual void contributeHR() override
contributeHR() is used to calculate the HR matrix <phi_{\mu, 0}|beta_p1>D_{p1, p2}<beta_p2|phi_{\nu,...
void update_lambda()
set the update_lambda_ to true, which means the lambda will be updated in the next contributeHR()
Definition dspin_lcao.h:54
std::vector< double > lambda_save
Definition dspin_lcao.h:152
std::vector< double > tmp_dmr_memory
Definition dspin_lcao.h:150
void cal_constraint_atom_list(const std::vector< ModuleBase::Vector3< int > > &constraints)
calculate the constaint atom list
std::vector< TR > tmp_coeff_array
Definition dspin_lcao.h:151
std::vector< double > cal_moment(const HContainer< double > *dmR, const std::vector< ModuleBase::Vector3< int > > &constrain)
calculate the magnetization moment for each atom
std::vector< bool > constraint_atom_list
Definition dspin_lcao.h:147
void cal_HR_IJR(const int &iat1, const int &iat2, const std::unordered_map< int, std::vector< double > > &nlm1_all, const std::unordered_map< int, std::vector< double > > &nlm2_all, TR *data_pointer)
calculate the HR local matrix of <I,J,R> atom pair
std::vector< bool > update_lambda_
Definition dspin_lcao.h:156
void cal_moment_IJR(const double *dmR, const TR *hr, const int row_size, const int col_size, double *moment)
calculate the atomic magnetization moment for each <IJR>
std::vector< double > orb_cutoff_
Definition dspin_lcao.h:80
void pre_coeff_array(const std::vector< TR > &coeff, const int row_size, const int col_size)
calculate the array of coefficient of lambda * d\rho^p/drho^{\sigma\sigma'}
std::vector< hamilt::HContainer< TR > * > pre_hr
Definition dspin_lcao.h:148
void cal_pre_HR()
calculate the prepare HR for each atom pre_hr^I = \sum_{lm}<phi_mu|alpha^I_{lm}><alpha^I_{lm}|phi_{nu...
Definition dspin_lcao.h:20
Definition hcontainer.h:144
Definition hs_matrix_k.hpp:11
Definition operator_lcao.h:12
#define T
Definition exp.cpp:237