diff --git a/ABACUS.develop/source/src_lcao/LCAO_gen_fixedH.cpp b/ABACUS.develop/source/src_lcao/LCAO_gen_fixedH.cpp index 214756109f..5f2a533bfc 100644 --- a/ABACUS.develop/source/src_lcao/LCAO_gen_fixedH.cpp +++ b/ABACUS.develop/source/src_lcao/LCAO_gen_fixedH.cpp @@ -1,8 +1,8 @@ #include "LCAO_gen_fixedH.h" -#include "../src_pw/global.h" -#include "../src_pw/wavefunc.h" -#include "LCAO_nnr.h" -#include "global_fp.h" +#include "src_pw/global.h" +#include "src_pw/wavefunc.h" +#include "src_lcao/LCAO_nnr.h" +#include "src_lcao/global_fp.h" LCAO_gen_fixedH::LCAO_gen_fixedH() {} @@ -654,15 +654,10 @@ void LCAO_gen_fixedH::build_Nonlocal_beta(const bool& calc_deri) //update by liu TITLE("LCAO_gen_fixedH","build_Nonlocal_beta"); timer::tick ("LCAO_gen_fixedH","build_Nonlocal_beta",'G'); - matrix Rcut; - Rcut.create(ucell.ntype, ucell.ntype); - for(int i=0; i tau1 = GridD.getAdjacentTau(ad); + const int T1 = GridD.getType(ad1); + const int I1 = GridD.getNatom(ad1); + //const int iat1 = ucell.itia2iat(T1, I1); + const int start1 = ucell.itiaiw2iwt(T1, I1, 0); + const Vector3 tau1 = GridD.getAdjacentTau(ad1); const Atom* atom1 = &ucell.atoms[T1]; const int nw1_tot = atom1->nw*NPOL; @@ -705,23 +700,23 @@ void LCAO_gen_fixedH::build_Nonlocal_beta(const bool& calc_deri) //update by liu if(distance < rcut) { // ------------- enter the nnr increaing zone -------------- - //for (int j=0; jnw*NPOL; j++) - for (int j=0; jnw*NPOL; ++iw1) + for (int iw1=0; iw1 atom2. //for (int k=0; knw*NPOL; k++) - for (int k=0; kiw2l[ j0 ], // L1 - atom1->iw2m[ j0 ], // m1 - atom1->iw2n[ j0 ], // N1 + atom1->iw2l[ iw1_0 ], // L1 + atom1->iw2m[ iw1_0 ], // m1 + atom1->iw2n[ iw1_0 ], // N1 tau2, T2, - atom2->iw2l[ k0 ], // L2 - atom2->iw2m[ k0 ], // m2 - atom2->iw2n[ k0 ], // n2 + atom2->iw2l[ iw2_0 ], // L2 + atom2->iw2m[ iw2_0 ], // m2 + atom2->iw2n[ iw2_0 ], // n2 ucell.atoms[T0].tau[I0], T0, ucell.atoms[T0].dion ); @@ -757,13 +752,13 @@ void LCAO_gen_fixedH::build_Nonlocal_beta(const bool& calc_deri) //update by liu { UOT.snap_psibeta( nlm, 1, tau1, T1, - atom1->iw2l[ j0 ], // L1 - atom1->iw2m[ j0 ], // m1 - atom1->iw2n[ j0 ], // N1 + atom1->iw2l[ iw1_0 ], // L1 + atom1->iw2m[ iw1_0 ], // m1 + atom1->iw2n[ iw1_0 ], // N1 tau2, T2, - atom2->iw2l[ k0 ], // L2 - atom2->iw2m[ k0 ], // m2 - atom2->iw2n[ k0 ], // n2 + atom2->iw2l[ iw2_0 ], // L2 + atom2->iw2m[ iw2_0 ], // m2 + atom2->iw2n[ iw2_0 ], // n2 ucell.atoms[T0].tau[I0], T0, ucell.atoms[T0].dion ); @@ -781,10 +776,10 @@ void LCAO_gen_fixedH::build_Nonlocal_beta(const bool& calc_deri) //update by liu //++nnr; //} } - }// end k - }// j + }// end iw2 + }// end iw1 } // end distance - }// ad2 + }// end ad2 // mohan add 2011-06-16 /*if(!GAMMA_ONLY_LOCAL) // mohan fix bug 2011-06-26 @@ -800,7 +795,7 @@ void LCAO_gen_fixedH::build_Nonlocal_beta(const bool& calc_deri) //update by liu } } }*/ - }// ad + }// end ad1 }// end I0 }// end T0