Skip to content

Commit 79c4b04

Browse files
authored
Merge pull request #3 from 1041176461/hytd
Fix: delete abacus_cmake.sh and some compile errors
2 parents c329b73 + ae660f2 commit 79c4b04

File tree

5 files changed

+10
-24
lines changed

5 files changed

+10
-24
lines changed

S.zip

-19 MB
Binary file not shown.

abacus_cmake.sh

Lines changed: 0 additions & 20 deletions
This file was deleted.

source/module_elecstate/module_dm/density_matrix.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -496,12 +496,12 @@ void DensityMatrix<std::complex<double>, double>::cal_DMR()
496496
std::cout << "ucell->lat0 " << tmp_lat0 << std::endl;
497497
std::cout << "iat1 " << iat1 << " " << "iat2 " << iat2 << std::endl;*/
498498
}
499-
for (int ik = 0; ik < this->_nks; ++ik)
499+
for (int ik = 0; ik < this->_nk; ++ik)
500500
{
501501
// cal k_phase
502502
// if TK==std::complex<double>, kphase is e^{ikR}
503503
const ModuleBase::Vector3<double> dR(r_index[0], r_index[1], r_index[2]);
504-
const double arg = (this->_kv->kvec_d[ik] * dR) * ModuleBase::TWO_PI + arg_td;
504+
const double arg = (this->_kvec_d[ik] * dR) * ModuleBase::TWO_PI + arg_td;
505505
double sinp, cosp;
506506
ModuleBase::libm::sincos(arg, &sinp, &cosp);
507507
std::complex<double> kphase = std::complex<double>(cosp, sinp);
@@ -678,7 +678,7 @@ void DensityMatrix<std::complex<double>, double>::cal_DMR(const int ik)
678678
// cal k_phase
679679
// if TK==std::complex<double>, kphase is e^{ikR}
680680
const ModuleBase::Vector3<double> dR(r_index[0], r_index[1], r_index[2]);
681-
const double arg = (this->_kv->kvec_d[ik] * dR) * ModuleBase::TWO_PI + arg_td;
681+
const double arg = (this->_kvec_d[ik] * dR) * ModuleBase::TWO_PI + arg_td;
682682
double sinp, cosp;
683683
ModuleBase::libm::sincos(arg, &sinp, &cosp);
684684
std::complex<double> kphase = std::complex<double>(cosp, sinp);

source/module_io/read_input_item_exx_dftu.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,12 @@ void ReadInput::item_exx()
175175
item.annotation = "if 1, a two-step method is employed, else it will "
176176
"start with a GGA-Loop, and then Hybrid-Loop";
177177
read_sync_bool(input.exx_separate_loop);
178+
item.check_value = [](const Input_Item& item, const Parameter& para) {
179+
if (para.input.esolver_type == "tddft" && para.input.exx_separate_loop > 0)
180+
{
181+
ModuleBase::WARNING_QUIT("ReadInput", "For RT-TDDFT with hybrid functionals, only exx_separate_loop=0 is supported");
182+
}
183+
};
178184
this->add_item(item);
179185
}
180186
{

source/module_io/td_current_io.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void ModuleIO::cal_tmp_DM(elecstate::DensityMatrix<std::complex<double>, double>
8282
// cal k_phase
8383
// if TK==std::complex<double>, kphase is e^{ikR}
8484
const ModuleBase::Vector3<double> dR(r_index.x, r_index.y, r_index.z);
85-
const double arg = (DM_real.get_kv_pointer()->kvec_d[ik] * dR) * ModuleBase::TWO_PI + arg_td;
85+
const double arg = (DM_real.get_kvec_d()[ik] * dR) * ModuleBase::TWO_PI + arg_td;
8686
double sinp, cosp;
8787
ModuleBase::libm::sincos(arg, &sinp, &cosp);
8888
std::complex<double> kphase = std::complex<double>(cosp, sinp);

0 commit comments

Comments
 (0)