Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
e79c1d0
update some timers
mohanchen Mar 25, 2025
3a8b520
update timer
mohanchen Mar 25, 2025
aabb29a
update output formats
mohanchen Mar 25, 2025
931f4ac
update print_cell
mohanchen Mar 26, 2025
71e5556
add ofs in print_tau
mohanchen Mar 26, 2025
4353a55
update print_tau
mohanchen Mar 26, 2025
959fe8b
update output formats
mohanchen Mar 26, 2025
9a8552d
update md outputs
mohanchen Mar 26, 2025
cc35adf
Merge branch 'deepmodeling:develop' into develop
mohanchen Mar 26, 2025
357d43e
Merge branch 'develop' of https://github.com/mohanchen/abacus-mc into…
mohanchen Mar 26, 2025
eb0a302
beging modifying the autotests
mohanchen Mar 27, 2025
258245d
update previous commits
mohanchen Mar 27, 2025
2fc86bb
update integrate tests
mohanchen Mar 27, 2025
5840f50
update some timers
mohanchen Mar 27, 2025
0189b6c
fix total force and total stress
mohanchen Mar 27, 2025
34bcd1a
update integrate tests
mohanchen Mar 27, 2025
9deffae
update print_band
mohanchen Mar 27, 2025
8718960
fix print_band
mohanchen Mar 27, 2025
05e9cc7
update md print out information
mohanchen Mar 27, 2025
abc61a0
update print_stress
mohanchen Mar 27, 2025
bda0769
update print_stress in dp, but still has problems in lj
mohanchen Mar 27, 2025
c4b4b19
fix dp_test.cpp
mohanchen Mar 27, 2025
1060d4a
update esolver_lj
mohanchen Mar 28, 2025
3f77545
Merge branch 'develop' of https://github.com/mohanchen/abacus-mc into…
mohanchen Mar 28, 2025
34c8748
merge new codes
mohanchen Mar 28, 2025
b0d2d0a
set mulliken charge accuracy from 4 to 3
mohanchen Mar 29, 2025
3956c6f
update print force and print stress
mohanchen Mar 30, 2025
b27ddc2
Merge branch 'develop' of https://github.com/mohanchen/abacus-mc into…
mohanchen Mar 31, 2025
ae6552c
delete kv variable in hamilt_lcao
mohanchen Mar 31, 2025
37c253e
update some operators
mohanchen Mar 31, 2025
5fccb05
update hamiltonian and operator
mohanchen Mar 31, 2025
821a947
Merge branch 'develop' of https://github.com/mohanchen/abacus-mc into…
mohanchen Mar 31, 2025
d9eac9e
Merge branch 'lishui' into develop
mohanchen Mar 31, 2025
119872f
update updateHk funciton parameters
mohanchen Apr 1, 2025
975c2cc
fix bug
mohanchen Apr 1, 2025
02eb1de
fix bug in updateHk
mohanchen Apr 1, 2025
8c26095
update updateSk
mohanchen Apr 1, 2025
3354cbc
Merge branch 'develop' into develop
mohanchen Apr 2, 2025
b66725a
update read atoms
mohanchen Apr 2, 2025
65e4630
update SCAN_BEGIN, now the function ignore lines starting with #
mohanchen Apr 2, 2025
73a9881
update
mohanchen Apr 2, 2025
a13470f
Merge branch 'develop' of https://github.com/mohanchen/abacus-mc into…
mohanchen Apr 2, 2025
d5b6acd
add SCAN_LINE_BEGIN
mohanchen Apr 2, 2025
4f499a6
fix bug
mohanchen Apr 2, 2025
c8afa94
fix issue
mohanchen Apr 2, 2025
f4996ed
Merge branch 'deepmodeling:develop' into develop
mohanchen Apr 2, 2025
9cf4ba2
Merge branch 'tea4' into develop
mohanchen Apr 2, 2025
d24e931
Merge branch 'develop' of https://github.com/mohanchen/abacus-mc into…
mohanchen Apr 3, 2025
495b80f
update dos output file name
mohanchen Apr 3, 2025
49f3dc2
update dos
mohanchen Apr 3, 2025
f62df8b
update DOS, fix an output bug
mohanchen Apr 4, 2025
a653408
update DOS calculations
mohanchen Apr 4, 2025
7340a30
output format updated
mohanchen Apr 4, 2025
b2c7f7e
update warning message for reading charge density
mohanchen Apr 4, 2025
3c2f37e
fix tool_quit
mohanchen Apr 4, 2025
f329d3d
fix write_dos_pw_test.cpp
mohanchen Apr 5, 2025
eeafbf1
update unittests
mohanchen Apr 5, 2025
186c3a7
merge newest version
mohanchen Apr 5, 2025
a8891ec
Merge branch 'snow2' into develop
mohanchen Apr 5, 2025
5a375f3
change Chinese note to English
mohanchen Apr 5, 2025
44cd7a5
update some formats
mohanchen Apr 5, 2025
39448c4
update some outputs
mohanchen Apr 5, 2025
fa2d6f7
update DOS in integrated tests
mohanchen Apr 5, 2025
705c448
update ref data
mohanchen Apr 5, 2025
97f5bf1
add prepare_dos in cal_dos.cpp
mohanchen Apr 5, 2025
4a321bd
use prepare_dos in write_dos_lcao.cpp
mohanchen Apr 5, 2025
2a48e80
update LCAO DOS codes
mohanchen Apr 5, 2025
e45ab26
change DOS name
mohanchen Apr 5, 2025
be6e94a
fix DOS name in SDFT
mohanchen Apr 5, 2025
640f311
add dat after DOS and TDOS
mohanchen Apr 5, 2025
e472333
add pdos
mohanchen Apr 5, 2025
f8111df
add cal_pdos
mohanchen Apr 5, 2025
16a91f5
update ref for DOS
mohanchen Apr 5, 2025
2401e82
update cal_pdos_gamma
mohanchen Apr 5, 2025
b41a4b4
update timer and quit tests
mohanchen Apr 5, 2025
b3bfeb4
fix two issues in unittests
mohanchen Apr 5, 2025
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
28 changes: 18 additions & 10 deletions source/module_base/test/timer_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,22 @@ TEST_F(TimerTest, Tick)
EXPECT_GT(ModuleBase::timer::timer_pool["wavefunc"]["evc"].cpu_second,0.0001);
}


