Skip to content

Commit 8adda0c

Browse files
committed
add setup_exx in normal LCAO codes
1 parent 087a9af commit 8adda0c

File tree

9 files changed

+20
-21
lines changed

9 files changed

+20
-21
lines changed

source/Makefile.Objects

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,7 @@ OBJS_LCAO=evolve_elec.o\
669669
LCAO_allocate.o\
670670
LCAO_set_mat2d.o\
671671
LCAO_init_basis.o\
672+
setup_exx.o\
672673
center2_orb.o\
673674
center2_orb-orb11.o\
674675
center2_orb-orb21.o\
@@ -677,13 +678,13 @@ OBJS_LCAO=evolve_elec.o\
677678
wavefunc_in_pw.o\
678679

679680
OBJS_MODULE_RI=conv_coulomb_pot_k.o\
680-
exx_abfs-abfs_index.o \
681-
exx_abfs-jle.o \
682-
exx_abfs-io.o \
683-
exx_abfs-construct_orbs.o \
684-
ABFs_Construct-PCA.o \
685-
exx_opt_orb.o \
686-
exx_opt_orb-print.o \
681+
exx_abfs-abfs_index.o\
682+
exx_abfs-jle.o\
683+
exx_abfs-io.o\
684+
exx_abfs-construct_orbs.o\
685+
ABFs_Construct-PCA.o\
686+
exx_opt_orb-print.o\
687+
exx_opt_orb.o\
687688
Matrix_Orbs11.o\
688689
Matrix_Orbs21.o\
689690
Matrix_Orbs22.o\

source/source_esolver/esolver_double_xc.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -415,11 +415,8 @@ void ESolver_DoubleXC<TK, TR>::cal_force(UnitCell& ucell, ModuleBase::matrix& fo
415415
this->ld,
416416
"base",
417417
#endif
418-
#ifdef __EXX
419-
*this->exd,
420-
*this->exc,
421-
#endif
422-
&ucell.symm);
418+
this->exx_nao,
419+
&ucell.symm);
423420
// restore to original xc
424421
XC_Functional::set_xc_type(ucell.atoms[0].ncpp.xc_func);
425422

source/source_esolver/esolver_ks_lcao.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ void ESolver_KS_LCAO<TK, TR>::before_all_runners(UnitCell& ucell, const Input_pa
122122
dynamic_cast<elecstate::ElecStateLCAO<TK>*>(this->pelec)->init_DM(&this->kv, &(this->pv), inp.nspin);
123123

124124
// 8) init exact exchange calculations
125-
exx_nao.before_runner();
125+
this->exx_nao.before_runner();
126126

127127
// 9) initialize DFT+U
128128
if (inp.dft_plus_u)

source/source_esolver/esolver_ks_lcao.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#ifdef __MLALGO
1212
#include "source_lcao/module_deepks/LCAO_deepks.h" // deepks
1313
#endif
14-
#include "source_lcao/module_ri/setup_exx.h" // for exx, mohan add 20251008
14+
#include "source_lcao/setup_exx.h" // for exx, mohan add 20251008
1515
#include "source_lcao/module_rdmft/rdmft.h" // rdmft
1616

1717
#include <memory>

source/source_lcao/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ if(ENABLE_LCAO)
4141
LCAO_allocate.cpp
4242
LCAO_set_mat2d.cpp
4343
LCAO_init_basis.cpp
44+
setup_exx.cpp
4445
record_adj.cpp
4546
center2_orb.cpp
4647
center2_orb-orb11.cpp

source/source_lcao/FORCE_STRESS.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include "force_stress_arrays.h"
1717
#include "source_lcao/module_gint/gint_gamma.h"
1818
#include "source_lcao/module_gint/gint_k.h"
19-
#include "source_lcao/module_ri/setup_exx.h" // for exx, mohan add 20251008
19+
#include "source_lcao/setup_exx.h" // for exx, mohan add 20251008
2020

2121

2222
template <typename T>

source/source_lcao/module_ri/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ if (ENABLE_LIBRI)
3838
if(ENABLE_COVERAGE)
3939
add_coverage(ri)
4040
endif()
41-
endif()
41+
endif()

source/source_lcao/module_ri/setup_exx.cpp renamed to source/source_lcao/setup_exx.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#include "source_lcao/module_ri/setup_exx.h"
1+
#include "source_lcao/setup_exx.h"
22

3-
void Exx_NAO::init0()
3+
void Exx_NAO::init()
44
{
55
#ifdef __EXX
66
// 1. currently this initialization must be put in constructor rather than `before_all_runners()`

source/source_lcao/module_ri/setup_exx.h renamed to source/source_lcao/setup_exx.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef SETUP_EXX_H
2-
#define SETUP_EXX_H
1+
#ifndef SETUP_EXX_NAO_H
2+
#define SETUP_EXX_NAO_H
33

44
/*
55
#include "source_cell/unitcell.h" // use unitcell
@@ -23,7 +23,7 @@ class Exx_NAO
2323
std::shared_ptr<Exx_LRI_Interface<TK, std::complex<double>>> exc = nullptr;
2424
#endif
2525

26-
void init0();
26+
void init();
2727

2828
void before_runner();
2929

0 commit comments

Comments
 (0)