File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -788,7 +788,7 @@ void K_Vectors::ibz_kpoint(const ModuleSymmetry::Symmetry& symm,
788788 std::vector<int > ibz2bz (this ->nkstot );
789789
790790 // nkstot is the total input k-points number.
791- const double weight = 1.0 / static_cast <double >(nkstot);
791+ double weight = 1.0 / static_cast <double >(nkstot);
792792
793793 ModuleBase::Vector3<double > kvec_rot;
794794 ModuleBase::Vector3<double > kvec_rot_k;
@@ -822,6 +822,8 @@ void K_Vectors::ibz_kpoint(const ModuleSymmetry::Symmetry& symm,
822822 // search in all k-poins.
823823 for (int i = 0 ; i < nkstot; ++i)
824824 {
825+ if (!is_mp) { weight = wk[i]; } // use the input weight, instead of 1/nkstot
826+
825827 // restrict to [0, 1)
826828 restrict_kpt (kvec_d[i]);
827829
You can’t perform that action at this time.
0 commit comments