TEST_F(TimerTest, Start)
{
ModuleBase::timer::start();
// start() called tick() once
EXPECT_FALSE(ModuleBase::timer::timer_pool[""]["total"].start_flag);
}


TEST_F(TimerTest, write_to_json)
{
ModuleBase::timer::tick("wavefunc","evc");
std::this_thread::sleep_for(std::chrono::microseconds(T_Elapse)); // 0.1 ms
ModuleBase::timer::tick("wavefunc","evc");
ModuleBase::timer::write_to_json("tmp.json");

// check if tmp.json exists
ifs.open("tmp.json");
EXPECT_TRUE(ifs.good());
Expand All @@ -89,9 +92,6 @@ TEST_F(TimerTest, write_to_json)
content += tmp;
}

// check if the content is correct
// shuold be like this:
// {"total": 0, "sub":[{"class_name": "wavefunc","sub":[{"name":"evc","cpu_second": 0.000318,"calls":2,"cpu_second_per_call":0.000159,"cpu_second_per_total": null}]}]}
EXPECT_THAT(content,testing::HasSubstr("\"total\":"));
EXPECT_THAT(content,testing::HasSubstr("\"sub\":[{\"class_name\":\"wavefunc\",\"sub\":[{\"name\":\"evc\",\"cpu_second\":"));
EXPECT_THAT(content,testing::HasSubstr("\"calls\":2,\"cpu_second_per_call\":"));
Expand All @@ -106,25 +106,29 @@ TEST_F(TimerTest, PrintAll)
ModuleBase::timer::tick("wavefunc","evc");
std::this_thread::sleep_for(std::chrono::microseconds(T_Elapse)); // 0.1 ms
ModuleBase::timer::tick("wavefunc","evc");

