Skip to content

Commit 7cfd5ef

Browse files
committed
revert some incorrect changes
1 parent f20de93 commit 7cfd5ef

File tree

8 files changed

+10
-43
lines changed

8 files changed

+10
-43
lines changed

.gitignore

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,3 @@ time.json
2323
__pycache__
2424
abacus.json
2525
*.npy
26-
r0*/*
27-
tests/*
28-
TD*/*
29-
cmake/*
30-
*.nsys-rep
31-
*.sh

deps/LibComm

Lines changed: 0 additions & 1 deletion
This file was deleted.

deps/LibRI

Lines changed: 0 additions & 1 deletion
This file was deleted.

source/module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
#include "operator_lcao/td_nonlocal_lcao.h"
4141
#include "operator_lcao/veff_lcao.h"
4242

43-
#include <memory>
4443
namespace hamilt
4544
{
4645

source/module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#ifdef __EXX
2222
#include "module_ri/Exx_LRI.h"
2323
#endif
24-
#include <memory>
2524
namespace hamilt
2625
{
2726

source/module_hamilt_lcao/module_gint/new_gint/gint_helper.h

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -60,27 +60,4 @@ inline int floor_div(const int a, const int b)
6060
inline int ceil_div(const int a, const int b)
6161
{
6262
return a / b + (a % b != 0 && (a ^ b) > 0);
63-
};
64-
65-
// for debug
66-
#include <iostream>
67-
#include <fstream>
68-
#include <string>
69-
70-
template <typename T>
71-
void writeArrayToFile(T* array, int n, const std::string& filename) {
72-
std::ofstream outFile(filename);
73-
74-
if (!outFile.is_open()) {
75-
std::cerr << "can't open file: " << filename << std::endl;
76-
return;
77-
}
78-
79-
for (int i = 0; i < n; ++i) {
80-
outFile <<array[i] << std::endl;
81-
}
82-
83-
outFile.close();
84-
85-
std::cout << "successfully write data to: " << filename << std::endl;
86-
}
63+
};

source/module_io/write_eband_terms.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,12 @@ void write_eband_terms(const int nspin,
8989
hamilt::HContainer<TR> v_pp_local_R_ao(pv);
9090
if_gamma_fix(v_pp_local_R_ao);
9191
std::vector<std::vector<double>> e_orb_pp_local;
92-
// hamilt::Veff<hamilt::OperatorLCAO<TK, TR>> v_pp_local_op(gint, &v_pp_local_k_ao, kv.kvec_d, &pot_local, &v_pp_local_R_ao, &ucell, orb_cutoff, &gd, nspin);
93-
// v_pp_local_op.contributeHR();
92+
hamilt::Veff<hamilt::OperatorLCAO<TK, TR>> v_pp_local_op(gint, &v_pp_local_k_ao, kv.kvec_d, &pot_local, &v_pp_local_R_ao, &ucell, orb_cutoff, &gd, nspin);
93+
v_pp_local_op.contributeHR();
9494
for (int ik = 0;ik < kv.get_nks();++ik)
9595
{
9696
v_pp_local_k_ao.set_zero_hk();
97-
// dynamic_cast<hamilt::OperatorLCAO<TK, TR>*>(&v_pp_local_op)->contributeHk(ik);
97+
dynamic_cast<hamilt::OperatorLCAO<TK, TR>*>(&v_pp_local_op)->contributeHk(ik);
9898
e_orb_pp_local.emplace_back(orbital_energy(ik, nbands,
9999
cVc(v_pp_local_k_ao.get_hk(), &psi(ik, 0, 0), nbasis, nbands, *pv, p2d), p2d));
100100
}
@@ -143,9 +143,9 @@ void write_eband_terms(const int nspin,
143143
std::vector<hamilt::Veff<hamilt::OperatorLCAO<TK, TR>>*> v_hartree_op(nspin0);
144144
for (int is = 0; is < nspin0; ++is)
145145
{
146-
// v_hartree_op[is] = new hamilt::Veff<hamilt::OperatorLCAO<TK, TR>>(gint,
147-
// &v_hartree_k_ao, kv.kvec_d, &pot_hartree, &v_hartree_R_ao[is], &ucell, orb_cutoff, &gd, nspin);
148-
// v_hartree_op[is]->contributeHR();
146+
v_hartree_op[is] = new hamilt::Veff<hamilt::OperatorLCAO<TK, TR>>(gint,
147+
&v_hartree_k_ao, kv.kvec_d, &pot_hartree, &v_hartree_R_ao[is], &ucell, orb_cutoff, &gd, nspin);
148+
v_hartree_op[is]->contributeHR();
149149
}
150150
std::vector<std::vector<double>> e_orb_hartree;
151151
for (int ik = 0;ik < kv.get_nks();++ik)

source/module_io/write_vxc.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,10 @@ void write_Vxc(const int nspin,
240240
std::vector<hamilt::Veff<hamilt::OperatorLCAO<TK, TR>>*> vxcs_op_ao(nspin0);
241241
for (int is = 0; is < nspin0; ++is)
242242
{
243-
// vxcs_op_ao[is] = new hamilt::Veff<hamilt::OperatorLCAO<TK, TR>>(gint,
244-
// &vxc_k_ao, kv.kvec_d, potxc, &vxcs_R_ao[is], &ucell, orb_cutoff, &gd, nspin);
243+
vxcs_op_ao[is] = new hamilt::Veff<hamilt::OperatorLCAO<TK, TR>>(gint,
244+
&vxc_k_ao, kv.kvec_d, potxc, &vxcs_R_ao[is], &ucell, orb_cutoff, &gd, nspin);
245245

246-
// vxcs_op_ao[is]->contributeHR();
246+
vxcs_op_ao[is]->contributeHR();
247247
}
248248
std::vector<std::vector<double>> e_orb_locxc; // orbital energy (local XC)
249249
std::vector<std::vector<double>> e_orb_tot; // orbital energy (total)

0 commit comments

Comments
 (0)