Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions source/module_cell/klist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ bool K_Vectors::read_kpoints(const std::string &fn)
}
}

this->nks = this->nkstot;
this->nkstot_full = this->nks = this->nkstot;

ModuleBase::GlobalFunc::OUT(GlobalV::ofs_running,"nkstot",nkstot);
return 1;
Expand Down Expand Up @@ -546,7 +546,7 @@ void K_Vectors::update_use_ibz( void )
ModuleBase::TITLE("K_Vectors","update_use_ibz");
assert( nkstot_ibz > 0 );

// update nkstot
// update nkstot
this->nkstot = this->nkstot_ibz;

ModuleBase::GlobalFunc::OUT(GlobalV::ofs_running,"nkstot now",nkstot);
Expand Down Expand Up @@ -1035,6 +1035,8 @@ void K_Vectors::mpi_k(void)

Parallel_Common::bcast_int(nkstot);

Parallel_Common::bcast_int(nkstot_full);

Parallel_Common::bcast_int(nmp, 3);

Parallel_Common::bcast_double(koffset, 3);
Expand Down
5 changes: 3 additions & 2 deletions source/module_cell/klist.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ class K_Vectors
std::vector<int> ibz2bz; // mohan added 2009-05-18

int nks; // number of k points in this pool(processor, up+dw)
int nkstot; // total number of k points
int nkstot_ibz;
int nkstot; /// total number of k points, equal to nkstot_ibz after reducing k points
int nkstot_ibz; /// number of k points in IBZ
int nkstot_full; /// number of k points in full k mesh

int nmp[3]; // Number of Monhorst-Pack

Expand Down
6 changes: 3 additions & 3 deletions source/module_io/input_conv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -570,9 +570,9 @@ void Input_Conv::Convert(void)
Exx_Abfs::Jle::Ecut_exx = INPUT.exx_opt_orb_ecut;
Exx_Abfs::Jle::tolerence = INPUT.exx_opt_orb_tolerence;

// EXX does not support any symmetry analyse, force symmetry setting to -1
if (INPUT.calculation != "nscf")
ModuleSymmetry::Symmetry::symm_flag = -1;
// EXX does not support symmetry=1
if (INPUT.calculation != "nscf" && INPUT.symmetry == "1")
ModuleSymmetry::Symmetry::symm_flag = 0;
}
#endif // __LCAO
#endif // __EXX
Expand Down
2 changes: 1 addition & 1 deletion source/module_ri/Exx_LRI.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void Exx_LRI<Tdata>::init(const MPI_Comm &mpi_comm_in, const K_Vectors &kv_in)
throw std::domain_error(std::string(__FILE__)+" line "+std::to_string(__LINE__)); break;
}
};
this->abfs_ccp = Conv_Coulomb_Pot_K::cal_orbs_ccp( this->abfs, info.ccp_type, get_ccp_parameter(), this->info.ccp_rmesh_times, p_kv->nks );
this->abfs_ccp = Conv_Coulomb_Pot_K::cal_orbs_ccp(this->abfs, info.ccp_type, get_ccp_parameter(), this->info.ccp_rmesh_times, p_kv->nkstot_full);


for( size_t T=0; T!=this->abfs.size(); ++T )
Expand Down
24 changes: 18 additions & 6 deletions source/module_ri/RI_2D_Comm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
#include <string>
#include <stdexcept>

inline RI::Tensor<double> tensor_conj(const RI::Tensor<double>& t) { return t; }
inline RI::Tensor<std::complex<double>> tensor_conj(const RI::Tensor<std::complex<double>>& t)
{
RI::Tensor<std::complex<double>> r(t.shape);
for (int i = 0;i < t.data->size();++i)(*r.data)[i] = std::conj((*t.data)[i]);
return r;
}
template<typename Tdata, typename Tmatrix>
auto RI_2D_Comm::split_m2D_ktoR(const K_Vectors &kv, const std::vector<const Tmatrix*> &mks_2D, const Parallel_Orbitals &pv)
-> std::vector<std::map<TA,std::map<TAC,RI::Tensor<Tdata>>>>
Expand All @@ -42,11 +49,16 @@ auto RI_2D_Comm::split_m2D_ktoR(const K_Vectors &kv, const std::vector<const Tma
RI::Tensor<Tdata_m> mk_2D = RI_Util::Matrix_to_Tensor<Tdata_m>(*mks_2D[ik]);
const Tdata_m frac = SPIN_multiple
* RI::Global_Func::convert<Tdata_m>( std::exp(
- ModuleBase::TWO_PI*ModuleBase::IMAG_UNIT * (kv.kvec_c[ik] * (RI_Util::array3_to_Vector3(cell)*GlobalC::ucell.latvec))));
if(mR_2D.empty())
mR_2D = RI::Global_Func::convert<Tdata>(mk_2D * frac);
else
mR_2D = mR_2D + RI::Global_Func::convert<Tdata>(mk_2D * frac);
-ModuleBase::TWO_PI * ModuleBase::IMAG_UNIT * (kv.kvec_c[ik] * (RI_Util::array3_to_Vector3(cell) * GlobalC::ucell.latvec))));
auto set_mR_2D = [&mR_2D](auto&& mk_frac) {
if (mR_2D.empty())
mR_2D = RI::Global_Func::convert<Tdata>(mk_frac);
else
mR_2D = mR_2D + RI::Global_Func::convert<Tdata>(mk_frac);
};
if (static_cast<int>(std::round(SPIN_multiple * kv.wk[ik] * kv.nkstot_full)) == 2)
set_mR_2D(mk_2D * (frac * 0.5) + tensor_conj(mk_2D * (frac * 0.5)));
else set_mR_2D(mk_2D * frac);
}

