Skip to content

Commit abcb9f2

Browse files
authored
[Refactor] Rename module_base to source_base (#6311)
* Rename module_base to source_base * Update Makefile
1 parent a145293 commit abcb9f2

File tree

1,259 files changed

+2530
-2528
lines changed

Some content is hidden

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

1,259 files changed

+2530
-2528
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ set(ABACUS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/source)
167167
set(ABACUS_TEST_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tests)
168168
set(ABACUS_BIN_PATH ${CMAKE_CURRENT_BINARY_DIR}/${ABACUS_BIN_NAME})
169169
include_directories(${ABACUS_SOURCE_DIR})
170-
include_directories(${ABACUS_SOURCE_DIR}/module_base/module_container)
170+
include_directories(${ABACUS_SOURCE_DIR}/source_base/module_container)
171171

172172
set(CMAKE_CXX_STANDARD 11)
173173
set(CMAKE_CXX_STANDARD_REQUIRED ON)

docs/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The source code of ABACUS is based on several modules. Under the ABACUS root dir
3939
For those who are interested in the source code, the following figure shows the structure of the source code.
4040

4141
```text
42-
|-- module_base A basic module including
42+
|-- source_base A basic module including
4343
| | (1) Mathematical library interface functions: BLAS, LAPACK, Scalapack;
4444
| | (2) Custom data classes: matrix, vector definitions and related functions;
4545
| | (3) Parallelization functions: MPI, OpenMP;
@@ -183,7 +183,7 @@ pre-commit install
183183

184184
## Adding a unit test
185185

186-
We use [GoogleTest](https://github.com/google/googletest) as our test framework. Write your test under the corresponding module folder at `abacus-develop/tests`, then append the test to `tests/CMakeLists.txt`. If there are currently no unit tests provided for the module, do as follows. `module_base` provides a simple demonstration.
186+
We use [GoogleTest](https://github.com/google/googletest) as our test framework. Write your test under the corresponding module folder at `abacus-develop/tests`, then append the test to `tests/CMakeLists.txt`. If there are currently no unit tests provided for the module, do as follows. `source_base` provides a simple demonstration.
187187

188188
- Add a folder named `test` under the module.
189189
- Append the content below to `CMakeLists.txt` of the module:

python/pyabacus/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ find_package(pybind11 CONFIG REQUIRED)
1212

1313
# set source path
1414
set(ABACUS_SOURCE_DIR "${PROJECT_SOURCE_DIR}/../../source")
15-
set(BASE_PATH "${ABACUS_SOURCE_DIR}/module_base")
15+
set(BASE_PATH "${ABACUS_SOURCE_DIR}/source_base")
1616
set(NAO_PATH "${ABACUS_SOURCE_DIR}/module_basis/module_nao")
1717
set(HSOLVER_PATH "${ABACUS_SOURCE_DIR}/source_hsolver")
1818
set(PSI_PATH "${ABACUS_SOURCE_DIR}/module_psi")
@@ -69,14 +69,14 @@ endif()
6969
include_directories(
7070
${BASE_PATH}
7171
${ABACUS_SOURCE_DIR}
72-
${ABACUS_SOURCE_DIR}/module_base/module_container
72+
${ABACUS_SOURCE_DIR}/source_base/module_container
7373
)
7474

7575
# add basic libraries
7676
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
7777
# add base
7878
set(BASE_BINARY_DIR "${PROJECT_SOURCE_DIR}/build/base")
79-
add_subdirectory(${ABACUS_SOURCE_DIR}/module_base ${BASE_BINARY_DIR})
79+
add_subdirectory(${ABACUS_SOURCE_DIR}/source_base ${BASE_BINARY_DIR})
8080
# add parameter
8181
set(PARAMETER_BINARY_DIR "${PROJECT_SOURCE_DIR}/build/parameter")
8282
add_subdirectory(${ABACUS_SOURCE_DIR}/module_parameter ${PARAMETER_BINARY_DIR})

python/pyabacus/CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ find_package(pybind11 CONFIG REQUIRED)
7272
```cmake
7373
# Set source path
7474
set(ABACUS_SOURCE_DIR "${PROJECT_SOURCE_DIR}/../../source")
75-
set(BASE_PATH "${ABACUS_SOURCE_DIR}/module_base")
75+
set(BASE_PATH "${ABACUS_SOURCE_DIR}/source_base")
7676
set(NAO_PATH "${ABACUS_SOURCE_DIR}/module_basis/module_nao")
7777
set(HSOLVER_PATH "${ABACUS_SOURCE_DIR}/source_hsolver")
7878
set(PSI_PATH "${ABACUS_SOURCE_DIR}/module_psi")
@@ -131,7 +131,7 @@ endif()
131131
include_directories(
132132
${BASE_PATH}
133133
${ABACUS_SOURCE_DIR}
134-
${ABACUS_SOURCE_DIR}/module_base/module_container
134+
${ABACUS_SOURCE_DIR}/source_base/module_container
135135
)
136136
```
137137
- This section adds the necessary include directories for the project.
@@ -141,7 +141,7 @@ include_directories(
141141
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
142142
# Add base
143143
set(BASE_BINARY_DIR "${PROJECT_SOURCE_DIR}/build/base")
144-
add_subdirectory(${ABACUS_SOURCE_DIR}/module_base ${BASE_BINARY_DIR})
144+
add_subdirectory(${ABACUS_SOURCE_DIR}/source_base ${BASE_BINARY_DIR})
145145
# Add parameter
146146
set(PARAMETER_BINARY_DIR "${PROJECT_SOURCE_DIR}/build/parameter")
147147
add_subdirectory(${ABACUS_SOURCE_DIR}/module_parameter ${PARAMETER_BINARY_DIR})

python/pyabacus/examples/indexmap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def _index_map(ntype, natom, lmax, nzeta=None):
6060
6161
0, 1, -1, 2, -2, 3, -3, ..., l, -l
6262
63-
(see module_base/ylm.cpp and module_base/math_ylmreal.cpp
63+
(see source_base/ylm.cpp and source_base/math_ylmreal.cpp
6464
for details)
6565
6666
'''

python/pyabacus/src/ModuleBase/py_base_math.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#include <pybind11/numpy.h>
22
#include <pybind11/pybind11.h>
33

4-
#include "module_base/math_sphbes.h"
5-
#include "module_base/math_integral.h"
6-
#include "module_base/spherical_bessel_transformer.h"
4+
#include "source_base/math_sphbes.h"
5+
#include "source_base/math_integral.h"
6+
#include "source_base/spherical_bessel_transformer.h"
77

88
namespace py = pybind11;
99
using namespace pybind11::literals;

python/pyabacus/src/ModuleNAO/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ list(APPEND _naos
1313
${NAO_PATH}/two_center_integrator.cpp
1414
${NAO_PATH}/two_center_table.cpp
1515
# dependency
16-
${ABACUS_SOURCE_DIR}/module_base/kernels/math_ylm_op.cpp
17-
${ABACUS_SOURCE_DIR}/module_base/kernels/math_kernel_op.cpp
18-
${ABACUS_SOURCE_DIR}/module_base/kernels/math_kernel_op_vec.cpp
16+
${ABACUS_SOURCE_DIR}/source_base/kernels/math_ylm_op.cpp
17+
${ABACUS_SOURCE_DIR}/source_base/kernels/math_kernel_op.cpp
18+
${ABACUS_SOURCE_DIR}/source_base/kernels/math_kernel_op_vec.cpp
1919
# ${ABACUS_SOURCE_DIR}/module_psi/kernels/psi_memory_op.cpp
20-
${ABACUS_SOURCE_DIR}/module_base/module_device/memory_op.cpp
21-
${ABACUS_SOURCE_DIR}/module_base/module_device/device.cpp
20+
${ABACUS_SOURCE_DIR}/source_base/module_device/memory_op.cpp
21+
${ABACUS_SOURCE_DIR}/source_base/module_device/device.cpp
2222
)
2323
add_library(naopack SHARED
2424
${_naos}

python/pyabacus/src/ModuleNAO/py_m_nao.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include <pybind11/pybind11.h>
33
#include <pybind11/stl.h>
44

5-
#include "module_base/vector3.h"
5+
#include "source_base/vector3.h"
66
#include "module_basis/module_nao/radial_collection.h"
77
#include "module_basis/module_nao/two_center_integrator.h"
88

python/pyabacus/src/hsolver/py_diago_cg.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include <ATen/core/tensor_types.h>
1616

1717
#include "source_hsolver/diago_cg.h"
18-
#include "module_base/module_device/memory_op.h"
18+
#include "source_base/module_device/memory_op.h"
1919

2020
namespace py = pybind11;
2121

python/pyabacus/src/hsolver/py_hsolver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
#include <pybind11/numpy.h>
77

88
#include "source_hsolver/diago_dav_subspace.h"
9-
#include "module_base/kernels/math_kernel_op.h"
10-
#include "module_base/module_device/types.h"
9+
#include "source_base/kernels/math_kernel_op.h"
10+
#include "source_base/module_device/types.h"
1111

1212
#include "./py_diago_dav_subspace.hpp"
1313
#include "./py_diago_david.hpp"

0 commit comments

Comments
 (0)