// call print_all
ofs.open("tmp");
testing::internal::CaptureStdout();
ModuleBase::timer::print_all(ofs);
output = testing::internal::GetCapturedStdout();
ofs.close();

// checout output on screen
std::cout << "Get captured stdout: \n" << std::endl;
std::cout << output << std::endl;
// std::cout << "Get captured stdout: \n" << std::endl;
// std::cout << output << std::endl;
EXPECT_THAT(output,testing::HasSubstr("TIME STATISTICS"));
EXPECT_THAT(output,testing::HasSubstr("CLASS_NAME"));
EXPECT_THAT(output,testing::HasSubstr("NAME"));
EXPECT_THAT(output,testing::HasSubstr("TIME/s"));
EXPECT_THAT(output,testing::HasSubstr("CALLS"));
EXPECT_THAT(output,testing::HasSubstr("AVG/s"));
EXPECT_THAT(output,testing::HasSubstr("PER/%"));

// check output in file
ifs.open("tmp");
std::cout << "Capture contents line by line from output file: \n" << std::endl;
// std::cout << "Capture contents line by line from output file: \n" << std::endl;
getline(ifs,output);
getline(ifs,output);
EXPECT_THAT(output,testing::HasSubstr("TIME STATISTICS"));
getline(ifs,output);
Expand All @@ -139,36 +143,41 @@ TEST_F(TimerTest, PrintAll)
remove("time.json");
}


TEST_F(TimerTest, PrintUntilNow)
{
long double time = ModuleBase::timer::print_until_now();
EXPECT_TRUE(time>0.0);
}


TEST_F(TimerTest, Finish)
{
ModuleBase::timer::tick("wavefunc","evc");
std::this_thread::sleep_for(std::chrono::microseconds(T_Elapse)); // 0.1 ms
ModuleBase::timer::tick("wavefunc","evc");

// call print_all
ofs.open("tmp");
testing::internal::CaptureStdout();
ModuleBase::timer::finish(ofs);
output = testing::internal::GetCapturedStdout();
ofs.close();
// checout output on screen
std::cout << "Get captured stdout: \n" << std::endl;
std::cout << output << std::endl;
//std::cout << "Get captured stdout: \n" << std::endl;
//std::cout << output << std::endl;
EXPECT_THAT(output,testing::HasSubstr("TIME STATISTICS"));
EXPECT_THAT(output,testing::HasSubstr("CLASS_NAME"));
EXPECT_THAT(output,testing::HasSubstr("NAME"));
EXPECT_THAT(output,testing::HasSubstr("TIME/s"));
EXPECT_THAT(output,testing::HasSubstr("CALLS"));
EXPECT_THAT(output,testing::HasSubstr("AVG/s"));
EXPECT_THAT(output,testing::HasSubstr("PER/%"));

// check output in file
ifs.open("tmp");
std::cout << "Capture contents line by line from output file: \n" << std::endl;
//std::cout << "Capture contents line by line from output file: \n" << std::endl;
getline(ifs,output);
getline(ifs,output);
EXPECT_THAT(output,testing::HasSubstr("TIME STATISTICS"));
getline(ifs,output);
Expand All @@ -182,7 +191,6 @@ TEST_F(TimerTest, Finish)
ifs.close();
}

// use __MPI to activate parallel environment
#ifdef __MPI
int main(int argc, char **argv)
{
Expand Down
4 changes: 2 additions & 2 deletions source/module_base/test/tool_quit_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ TEST_F(ToolQuitTest,warningquit)
ifs.open("running.log");
getline(ifs,output);
// test output in running.log file
EXPECT_THAT(output,testing::HasSubstr("!!!!!!!"));
EXPECT_THAT(output,testing::HasSubstr("-------"));
ifs.close();
}

