Skip to content

Commit f5e43ab

Browse files
authored
[Refactor] Rename module_tddft and hamilt_ofdft and hamilt_stodft and hamilt_pwdft (#6353)
* Rename module_tddft * Rename hamilt_ofdft * Renamd hamilt_ofdft * Rename hamilt_pwdft * Align doucments
1 parent ca96d8e commit f5e43ab

File tree

434 files changed

+557
-557
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

434 files changed

+557
-557
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -735,9 +735,9 @@ target_link_libraries(
735735
hsolver
736736
elecstate
737737
hamilt_general
738-
hamilt_pwdft
739-
hamilt_ofdft
740-
hamilt_stodft
738+
module_pwdft
739+
module_ofdft
740+
module_stodft
741741
psi
742742
psi_initializer
743743
psi_overall_init

docs/CONTRIBUTING.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,30 +54,30 @@ For those who are interested in the source code, the following figure shows the
5454
| |-- module_neighbor The module for finding the neighbors of each atom in the unit cell.
5555
| |-- module_paw The module for performing PAW calculations.
5656
| |-- module_symmetry The module for finding the symmetry operations of the unit cell.
57-
|-- source_estate The module for defining the electronic state and its operations.
57+
|-- source_estate The module for defining the electronic state and its operations.
5858
| |-- module_charge The module for calculating the charge density, charge mixing
5959
| |-- potentials The module for calculating the potentials, including Hartree, exchange-correlation, local pseudopotential, etc.
6060
|-- source_esolver The module defining task-specific driver of corresponding workflow for evaluating energies, forces, etc., including lj, dp, ks, sdft, ofdft, etc.
6161
| | TDDFT, Orbital-free DFT, etc.
62-
|-- source_hamilt The module for defining general Hamiltonian that can be used both in PW and LCAO calculations.
62+
|-- source_hamilt The module for defining general Hamiltonian that can be used both in PW and LCAO calculations.
6363
| |-- module_ewald The module for calculating the Ewald summation.
6464
| |-- module_surchem The module for calculating the surface charge correction.
6565
| |-- module_vdw The module for calculating the van der Waals correction.
6666
| |-- module_xc The module for calculating the exchange-correlation energy and potential.
67-
|-- source_lcao The module for defining the Hamiltonian in LCAO calculations.
67+
|-- source_lcao The module for defining the Hamiltonian in LCAO calculations.
6868
| |-- hamilt_lcaodft The module for defining the Hamiltonian in LCAO-DFT calculations.
6969
| | |-- operator_lcao The module for defining the operators in LCAO-DFT calculations.
7070
| |-- module_deepks The module for defining the Hamiltonian in DeepKS calculations.
7171
| |-- module_dftu The module for defining the Hamiltonian in DFT+U calculations.
7272
| |-- module_gint The module for performing grid integral in LCAO calculations.
7373
| |-- module_hcontainer The module for storing the Hamiltonian matrix in LCAO calculations.
74-
| |-- module_tddft The module for defining the Hamiltonian in TDDFT calculations.
74+
| |-- module_rt The module for defining the Hamiltonian in TDDFT calculations.
7575
| `-- module_ri The module for performing RI calculations.
76-
|-- source_pw The module for defining the Hamiltonian in PW calculations.
77-
| |-- hamilt_ofdft The module for defining the Hamiltonian in OFDFT calculations.
78-
| |-- hamilt_pwdft The module for defining the Hamiltonian in PW-DFT calculations.
76+
|-- source_pw The module for defining the Hamiltonian in PW calculations.
77+
| |-- module_ofdft The module for defining the Hamiltonian in OFDFT calculations.
78+
| |-- module_pwdft The module for defining the Hamiltonian in PW-DFT calculations.
7979
| | |-- operator_pw The module for defining the operators in PW-DFT calculations.
80-
| `-- hamilt_stodft The module for defining the Hamiltonian in STODFT calculations.
80+
| `-- module_stodft The module for defining the Hamiltonian in STODFT calculations.
8181
|-- source_hsolver The module for solving the Hamiltonian with different diagonalization methods, including CG, Davidson in PW
8282
| | calculations, and scalapack and genelpa in LCAO calculations.
8383
|-- source_io The module for reading of INPUT files and output properties including band structure, density of states, charge density, etc.

source/CMakeLists.txt

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ add_library(
2929
)
3030

3131
list(APPEND device_srcs
32-
source_pw/hamilt_pwdft/kernels/nonlocal_op.cpp
33-
source_pw/hamilt_pwdft/kernels/veff_op.cpp
34-
source_pw/hamilt_pwdft/kernels/ekinetic_op.cpp
35-
source_pw/hamilt_pwdft/kernels/meta_op.cpp
36-
source_pw/hamilt_stodft/kernels/hpsi_norm_op.cpp
32+
source_pw/module_pwdft/kernels/nonlocal_op.cpp
33+
source_pw/module_pwdft/kernels/veff_op.cpp
34+
source_pw/module_pwdft/kernels/ekinetic_op.cpp
35+
source_pw/module_pwdft/kernels/meta_op.cpp
36+
source_pw/module_stodft/kernels/hpsi_norm_op.cpp
3737
source_basis/module_pw/kernels/pw_op.cpp
3838
source_hsolver/kernels/dngvd_op.cpp
3939
source_hsolver/kernels/bpcg_kernel_op.cpp
@@ -47,23 +47,23 @@ list(APPEND device_srcs
4747
source_base/kernels/math_kernel_op.cpp
4848
source_base/kernels/math_kernel_op_vec.cpp
4949

50-
source_pw/hamilt_pwdft/kernels/force_op.cpp
51-
source_pw/hamilt_pwdft/kernels/stress_op.cpp
52-
source_pw/hamilt_pwdft/kernels/onsite_op.cpp
53-
source_pw/hamilt_pwdft/kernels/wf_op.cpp
54-
source_pw/hamilt_pwdft/kernels/vnl_op.cpp
50+
source_pw/module_pwdft/kernels/force_op.cpp
51+
source_pw/module_pwdft/kernels/stress_op.cpp
52+
source_pw/module_pwdft/kernels/onsite_op.cpp
53+
source_pw/module_pwdft/kernels/wf_op.cpp
54+
source_pw/module_pwdft/kernels/vnl_op.cpp
5555
source_base/kernels/math_ylm_op.cpp
5656
source_hamilt/module_xc/kernels/xc_functional_op.cpp
5757
)
5858

5959
if(USE_CUDA)
6060
list(APPEND device_srcs
61-
source_pw/hamilt_pwdft/kernels/cuda/nonlocal_op.cu
62-
source_pw/hamilt_pwdft/kernels/cuda/veff_op.cu
63-
source_pw/hamilt_pwdft/kernels/cuda/ekinetic_op.cu
64-
source_pw/hamilt_pwdft/kernels/cuda/meta_op.cu
65-
source_pw/hamilt_stodft/kernels/cuda/hpsi_norm_op.cu
66-
source_pw/hamilt_pwdft/kernels/cuda/onsite_op.cu
61+
source_pw/module_pwdft/kernels/cuda/nonlocal_op.cu
62+
source_pw/module_pwdft/kernels/cuda/veff_op.cu
63+
source_pw/module_pwdft/kernels/cuda/ekinetic_op.cu
64+
source_pw/module_pwdft/kernels/cuda/meta_op.cu
65+
source_pw/module_stodft/kernels/cuda/hpsi_norm_op.cu
66+
source_pw/module_pwdft/kernels/cuda/onsite_op.cu
6767
source_basis/module_pw/kernels/cuda/pw_op.cu
6868
source_hsolver/kernels/cuda/dngvd_op.cu
6969
source_hsolver/kernels/cuda/bpcg_kernel_op.cu
@@ -72,10 +72,10 @@ if(USE_CUDA)
7272
# source_psi/kernels/cuda/memory_op.cu
7373
source_base/module_device/cuda/memory_op.cu
7474

75-
source_pw/hamilt_pwdft/kernels/cuda/force_op.cu
76-
source_pw/hamilt_pwdft/kernels/cuda/stress_op.cu
77-
source_pw/hamilt_pwdft/kernels/cuda/wf_op.cu
78-
source_pw/hamilt_pwdft/kernels/cuda/vnl_op.cu
75+
source_pw/module_pwdft/kernels/cuda/force_op.cu
76+
source_pw/module_pwdft/kernels/cuda/stress_op.cu
77+
source_pw/module_pwdft/kernels/cuda/wf_op.cu
78+
source_pw/module_pwdft/kernels/cuda/vnl_op.cu
7979
source_base/kernels/cuda/math_ylm_op.cu
8080
source_base/kernels/cuda/math_kernel_op.cu
8181
source_base/kernels/cuda/math_kernel_op_vec.cu
@@ -85,12 +85,12 @@ endif()
8585

8686
if(USE_ROCM)
8787
hip_add_library(device_rocm STATIC
88-
source_pw/hamilt_pwdft/kernels/rocm/nonlocal_op.hip.cu
89-
source_pw/hamilt_pwdft/kernels/rocm/veff_op.hip.cu
90-
source_pw/hamilt_pwdft/kernels/rocm/ekinetic_op.hip.cu
91-
source_pw/hamilt_pwdft/kernels/rocm/meta_op.hip.cu
92-
source_pw/hamilt_pwdft/kernels/rocm/onsite_op.hip.cu
93-
source_pw/hamilt_stodft/kernels/rocm/hpsi_norm_op.hip.cu
88+
source_pw/module_pwdft/kernels/rocm/nonlocal_op.hip.cu
89+
source_pw/module_pwdft/kernels/rocm/veff_op.hip.cu
90+
source_pw/module_pwdft/kernels/rocm/ekinetic_op.hip.cu
91+
source_pw/module_pwdft/kernels/rocm/meta_op.hip.cu
92+
source_pw/module_pwdft/kernels/rocm/onsite_op.hip.cu
93+
source_pw/module_stodft/kernels/rocm/hpsi_norm_op.hip.cu
9494
source_basis/module_pw/kernels/rocm/pw_op.hip.cu
9595
source_hsolver/kernels/rocm/dngvd_op.hip.cu
9696
source_hsolver/kernels/rocm/bpcg_kernel_op.hip.cu
@@ -99,10 +99,10 @@ if(USE_ROCM)
9999
# source_psi/kernels/rocm/memory_op.hip.cu
100100
source_base/module_device/rocm/memory_op.hip.cu
101101

102-
source_pw/hamilt_pwdft/kernels/rocm/force_op.hip.cu
103-
source_pw/hamilt_pwdft/kernels/rocm/stress_op.hip.cu
104-
source_pw/hamilt_pwdft/kernels/rocm/wf_op.hip.cu
105-
source_pw/hamilt_pwdft/kernels/rocm/vnl_op.hip.cu
102+
source_pw/module_pwdft/kernels/rocm/force_op.hip.cu
103+
source_pw/module_pwdft/kernels/rocm/stress_op.hip.cu
104+
source_pw/module_pwdft/kernels/rocm/wf_op.hip.cu
105+
source_pw/module_pwdft/kernels/rocm/vnl_op.hip.cu
106106
source_base/kernels/rocm/math_kernel_op.hip.cu
107107
source_base/kernels/rocm/math_kernel_op_vec.hip.cu
108108
source_base/kernels/rocm/math_ylm_op.hip.cu

source/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ test:
222222

223223
pw $(BIN_DIR)/${VERSION}-PW.x:
224224
@ if [ ! -d $(BIN_DIR) ]; then mkdir $(BIN_DIR); fi
225-
@ cd source_pw/hamilt_pwdft; $(MAKE) CXX=${CXX} GPU=${GPU} DEBUG=$(DEBUG) FFTW_DIR=$(FFTW_DIR) OPENBLAS_LIB_DIR=$(OPENBLAS_LIB_DIR) ${PWTAG}
226-
@ cp source_pw/hamilt_pwdft/${VERSION}-PW.x $(BIN_DIR)/${VERSION}-PW.x
225+
@ cd source_pw/module_pwdft; $(MAKE) CXX=${CXX} GPU=${GPU} DEBUG=$(DEBUG) FFTW_DIR=$(FFTW_DIR) OPENBLAS_LIB_DIR=$(OPENBLAS_LIB_DIR) ${PWTAG}
226+
@ cp source_pw/module_pwdft/${VERSION}-PW.x $(BIN_DIR)/${VERSION}-PW.x
227227

228228
$(BIN_DIR)/${VERSION}.$(suffix) : ${FP_OBJS} ${PDIAG_OBJS} ${HEADERS}
229229
${CXX} ${OPTS} ${OPTS_MPI} $(FP_OBJS) ${PDIAG_OBJS} ${LIBS} -o $(BIN_DIR)/${VERSION}.$(suffix)
@@ -239,4 +239,4 @@ ${OBJ_DIR}/%.o:%.cpp
239239
clean:
240240
@ if [ -d $(OBJ_DIR) ]; then rm -rf $(OBJ_DIR); fi
241241
@ if [ -d $(BIN_DIR) ]; then rm -rf $(BIN_DIR); fi
242-
@ cd source_pw/hamilt_pwdft; make clean
242+
@ cd source_pw/module_pwdft; make clean

source/Makefile.Objects

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,16 @@ VPATH=./src_global:\
4646
./source_hamilt/module_surchem:\
4747
./source_hamilt/module_xc:\
4848
./source_hamilt/module_xc/kernels:\
49-
./source_pw/hamilt_pwdft:\
50-
./source_pw/hamilt_ofdft:\
51-
./source_pw/hamilt_stodft:\
52-
./source_pw/hamilt_pwdft/operator_pw:\
53-
./source_pw/hamilt_pwdft/kernels:\
54-
./source_pw/hamilt_pwdft/module_exx_helper:\
55-
./source_pw/hamilt_stodft/kernels:\
49+
./source_pw/module_pwdft:\
50+
./source_pw/module_ofdft:\
51+
./source_pw/module_stodft:\
52+
./source_pw/module_pwdft/operator_pw:\
53+
./source_pw/module_pwdft/kernels:\
54+
./source_pw/module_pwdft/module_exx_helper:\
55+
./source_pw/module_stodft/kernels:\
5656
./source_lcao/module_hcontainer:\
5757
./source_lcao/hamilt_lcaodft:\
58-
./source_lcao/module_tddft:\
58+
./source_lcao/module_rt:\
5959
./source_lcao/module_deepks:\
6060
./source_lcao/module_dftu:\
6161
./source_lcao/module_deltaspin:\

source/module_lr/lr_spectrum.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include "source_estate/module_dm/density_matrix.h"
66
#include "module_lr/utils/lr_util.h"
77
#include "source_basis/module_nao/two_center_bundle.h"
8-
#include "source_lcao/module_tddft/td_current.h"
8+
#include "source_lcao/module_rt/td_current.h"
99
namespace LR
1010
{
1111
template<typename T>

source/module_lr/operator_casida/operator_lr_hxc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// #include "source_lcao/hamilt_lcaodft/DM_gamma_2d_to_grid.h"
1010
#include "source_lcao/module_hcontainer/hcontainer_funcs.h"
1111
#include "module_lr/ao_to_mo_transformer/ao_to_mo.h"
12-
#include "source_pw/hamilt_pwdft/global.h"
12+
#include "source_pw/module_pwdft/global.h"
1313
#include "source_lcao/module_gint/temp_gint/gint_interface.h"
1414

1515
inline double conj(double a) { return a; }

source/module_lr/potentials/pot_hxc_lrtd.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <set>
77
#include "module_lr/utils/lr_util.h"
88
#include "module_lr/utils/lr_util_xc.hpp"
9-
#include "source_pw/hamilt_pwdft/global.h" // tmp, for pgrid
9+
#include "source_pw/module_pwdft/global.h" // tmp, for pgrid
1010
#define FXC_PARA_TYPE const double* const rho, ModuleBase::matrix& v_eff, const std::vector<int>& ispin_op = { 0,0 }
1111
namespace LR
1212
{

source/module_lr/potentials/xc_kernel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
22
#include "source_basis/module_pw/pw_basis.h"
33
#include "source_cell/unitcell.h"
4-
#include "source_pw/hamilt_pwdft/parallel_grid.h"
4+
#include "source_pw/module_pwdft/parallel_grid.h"
55
#include "source_estate/module_charge/charge.h"
66
#define CREF(x) const std::vector<double>& x = x##_;
77
#define CREF3(x) const std::vector<ModuleBase::Vector3<double>>& x = x##_;

source/module_lr/utils/gint_move.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include "source_lcao/module_gint/grid_technique.h"
66

77
// Here will be the only place where GlobalCs are used (to be moved) in module_lr
8-
#include "source_pw/hamilt_pwdft/global.h"
8+
#include "source_pw/module_pwdft/global.h"
99

1010
template <typename T>
1111
using D2 = void(*) (T**, size_t);

0 commit comments

Comments
 (0)