for(int iwt0_2D=0; iwt0_2D!=mR_2D.shape[0]; ++iwt0_2D)
Expand Down Expand Up @@ -122,7 +134,7 @@ void RI_2D_Comm::add_Hexx(
if(GlobalV::GAMMA_ONLY_LOCAL)
lm.set_HSgamma(iwt0, iwt1,
RI::Global_Func::convert<double>(H(iw0_b, iw1_b)) * RI::Global_Func::convert<double>(frac),
lm.Hloc.data());
lm.Hloc.data());
else
lm.set_HSk(iwt0, iwt1,
RI::Global_Func::convert<std::complex<double>>(H(iw0_b, iw1_b)) * frac,
Expand Down
2 changes: 1 addition & 1 deletion tests/integrate/281_NO_KP_HSE/INPUT
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ INPUT_PARAMETERS
#Parameters (1.General)
suffix autotest
ntype 1
symmetry -1
symmetry 0
gamma_only 0
nspin 1

Expand Down
2 changes: 1 addition & 1 deletion tests/integrate/283_NO_KP_HF/INPUT
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ INPUT_PARAMETERS
#Parameters (1.General)
suffix autotest
ntype 1
symmetry -1
symmetry 0
gamma_only 0
nspin 1

Expand Down
2 changes: 1 addition & 1 deletion tests/integrate/284_NO_KP_PBE0/INPUT
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ INPUT_PARAMETERS
#Parameters (1.General)
suffix autotest
ntype 1
symmetry -1
symmetry 0
gamma_only 0
nspin 1

Expand Down
2 changes: 1 addition & 1 deletion tests/integrate/285_NO_KP_RE_HSE/INPUT
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ INPUT_PARAMETERS
#Parameters (1.General)
suffix autotest
ntype 1
symmetry -1
symmetry 0
gamma_only 0
nspin 1

Expand Down
2 changes: 1 addition & 1 deletion tests/integrate/286_NO_KP_CR_HSE/INPUT
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ INPUT_PARAMETERS
#Parameters (1.General)
suffix autotest
ntype 1
symmetry -1
symmetry 0
gamma_only 0
nspin 1

Expand Down
2 changes: 1 addition & 1 deletion tests/integrate/381_NO_GO_S1_HSE/INPUT
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ INPUT_PARAMETERS
suffix autotest
calculation scf
ntype 2
symmetry -1
symmetry 0
nspin 1
pseudo_dir ../../PP_ORB
orbital_dir ../../PP_ORB
Expand Down
2 changes: 1 addition & 1 deletion tests/integrate/382_NO_GO_S2_HSE/INPUT
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ INPUT_PARAMETERS
suffix autotest
calculation scf
ntype 2
symmetry -1
symmetry 0
nspin 2
pseudo_dir ../../PP_ORB
orbital_dir ../../PP_ORB
Expand Down
2 changes: 1 addition & 1 deletion tests/integrate/383_NO_GO_SO_HSE/INPUT
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ INPUT_PARAMETERS
suffix autotest
calculation scf
ntype 2
symmetry -1
symmetry 0
nspin 4
lspinorb 1
noncolin 1
Expand Down
2 changes: 1 addition & 1 deletion tests/integrate/385_NO_GO_RE_S1_HSE/INPUT
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ INPUT_PARAMETERS
suffix autotest
calculation relax
ntype 2
symmetry -1
symmetry 0
nspin 1
pseudo_dir ../../PP_ORB
orbital_dir ../../PP_ORB
Expand Down
2 changes: 1 addition & 1 deletion tests/integrate/386_NO_GO_MD_S1_HSE/INPUT
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ INPUT_PARAMETERS
suffix autotest
calculation md
ntype 2
symmetry -1
symmetry 0
nspin 1
pseudo_dir ../../PP_ORB
orbital_dir ../../PP_ORB
Expand Down