Expand All @@ -116,7 +116,7 @@ TEST_F(ToolQuitTest,warningquit_with_ret)
ifs.open("running.log");
getline(ifs,output);
// test output in running.log file
EXPECT_THAT(output,testing::HasSubstr("!!!!!!!"));
EXPECT_THAT(output,testing::HasSubstr("-------"));
ifs.close();
}
// use __MPI to activate parallel environment
Expand Down
2 changes: 1 addition & 1 deletion source/module_base/timer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ void timer::print_all(std::ofstream &ofs)
/*indent=*/0,
/*align=*/{/*value*/FmtTable::Align::LEFT, /*title*/FmtTable::Align::CENTER});
time_statistics << class_names << names << times << calls << avgs << pers;
const std::string table = "TIME STATISTICS\n" + time_statistics.str();
const std::string table = "\nTIME STATISTICS\n" + time_statistics.str();
std::cout<<table<<std::endl;
ofs<<table<<std::endl;
write_to_json("time.json");
Expand Down
32 changes: 16 additions & 16 deletions source/module_base/tool_quit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,34 +68,34 @@ void WARNING_QUIT(const std::string &file,const std::string &description,int ret
{
#ifdef __NORMAL

std::cout << " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl;
std::cout << " NOTICE " << std::endl;
std::cout << " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl;
std::cout << " ---------------------------------------------------------" << std::endl;
std::cout << " !NOTICE! " << std::endl;
std::cout << " ---------------------------------------------------------" << std::endl;

#else
std::cout << " " << std::endl;
std::cout << " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl;
std::cout << " NOTICE " << std::endl;
std::cout << " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl;
std::cout << " ---------------------------------------------------------" << std::endl;
std::cout << " !NOTICE! " << std::endl;
std::cout << " ---------------------------------------------------------" << std::endl;
std::cout << " " << std::endl;
std::cout << " " << description << std::endl;
std::cout << " CHECK IN FILE : " << PARAM.globalv.global_out_dir << "warning.log" << std::endl;
std::cout << " " << std::endl;
std::cout << " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl;
std::cout << " NOTICE " << std::endl;
std::cout << " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl;
std::cout << " ---------------------------------------------------------" << std::endl;
std::cout << " !NOTICE! " << std::endl;
std::cout << " ---------------------------------------------------------" << std::endl;


GlobalV::ofs_running << " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl;
GlobalV::ofs_running << " NOTICE " << std::endl;
GlobalV::ofs_running << " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl;
GlobalV::ofs_running << " ---------------------------------------------------------" << std::endl;
GlobalV::ofs_running << " !NOTICE! " << std::endl;
GlobalV::ofs_running << " ---------------------------------------------------------" << std::endl;
GlobalV::ofs_running << std::endl;
GlobalV::ofs_running << " " << description << std::endl;
GlobalV::ofs_running << " CHECK IN FILE : " << PARAM.globalv.global_out_dir << "warning.log" << std::endl;
GlobalV::ofs_running << std::endl;
GlobalV::ofs_running << " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl;
GlobalV::ofs_running << " ---------------------------------------------------------" << std::endl;
GlobalV::ofs_running << " NOTICE " << std::endl;
GlobalV::ofs_running << " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl;
GlobalV::ofs_running << " ---------------------------------------------------------" << std::endl;

WARNING(file,description);
GlobalV::ofs_running<<" Check in file : "<<PARAM.globalv.global_out_dir<<"warning.log"<<std::endl;
Expand Down Expand Up @@ -128,10 +128,10 @@ void CHECK_WARNING_QUIT(const bool error_in, const std::string &file,const std::
}

//print error information
std::cout << " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl;
std::cout << " ---------------------------------------------------------" << std::endl;
std::cout << " ERROR! " << description << std::endl;
std::cout << " CHECK IN FILE : " << PARAM.globalv.global_out_dir << "warning.log" << std::endl;
std::cout << " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl;
std::cout << " ---------------------------------------------------------" << std::endl;
GlobalV::ofs_running << " ERROR! CHECK IN FILE : " << PARAM.globalv.global_out_dir << "warning.log" << std::endl;
GlobalV::ofs_warning << std::endl;
GlobalV::ofs_warning << " ERROR! " << file << ", core " << GlobalV::MY_RANK+1 << ": " << description << std::endl;
Expand Down
3 changes: 0 additions & 3 deletions source/module_cell/unitcell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,6 @@ void UnitCell::setup_cell(const std::string& fn, std::ofstream& log)
assert(lat0 > 0.0);
this->omega = latvec.Det() * this->lat0 * this->lat0 * this->lat0;

std::cout << "latvec.det=" << latvec.Det() << std::endl;
std::cout << "lat0=" << lat0 << std::endl;


if (this->omega < 0)
{
Expand Down
9 changes: 5 additions & 4 deletions source/module_elecstate/fp_energy.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#ifndef FP_ENERGY_H
#define FP_ENERGY_H

#include <vector>

/**
* @file fp_energy.h
* @brief This file contains all energies about first-principle calculations
*/
#ifndef FP_ENERGY_H
#define FP_ENERGY_H
namespace elecstate
{
/**
Expand Down Expand Up @@ -63,11 +64,11 @@ struct efermi
double ef = 0.0; ///< Fermi energy
double ef_up = 0.0; ///< spin up Fermi energy
double ef_dw = 0.0; ///< spin down Fermi energy
bool two_efermi = false; ///<
bool two_efermi = false;
void set_efval(const int& is, const double& ef_in);
double get_efval(const int& is) const;
std::vector<double> get_all_ef() const;
};

} // namespace elecstate
#endif
#endif
12 changes: 6 additions & 6 deletions source/module_elecstate/module_charge/charge_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void Charge::init_rho(elecstate::efermi& eferm_iout,
{
if (is == 1) // failed at the second spin
{
std::cout << "Incomplete electron density file!" << std::endl;
std::cout << " Incomplete electron density file." << std::endl;
read_error = true;
break;
}
Expand Down Expand Up @@ -105,15 +105,15 @@ void Charge::init_rho(elecstate::efermi& eferm_iout,
if (read_error)
{
const std::string warn_msg
= " WARNING: \"init_chg\" is enabled but ABACUS failed to read charge density from file.\n"
" Please check if there is SPINX_CHG.cube (X=1,...) or {suffix}-CHARGE-DENSITY.restart in the "
= " WARNING: \"init_chg\" is enabled but ABACUS failed to read\n charge density from file.\n"
" Please check if there is SPINX_CHG.cube (X=1,...) or\n {suffix}-CHARGE-DENSITY.restart in the "
"directory.\n";
std::cout << std::endl << warn_msg;
std::cout << warn_msg;
if (PARAM.inp.init_chg == "file")
{
ModuleBase::WARNING_QUIT("Charge::init_rho",
"Failed to read in charge density from file.\nIf you want to use atomic "
"charge initialization, \nplease set init_chg to atomic in INPUT.");
"Failed to read in charge density from file.\n For initializing atomic "
"charge in calculations,\n please set init_chg to atomic in INPUT.");
}
}

Expand Down
6 changes: 3 additions & 3 deletions source/module_esolver/esolver_ks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ void ESolver_KS<T, Device>::after_all_runners(UnitCell& ucell)
// 1) write information
if (PARAM.inp.out_dos != 0 || PARAM.inp.out_band[0] != 0 || PARAM.inp.out_proj_band != 0)
{
GlobalV::ofs_running << "\n\n\n\n";
GlobalV::ofs_running << "\n\n";
GlobalV::ofs_running << " >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
">>>>>>>>>>>>>>>>>>>>>>>>>"
<< std::endl;
Expand Down Expand Up @@ -761,17 +761,17 @@ void ESolver_KS<T, Device>::after_all_runners(UnitCell& ucell)
GlobalV::ofs_running << " <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
"<<<<<<<<<<<<<<<<<<<<<<<<<"
<< std::endl;
GlobalV::ofs_running << "\n\n\n\n";
GlobalV::ofs_running << "\n\n";
}

// 2) write information
ModuleIO::write_istate_info(this->pelec->ekb, this->pelec->wg, this->kv);

const int nspin0 = (PARAM.inp.nspin == 2) ? 2 : 1;

// 3) print out band information
if (PARAM.inp.out_band[0])
{
const int nspin0 = (PARAM.inp.nspin == 2) ? 2 : 1;
for (int is = 0; is < nspin0; is++)
{
std::stringstream ss2;
Expand Down
29 changes: 9 additions & 20 deletions source/module_esolver/esolver_ks_pw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -827,29 +827,18 @@ void ESolver_KS_PW<T, Device>::after_all_runners(UnitCell& ucell)
{
ESolver_KS<T, Device>::after_all_runners(ucell);

const int nspin0 = (PARAM.inp.nspin == 2) ? 2 : 1;

//! 3) Compute density of states (DOS)
//! 1) Compute density of states (DOS)
if (PARAM.inp.out_dos)
{
ModuleIO::write_dos_pw(this->pelec->ekb,
this->pelec->wg,
this->kv,
PARAM.inp.nbands,
this->pelec->eferm,
PARAM.inp.dos_edelta_ev,
PARAM.inp.dos_scale,
PARAM.inp.dos_sigma);

if (nspin0 == 1)
{
GlobalV::ofs_running << " Fermi energy is " << this->pelec->eferm.ef << " Rydberg" << std::endl;
}
else if (nspin0 == 2)
{
GlobalV::ofs_running << " Fermi energy (spin = 1) is " << this->pelec->eferm.ef_up << " Rydberg"
<< std::endl;
GlobalV::ofs_running << " Fermi energy (spin = 2) is " << this->pelec->eferm.ef_dw << " Rydberg"
<< std::endl;
}
PARAM.inp.dos_sigma,
GlobalV::ofs_running);
}

// out ldos
Expand All @@ -862,7 +851,7 @@ void ESolver_KS_PW<T, Device>::after_all_runners(UnitCell& ucell)
ucell);
}

//! 5) Calculate the spillage value, used to generate numerical atomic orbitals
//! 3) Calculate the spillage value, used to generate numerical atomic orbitals
if (PARAM.inp.basis_type == "pw" && winput::out_spillage)
{
// ! Print out overlap matrices
Expand All @@ -882,13 +871,13 @@ void ESolver_KS_PW<T, Device>::after_all_runners(UnitCell& ucell)
}
}

//! 6) Print out electronic wave functions in real space
//! 4) Print out electronic wave functions in real space
if (PARAM.inp.out_wfc_r == 1) // Peize Lin add 2021.11.21
{
ModuleIO::write_psi_r_1(ucell, this->psi[0], this->pw_wfc, "wfc_realspace", true, this->kv);
}

//! 7) Use Kubo-Greenwood method to compute conductivities
//! 5) Use Kubo-Greenwood method to compute conductivities
if (PARAM.inp.cal_cond)
{
EleCond<Real, Device> elec_cond(&ucell, &this->kv, this->pelec, this->pw_wfc, this->kspw_psi, &this->ppcell);
Expand All @@ -902,7 +891,7 @@ void ESolver_KS_PW<T, Device>::after_all_runners(UnitCell& ucell)
}

#ifdef __MLKEDF
// generate training data for ML-KEDF
//! 6) generate training data for ML-KEDF
if (PARAM.inp.of_ml_gene_data == 1)
{
this->pelec->pot->update_from_charge(&this->chr, &ucell);
Expand Down
Loading
Loading