From 8c01a630114138c0e7520a869fd8ad7f9e3ccbb5 Mon Sep 17 00:00:00 2001 From: maki49 <1579492865@qq.com> Date: Sat, 3 Apr 2021 17:47:06 +0800 Subject: [PATCH] some files haven't be successfully submitted in reading descriptor --- ABACUS.develop/examples/H2O-deepks-lcao/STRU | 4 ++++ ABACUS.develop/source/src_io/read_atoms.cpp | 4 ++++ .../source/src_lcao/ORB_gen_tables.cpp | 16 ++-------------- ABACUS.develop/source/src_lcao/ORB_gen_tables.h | 4 +--- 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/ABACUS.develop/examples/H2O-deepks-lcao/STRU b/ABACUS.develop/examples/H2O-deepks-lcao/STRU index 8dc2ac2824..6148031dd4 100644 --- a/ABACUS.develop/examples/H2O-deepks-lcao/STRU +++ b/ABACUS.develop/examples/H2O-deepks-lcao/STRU @@ -6,6 +6,10 @@ NUMERICAL_ORBITAL H_gga_8au_60Ry_2s1p.orb O_gga_7au_60Ry_2s2p1d.orb +NUMERICAL_DESCRIPTOR +jle.orb + + LATTICE_CONSTANT 10 diff --git a/ABACUS.develop/source/src_io/read_atoms.cpp b/ABACUS.develop/source/src_io/read_atoms.cpp index 3e8f51bf46..288a95426b 100644 --- a/ABACUS.develop/source/src_io/read_atoms.cpp +++ b/ABACUS.develop/source/src_io/read_atoms.cpp @@ -71,6 +71,10 @@ void UnitCell_pseudo::read_atom_species(ifstream &ifa) } } + // caoyu add 2021-03-16 + if (SCAN_BEGIN(ifa, "NUMERICAL_DESCRIPTOR")) { + ifa >> ORB.descriptor_file; + } } // Peize Lin add 2016-09-23 diff --git a/ABACUS.develop/source/src_lcao/ORB_gen_tables.cpp b/ABACUS.develop/source/src_lcao/ORB_gen_tables.cpp index 043948466f..7404617773 100644 --- a/ABACUS.develop/source/src_lcao/ORB_gen_tables.cpp +++ b/ABACUS.develop/source/src_lcao/ORB_gen_tables.cpp @@ -828,9 +828,7 @@ void ORB_gen_tables::snap_psialpha( const int& T2, const int& L2, const int& m2, - const int& N2, - complex* olm1, - const int is) const + const int& N2) const { if (job != 0 && job != 1) @@ -964,20 +962,10 @@ void ORB_gen_tables::snap_psialpha( case 0: // calculate overlap. { if (NSPIN != 4) olm[0] += tmpOlm0 * rly[MGT.get_lm_index(L, m)]; - else if (olm1 != NULL) - { - olm1[0] += tmpOlm0 * rly[MGT.get_lm_index(L, m)]; - olm1[1] += 0;//tmpOlm0 * (tmp(0,0)+tmp(0,1)); - olm1[2] += 0;//tmpOlm0 * (tmp(1,0)+tmp(1,1)); - olm1[3] += tmpOlm0 * rly[MGT.get_lm_index(L, m)]; - - } else { - WARNING_QUIT("ORB_gen_tables::snap_psialpha", "something wrong!"); - + WARNING_QUIT("ORB_gen_tables::snap_psialpha", "deepks with NSPIN>1 has not implemented yet!"); } - /* if( abs ( tmpOlm0 * rly[ MGT.get_lm_index(L, m) ] ) > 1.0e-3 ) { diff --git a/ABACUS.develop/source/src_lcao/ORB_gen_tables.h b/ABACUS.develop/source/src_lcao/ORB_gen_tables.h index 2fe9619ee2..de890d2028 100644 --- a/ABACUS.develop/source/src_lcao/ORB_gen_tables.h +++ b/ABACUS.develop/source/src_lcao/ORB_gen_tables.h @@ -79,9 +79,7 @@ class ORB_gen_tables const int& I2, const int& l2, const int& m2, - const int& n2, - complex* olm1 = NULL, - const int is = 0)const; + const int& n2)const; // set as public because in hamilt_linear, // we need to destroy the tables: SR,TR,NR