Skip to content

Commit 05cb3f3

Browse files
authored
enables SOC calculation with DeePKS model loaded (#1814)
* enables SOC calculation with DeePKS model loaded * minor bug fixed for DeePKS+SOC calculation
1 parent ca4cc94 commit 05cb3f3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

source/src_lcao/LCAO_nnr.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,15 @@ void LCAO_Matrix::folding_fixedH(const int &ik)
437437
{
438438
this->Sloc2[iic] += this->SlocR_soc[index] * kphase;
439439
this->Hloc_fixed2[iic] += this->Hloc_fixedR_soc[index] * kphase;
440+
#ifdef __DEEPKS
441+
if(GlobalV::deepks_scf)
442+
{
443+
if (iw1_all % 2 == iw2_all % 2)
444+
{
445+
GlobalC::ld.H_V_delta_k[ik][iic] += GlobalC::ld.H_V_deltaR[index] * kphase;
446+
}
447+
}
448+
#endif
440449
}
441450
++index;
442451
++tot_index;

0 commit comments

Comments
 (0)