diff --git a/ABACUS.develop/source/run_lcao.cpp b/ABACUS.develop/source/run_lcao.cpp index e3ed050db9..1cdc745812 100644 --- a/ABACUS.develop/source/run_lcao.cpp +++ b/ABACUS.develop/source/run_lcao.cpp @@ -45,6 +45,7 @@ void Run_lcao::lcao_line(void) // * reading the localized orbitals/projectors // * construct the interpolation tables. + hm.orb_con.set_orb_tables( UOT, ORB, diff --git a/ABACUS.develop/source/src_global/global_function.cpp b/ABACUS.develop/source/src_global/global_function.cpp index df5062502c..9ece417ad7 100644 --- a/ABACUS.develop/source/src_global/global_function.cpp +++ b/ABACUS.develop/source/src_global/global_function.cpp @@ -189,26 +189,26 @@ void WARNING_QUIT(const string &file,const string &description) { cout << " " << endl; cout << " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl; - cout << " !!!!!!!!!!!!!!!!! SOMETHING TO WARN YOU !!!!!!!!!!!!!!!!!" << endl; + cout << " NOTICE " << endl; cout << " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl; cout << " " << endl; cout << " " << description << endl; cout << " CHECK IN FILE : " << global_out_dir << "warning.log" << endl; cout << " " << endl; cout << " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl; - cout << " !!!!!!!!!!!!!!!!! SOMETHING TO WARN YOU !!!!!!!!!!!!!!!!!" << endl; + cout << " NOTICE " << endl; cout << " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl; ofs_running << " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl; - ofs_running << " !!!!!!!!!!!!!!!!! SOMETHING TO WARN YOU !!!!!!!!!!!!!!!!!" << endl; + ofs_running << " NOTICE " << endl; ofs_running << " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl; ofs_running << endl; ofs_running << " " << description << endl; ofs_running << " CHECK IN FILE : " << global_out_dir << "warning.log" << endl; ofs_running << endl; ofs_running << " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl; - ofs_running << " !!!!!!!!!!!!!!!!! SOMETHING TO WARN YOU !!!!!!!!!!!!!!!!!" << endl; + ofs_running << " NOTICE " << endl; ofs_running << " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl; } diff --git a/ABACUS.develop/source/src_io/read_atoms.cpp b/ABACUS.develop/source/src_io/read_atoms.cpp index e568172bb7..f112febe8e 100644 --- a/ABACUS.develop/source/src_io/read_atoms.cpp +++ b/ABACUS.develop/source/src_io/read_atoms.cpp @@ -185,7 +185,7 @@ bool UnitCell_pseudo::read_atom_positions(ifstream &ifpos) ofs_warning << " Cartesian_angstrom_center_xz" << endl; ofs_warning << " Cartesian_angstrom_center_yz" << endl; ofs_warning << " Cartesian_angstrom_center_xyz" << endl; - return 0; + return 0; // means something wrong } Vector3 v; @@ -211,7 +211,9 @@ bool UnitCell_pseudo::read_atom_positions(ifstream &ifpos) for(int it2=0; it2atoms[it].label == this->atom_label[it] ) - found = true; + { + found = true; + } } if(!found) { @@ -262,146 +264,110 @@ bool UnitCell_pseudo::read_atom_positions(ifstream &ifpos) // int atoms[it].nwl // int* atoms[it].l_nchi; //=========================================== - /*READ_VALUE(ifpos, this->atoms[it].nwl); - assert(this->atoms[it].nwl<10); - OUT(ofs_running,"L max for local orbitals",atoms[it].nwl); - - delete[] this->atoms[it].l_nchi; - this->atoms[it].l_nchi = new int[ this->atoms[it].nwl+1]; - this->atoms[it].nw = 0; - for(int L=0; Latoms[it].l_nchi; + this->atoms[it].l_nchi = new int[ this->atoms[it].nwl+1]; + this->atoms[it].nw = 0; + int L =0; + + while (ifs.good()) + { + ifs >> word; + if (strcmp("Lmax", word) == 0) + { + READ_VALUE(ifs, this->atoms[it].nwl); + } + assert(this->atoms[it].nwl<10); + + if (strcmp("Cutoff(a.u.)", word) == 0) // pengfei Li 16-2-29 + { + READ_VALUE(ifs, this->atoms[it].Rcut); + } + + if (strcmp("Sorbital-->", word) == 0) + { + READ_VALUE(ifs, this->atoms[it].l_nchi[L]); + this->atoms[it].nw += (2*L + 1) * this->atoms[it].l_nchi[L]; + stringstream ss; + ss << "L=" << L << ", number of zeta"; + OUT(ofs_running,ss.str(),atoms[it].l_nchi[L]); + L++; + } + if (strcmp("Porbital-->", word) == 0) + { + READ_VALUE(ifs, this->atoms[it].l_nchi[L]); + this->atoms[it].nw += (2*L + 1) * this->atoms[it].l_nchi[L]; + stringstream ss; + ss << "L=" << L << ", number of zeta"; + OUT(ofs_running,ss.str(),atoms[it].l_nchi[L]); + L++; + } + if (strcmp("Dorbital-->", word) == 0) + { + READ_VALUE(ifs, this->atoms[it].l_nchi[L]); + this->atoms[it].nw += (2*L + 1) * this->atoms[it].l_nchi[L]; + stringstream ss; + ss << "L=" << L << ", number of zeta"; + OUT(ofs_running,ss.str(),atoms[it].l_nchi[L]); + L++; + } + if (strcmp("Forbital-->", word) == 0) + { + READ_VALUE(ifs, this->atoms[it].l_nchi[L]); + this->atoms[it].nw += (2*L + 1) * this->atoms[it].l_nchi[L]; + stringstream ss; + ss << "L=" << L << ", number of zeta"; + OUT(ofs_running,ss.str(),atoms[it].l_nchi[L]); + L++; + } + if (strcmp("Gorbital-->", word) == 0) + { + READ_VALUE(ifs, this->atoms[it].l_nchi[L]); + this->atoms[it].nw += (2*L + 1) * this->atoms[it].l_nchi[L]; + stringstream ss; + ss << "L=" << L << ", number of zeta"; + OUT(ofs_running,ss.str(),atoms[it].l_nchi[L]); + L++; + } + } + ifs.close(); + } + else { - READ_VALUE(ifpos, this->atoms[it].l_nchi[L]); + delete[] this->atoms[it].l_nchi; + this->atoms[it].l_nchi = new int[ this->atoms[it].nwl+1]; + this->atoms[it].nw = 0; - // calculate the number of local basis(3D) - this->atoms[it].nw += (2*L + 1) * this->atoms[it].l_nchi[L]; - - stringstream ss; - ss << "L=" << L << ", number of zeta"; - OUT(ofs_running,ss.str(),atoms[it].l_nchi[L]); - }*/ - if (BASIS_TYPE == "lcao" || BASIS_TYPE == "lcao_in_pw") - { - ifstream ifs(ORB.orbital_file[it].c_str(), ios::in); // pengfei 2014-10-13 - if (!ifs) - { - cout << " Can't find the ORBITAL file." << endl; - } - - char word[80]; - delete[] this->atoms[it].l_nchi; - this->atoms[it].l_nchi = new int[ this->atoms[it].nwl+1]; - this->atoms[it].nw = 0; - int L =0; - - while (ifs.good()) - { - ifs >> word; - if (strcmp("Lmax", word) == 0) - { - READ_VALUE(ifs, this->atoms[it].nwl); - } - assert(this->atoms[it].nwl<10); - - if (strcmp("Cutoff(a.u.)", word) == 0) // pengfei Li 16-2-29 - { - READ_VALUE(ifs, this->atoms[it].Rcut); - } - - //cout << "atoms[it].nwl = "<", word) == 0) - { - READ_VALUE(ifs, this->atoms[it].l_nchi[L]); - this->atoms[it].nw += (2*L + 1) * this->atoms[it].l_nchi[L]; - stringstream ss; - ss << "L=" << L << ", number of zeta"; - OUT(ofs_running,ss.str(),atoms[it].l_nchi[L]); - L++; - } - if (strcmp("Porbital-->", word) == 0) - { - READ_VALUE(ifs, this->atoms[it].l_nchi[L]); - this->atoms[it].nw += (2*L + 1) * this->atoms[it].l_nchi[L]; - stringstream ss; - ss << "L=" << L << ", number of zeta"; - OUT(ofs_running,ss.str(),atoms[it].l_nchi[L]); - L++; - } - if (strcmp("Dorbital-->", word) == 0) - { - READ_VALUE(ifs, this->atoms[it].l_nchi[L]); - this->atoms[it].nw += (2*L + 1) * this->atoms[it].l_nchi[L]; - stringstream ss; - ss << "L=" << L << ", number of zeta"; - OUT(ofs_running,ss.str(),atoms[it].l_nchi[L]); - L++; - } - if (strcmp("Forbital-->", word) == 0) - { - READ_VALUE(ifs, this->atoms[it].l_nchi[L]); - this->atoms[it].nw += (2*L + 1) * this->atoms[it].l_nchi[L]; - stringstream ss; - ss << "L=" << L << ", number of zeta"; - OUT(ofs_running,ss.str(),atoms[it].l_nchi[L]); - L++; - } - if (strcmp("Gorbital-->", word) == 0) - { - READ_VALUE(ifs, this->atoms[it].l_nchi[L]); - this->atoms[it].nw += (2*L + 1) * this->atoms[it].l_nchi[L]; - stringstream ss; - ss << "L=" << L << ", number of zeta"; - OUT(ofs_running,ss.str(),atoms[it].l_nchi[L]); - L++; - } - //cout <<" atoms[it].nw = "<atoms[it].l_nchi; - this->atoms[it].l_nchi = new int[ this->atoms[it].nwl+1]; - this->atoms[it].nw = 0; - - this->atoms[it].nwl = 2; - //cout << INPUT.lmaxmax << endl; - if ( INPUT.lmaxmax != 2 ) - { - this->atoms[it].nwl = INPUT.lmaxmax; - } - for(int L=0; Latoms[it].l_nchi[L] = 1; - // calculate the number of local basis(3D) - this->atoms[it].nw += (2*L + 1) * this->atoms[it].l_nchi[L]; - - stringstream ss; - ss << "L=" << L << ", number of zeta"; - OUT(ofs_running,ss.str(),atoms[it].l_nchi[L]); - } - - /* this->atoms[it].l_nchi[0] = 1; - this->atoms[it].nw += (2*0 + 1) * this->atoms[it].l_nchi[0]; - // stringstream s0; - // s0 << "L=" << 0 << ", number of zeta"; - // OUT(ofs_running,s0.str(),atoms[it].l_nchi[0]); - - this->atoms[it].l_nchi[1] = 1; - this->atoms[it].nw += (2*1 + 1) * this->atoms[it].l_nchi[1]; - // stringstream s1; - // s1 << "L=" << 1 << ", number of zeta"; - // OUT(ofs_running,s1.str(),atoms[it].l_nchi[1]); - - this->atoms[it].l_nchi[2] = 1; - this->atoms[it].nw += (2*2 + 1) * this->atoms[it].l_nchi[2];*/ - // stringstream s2; - // s2 << "L=" << 2 << ", number of zeta"; - // OUT(ofs_running,s2.str(),atoms[it].l_nchi[2]);*/ - - } + this->atoms[it].nwl = 2; + //cout << INPUT.lmaxmax << endl; + if ( INPUT.lmaxmax != 2 ) + { + this->atoms[it].nwl = INPUT.lmaxmax; + } + for(int L=0; Latoms[it].l_nchi[L] = 1; + // calculate the number of local basis(3D) + this->atoms[it].nw += (2*L + 1) * this->atoms[it].l_nchi[L]; + + stringstream ss; + ss << "L=" << L << ", number of zeta"; + OUT(ofs_running,ss.str(),atoms[it].l_nchi[L]); + } + } // end basis type //OUT(ofs_running,"Total number of local orbitals",atoms[it].nw); diff --git a/ABACUS.develop/source/src_lcao/ORB_atomic.h b/ABACUS.develop/source/src_lcao/ORB_atomic.h index 48000ccbf8..3763daa701 100644 --- a/ABACUS.develop/source/src_lcao/ORB_atomic.h +++ b/ABACUS.develop/source/src_lcao/ORB_atomic.h @@ -1,8 +1,3 @@ -//========================================================= -//AUTHOR : liaochen -//DATE : 2008-11-12 -//Last Update : 2009-4-23 -//========================================================= #ifndef NUMERICAL_ORBITAL_H #define NUMERICAL_ORBITAL_H @@ -11,8 +6,6 @@ using namespace std; #include "../src_global/intarray.h" #include "../src_global/vector3.h" - -//#include "../src_pw/tools.h" #include "ORB_atomic_lm.h" //========================================================= diff --git a/ABACUS.develop/source/src_lcao/ORB_control.cpp b/ABACUS.develop/source/src_lcao/ORB_control.cpp index 2dcd40feea..b1dc36c8aa 100644 --- a/ABACUS.develop/source/src_lcao/ORB_control.cpp +++ b/ABACUS.develop/source/src_lcao/ORB_control.cpp @@ -50,7 +50,12 @@ void ORB_control::set_orb_tables( orb.dR = lcao_dr_in; orb.Rmax = lcao_rmax_in; - orb.Read_Orbitals(ntype, lmax, out_descriptor, out_r_matrix, my_rank); + orb.Read_Orbitals( + ntype, + lmax, + out_descriptor, + out_r_matrix, + my_rank); if(CALCULATION=="test") { diff --git a/ABACUS.develop/source/src_lcao/ORB_read.cpp b/ABACUS.develop/source/src_lcao/ORB_read.cpp index 5ea2e69eb3..156bd5e168 100644 --- a/ABACUS.develop/source/src_lcao/ORB_read.cpp +++ b/ABACUS.develop/source/src_lcao/ORB_read.cpp @@ -151,9 +151,11 @@ void LCAO_Orbitals::Read_Orbitals( assert(dR > 0.0); assert(Rmax > 0.0); + // ntype: number of atom species this->ntype = ntype_in; assert(ntype>0); + // lmax: lmax used in local orbitals as basis sets assert(lmax_in>=0); // mohan add 2021-04-16 this->lmax = lmax_in; @@ -196,18 +198,7 @@ void LCAO_Orbitals::Read_Orbitals( this->Phi = new Numerical_Orbital[ntype]; for(int it=0; itRead_PAO(it, lmaxt, nchi, my_rank); - - delete[] nchi; + this->Read_PAO(it, my_rank); } @@ -728,16 +719,26 @@ void LCAO_Orbitals::Read_NonLocal(const int &it, int &n_projectors) #endif // end for Read and Set Nonlocal, mohan add 2021-04-26 + +//------------------------------------------------------- +// mohan note 2021-04-26 +// to_caoyu: +// 1) read in lmaxt and nchi directly from orbital files +// 2) pass nchi to phi via this->Phi[it].set_orbital_info +// be careful! nchi[l] may be different for differnt phi +//------------------------------------------------------- void LCAO_Orbitals::Read_PAO( const int& it, - const int& lmaxt, // lmax for atom species 'it', mohan add 2021-04-26 - int* nchi, // number of chi for each L, mohan add 2021-04-26 const int &my_rank) // mohan add 2021-04-26 { TITLE("LCAO_Orbitals","Read_PAO"); + int lmaxt = ucell.atoms[it].nwl; + // number of chi for each L. + int *nchi = new int[lmaxt+1]; for(int l=0; l<=lmaxt; l++) { + nchi[l] = ucell.atoms[it].l_nchi[l]; this->nchimax = std::max( this->nchimax, nchi[l]); } @@ -752,7 +753,7 @@ void LCAO_Orbitals::Read_PAO( delete[] Phi[it].phiLN; this->Phi[it].phiLN = new Numerical_Orbital_Lm[total_nchi]; - ifstream in; + ifstream in_ao; int count=0; ofs_running << " " << setw(8) << "ORBITAL" << setw(3) << "L" @@ -765,14 +766,11 @@ void LCAO_Orbitals::Read_PAO( { ofs_running << " " << setw(8) << count+1 << setw(3) << L << setw(3) << N; - // mohan add 2010-09-08. - // check if the orbital file exists. bool open=false; if(my_rank==0) { - //cout << " file name : " << orbital_file[it] << endl; - in.open(this->orbital_file[it].c_str()); - if(in) + in_ao.open(this->orbital_file[it].c_str()); + if(in_ao) { open=true; } @@ -797,17 +795,17 @@ void LCAO_Orbitals::Read_PAO( int meshr_read; if(my_rank==0) //pengfei 2014-10-13 { - while (in.good()) + while (in_ao.good()) { - in >> word; + in_ao >> word; if (std::strcmp(word , "END") == 0) // Peize Lin fix bug about strcmp 2016-08-02 { break; } } - CHECK_NAME(in, "Mesh"); - in >> meshr; + CHECK_NAME(in_ao, "Mesh"); + in_ao >> meshr; meshr_read = meshr; if(meshr%2==0) { @@ -821,8 +819,8 @@ void LCAO_Orbitals::Read_PAO( #endif if(my_rank==0) { - CHECK_NAME(in, "dr"); - in >> dr; + CHECK_NAME(in_ao, "dr"); + in_ao >> dr; } #ifdef __MPI @@ -856,11 +854,15 @@ void LCAO_Orbitals::Read_PAO( bool find = false; if(my_rank==0) { - string name1, name2, name3; - int tmp_it, tmp_l ,tmp_n; + string name1; + string name2; + string name3; + int tmp_it=0; + int tmp_l=0; + int tmp_n=0; while( !find ) { - if(in.eof()) + if(in_ao.eof()) { ofs_warning << " Can't find l=" << L << " n=" << N << " orbital." << endl; @@ -868,15 +870,15 @@ void LCAO_Orbitals::Read_PAO( } - in >> name1 >> name2 >> name3; + in_ao >> name1 >> name2 >> name3; assert( name1 == "Type" ); - in >> tmp_it >> tmp_l >> tmp_n; + in_ao >> tmp_it >> tmp_l >> tmp_n; if( L == tmp_l && N == tmp_n ) { // meshr_read is different from meshr if meshr is even number. for(int ir=0; ir> psi[ir]; + in_ao >> psi[ir]; /* double rl = pow (ir*dr, l); psi[ir] *= rl; @@ -890,7 +892,7 @@ void LCAO_Orbitals::Read_PAO( double no_use; for(int ir=0; ir> no_use; + in_ao >> no_use; } } }//end find @@ -910,7 +912,7 @@ void LCAO_Orbitals::Read_PAO( #endif // renormalize radial wave functions - double* inner = new double[meshr]; + double* inner = new double[meshr](); for(int ir=0; ir0.0); // mohan add 2021-04-26 + // check unit: \sum ( psi[r] * r )^2 = 1 ofs_running << setprecision(3) << setw(12) << unit; @@ -957,7 +961,7 @@ void LCAO_Orbitals::Read_PAO( delete[] psi; ++count; - in.close(); + in_ao.close(); } } @@ -968,6 +972,8 @@ void LCAO_Orbitals::Read_PAO( nchi, total_nchi); //copy twice ! + delete[] nchi; + return; } @@ -977,7 +983,7 @@ void LCAO_Orbitals::Read_Descriptor(void) //read descriptor basis { TITLE("LCAO_Orbitals", "Read_Descriptor"); - ifstream in; + ifstream in_de; ofs_running << " " << setw(12) << "DESCRIPTOR" << setw(3) << "L" << setw(3) << "N" << setw(8) << "nr" << setw(8) << "dr" << setw(8) << "RCUT" << setw(12) << "CHECK_UNIT" @@ -987,8 +993,8 @@ void LCAO_Orbitals::Read_Descriptor(void) //read descriptor basis bool open = false; if (MY_RANK == 0) { - in.open(this->descriptor_file.c_str()); - if (in) + in_de.open(this->descriptor_file.c_str()); + if (in_de) { open = true; } @@ -1009,12 +1015,12 @@ void LCAO_Orbitals::Read_Descriptor(void) //read descriptor basis char word[80]; if (MY_RANK == 0) { - while (in.good()) + while (in_de.good()) { - in >> word; + in_de >> word; if (std::strcmp(word, "Lmax") == 0) { - in >> lmax; + in_de >> lmax; break; } } @@ -1022,7 +1028,7 @@ void LCAO_Orbitals::Read_Descriptor(void) //read descriptor basis // number of chi for each L. for (int l = 0; l <= lmax; l++) { - in >> word >> word >> word >> nchi[l]; + in_de >> word >> word >> word >> nchi[l]; this->nchimax_d = std::max(this->nchimax_d, nchi[l]); } } @@ -1043,29 +1049,29 @@ void LCAO_Orbitals::Read_Descriptor(void) //read descriptor basis //OUT(ofs_running,"Total number of chi(l,n)",total_nchi); this->Alpha[0].phiLN = new Numerical_Orbital_Lm[total_nchi]; - int meshr; // number of mesh points - int meshr_read; - double dr; + int meshr=0; // number of mesh points + int meshr_read=0; + double dr=0.0; if (MY_RANK == 0) { - while (in.good()) + while (in_de.good()) { - in >> word; + in_de >> word; if (std::strcmp(word, "END") == 0) // Peize Lin fix bug about strcmp 2016-08-02 { break; } } - CHECK_NAME(in, "Mesh"); - in >> meshr; + CHECK_NAME(in_de, "Mesh"); + in_de >> meshr; meshr_read = meshr; if (meshr % 2 == 0) { ++meshr; } - CHECK_NAME(in, "dr"); - in >> dr; + CHECK_NAME(in_de, "dr"); + in_de >> dr; } #ifdef __MPI @@ -1075,8 +1081,10 @@ void LCAO_Orbitals::Read_Descriptor(void) //read descriptor basis #endif int count = 0; - string name1, name2; - int tmp_l, tmp_n; + string name1; + string name2; + int tmp_l=0; + int tmp_n=0; for (int L = 0; L <= lmax; L++) { @@ -1097,10 +1105,13 @@ void LCAO_Orbitals::Read_Descriptor(void) //read descriptor basis psir = new double[meshr]; rab = new double[meshr]; - ZEROS(radial, meshr); - ZEROS(psi, meshr); - ZEROS(psir, meshr); - ZEROS(rab, meshr); + for(int im=0; im> name1 >> name2; - in >> tmp_l >> tmp_n; + in_de >> name1 >> name2; + in_de >> tmp_l >> tmp_n; if (L == tmp_l && N == tmp_n) { // meshr_read is different from meshr if meshr is even number. for (int ir = 0; ir < meshr_read; ir++) { - in >> psi[ir]; - /* - double rl = pow (ir*dr, l); - psi[ir] *= rl; - */ + in_de >> psi[ir]; psir[ir] = psi[ir] * radial[ir]; } find = true; @@ -1147,7 +1154,7 @@ void LCAO_Orbitals::Read_Descriptor(void) //read descriptor basis double no_use; for (int ir = 0; ir < meshr_read; ir++) { - in >> no_use; + in_de >> no_use; } } }//end find @@ -1167,7 +1174,7 @@ void LCAO_Orbitals::Read_Descriptor(void) //read descriptor basis #endif // renormalize radial wave functions - double* inner = new double[meshr]; + double* inner = new double[meshr](); for (int ir = 0; ir < meshr; ir++) { inner[ir] = psir[ir] * psir[ir]; @@ -1176,6 +1183,8 @@ void LCAO_Orbitals::Read_Descriptor(void) //read descriptor basis Integral::Simpson_Integral(meshr, inner, rab, unit); + assert(unit>0.0); + // check unit: \sum ( psi[r] * r )^2 = 1 ofs_running << setprecision(3) << setw(12) << unit; @@ -1218,7 +1227,7 @@ void LCAO_Orbitals::Read_Descriptor(void) //read descriptor basis } } - in.close(); + in_de.close(); this->Alpha[0].set_orbital_info( 1, // any type @@ -1226,5 +1235,6 @@ void LCAO_Orbitals::Read_Descriptor(void) //read descriptor basis lmax, nchi, total_nchi); //copy twice ! + return; } diff --git a/ABACUS.develop/source/src_lcao/ORB_read.h b/ABACUS.develop/source/src_lcao/ORB_read.h index 1d7f879cf8..6ce928f65f 100644 --- a/ABACUS.develop/source/src_lcao/ORB_read.h +++ b/ABACUS.develop/source/src_lcao/ORB_read.h @@ -28,8 +28,6 @@ class LCAO_Orbitals void Read_PAO( const int& it, - const int& lmaxt, // lmax for atom species 'it', mohan add 2021-04-26 - int* nchi, // number of chi for each L, mohan add 2021-04-26 const int& my_rank); // mohan add 2021-04-26 #ifdef __NORMAL @@ -90,12 +88,14 @@ class LCAO_Orbitals private: - int kmesh; + int ntype; // number of elements + int kmesh; // number of points on kmesh + int lmax; int nchimax; + int lmax_d; //caoyu add 2021-03-17 int nchimax_d; //caoyu add 2021-03-17 - int ntype; // number of elements }; diff --git a/ABACUS.develop/source/src_lcao/ORB_table_phi.h b/ABACUS.develop/source/src_lcao/ORB_table_phi.h index 594d1ed260..413189f843 100644 --- a/ABACUS.develop/source/src_lcao/ORB_table_phi.h +++ b/ABACUS.develop/source/src_lcao/ORB_table_phi.h @@ -113,14 +113,23 @@ class ORB_table_phi // variables int ntype; + int lmax; + double Rmax; + double dk; + int nlm; + int kmesh; + double *kpoint; + double *r; + double *rab; + double *kab; }; #endif