Skip to content

Commit 4da3c34

Browse files
committed
Merge branch 'develop' into deepks_append_npy
2 parents 2a31da8 + 7f417b2 commit 4da3c34

File tree

779 files changed

+2203
-1166
lines changed

Some content is hidden

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

779 files changed

+2203
-1166
lines changed

docs/CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ For those who are interested in the source code, the following figure shows the
4646
| | (4) Utility functions: timer, random number generator, etc.
4747
| | (5) Global parameters: input parameters, element names, mathematical and physical constants.
4848
| |-- module_container The container module for storing data and performing operations on them and on different architectures.
49-
|-- module_basis Basis means the basis set to expand the wave function.
49+
|-- source_basis Basis means the basis set to expand the wave function.
5050
| |-- module_ao Atomic orbital basis set to be refactored.
5151
| |-- module_nao New numerical atomic orbital basis set for two-center integrals in LCAO calculations
5252
| `-- module_pw Data structures and relevant methods for planewave involved calculations
53-
|-- module_cell The module for defining the unit cell and its operations, and reading pseudopotentials.
53+
|-- source_cell The module for defining the unit cell and its operations, and reading pseudopotentials.
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.
@@ -257,7 +257,7 @@ To add a unit test:
257257
./cell_unitcell_test
258258
```
259259
260-
under the directory of `build/source/module_cell/test` to run the test `cell_unitcell_test`.
260+
under the directory of `build/source/source_cell/test` to run the test `cell_unitcell_test`.
261261
However, it is more convenient to run unit tests with `ctest` command under the `build` directory. You can check all unit tests by
262262
263263
```bash

docs/advanced/input_files/input-main.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2146,7 +2146,7 @@ Warning: this function is not robust enough for the current version. Please try
21462146
- **Description**: Print labels and descriptors for DeePKS in OUT.${suffix}. The names of these files start with "deepks".
21472147
- 0 : No output.
21482148
- 1 : Output intermediate files needed during DeePKS training.
2149-
- 2 : Output target labels for label preperation. The label files are named as `deepks_<property>.npy`, where the units and formats are the same as label files `<property>.npy` required for training, except that the first dimension (`nframes`) is excluded. System structrue files are also given in `deepks_atom.npy` and `deepks_box.npy` in the unit of *Bohr*, which means `lattice_constant` should be set to 1 when training.
2149+
- 2 : Output target labels for label preperation. The label files are named as `deepks_<property>.npy` or `deepks_<property>.csr`, where the units and formats are the same as label files `<property>.npy` or `<property>.csr` required for training, except that the first dimension (`nframes`) is excluded. System structrue files are also given in `deepks_atom.npy` and `deepks_box.npy` in the unit of *Bohr*, which means `lattice_constant` should be set to 1 when training.
21502150
- **Note**: When `deepks_out_labels` equals **1**, the path of a numerical descriptor (an `orb` file) is needed to be specified under the `NUMERICAL_DESCRIPTOR` tag in the `STRU` file. For example:
21512151

21522152
```text
@@ -2260,8 +2260,11 @@ Warning: this function is not robust enough for the current version. Please try
22602260

22612261
- **Type**: int
22622262
- **Availability**: numerical atomic orbital basis
2263-
- **Description**: Include V_delta label for DeePKS training. When `deepks_out_labels` is true and `deepks_v_delta` > 0, ABACUS will output h_base.npy, v_delta.npy and h_tot.npy(h_tot=h_base+v_delta).
2264-
Meanwhile, when `deepks_v_delta` equals 1, ABACUS will also output v_delta_precalc.npy, which is used to calculate V_delta during DeePKS training. However, when the number of atoms grows, the size of v_delta_precalc.npy will be very large. In this case, it's recommended to set `deepks_v_delta` as 2, and ABACUS will output phialpha.npy and grad_evdm.npy but not v_delta_precalc.npy. These two files are small and can be used to calculate v_delta_precalc in the procedure of training DeePKS.
2263+
- **Description**: Include V_delta/V_delta_R (Hamiltonian in k/real space) label for DeePKS training. When `deepks_out_labels` is true and `deepks_v_delta` > 0 (k space), ABACUS will output `deepks_hbase.npy`, `deepks_vdelta.npy` and `deepks_htot.npy`(htot=hbase+vdelta). When `deepks_out_labels` is true and `deepks_v_delta` < 0 (real space), ABACUS will output `deepks_hrtot.csr`, `deepks_hrdelta.csr`. Some more files output for different settings.
2264+
- `deepks_v_delta` = 1: `deepks_vdpre.npy`, which is used to calculate V_delta during DeePKS training.
2265+
- `deepks_v_delta` = 2: `deepks_phialpha.npy` and `deepks_gevdm.npy`, which can be used to calculate `deepks_vdpre.npy`. A recommanded method for memory saving.
2266+
- `deepks_v_delta` = -1: `deepks_vdrpre.npy`, which is used to calculate V_delta_R during DeePKS training.
2267+
- `deepks_v_delta` = -2: `deepks_phialpha_r.npy` and `deepks_gevdm.npy`, which can be used to calculate `deepks_vdrpre.npy`. A recommanded method for memory saving.
22652268
- **Default**: 0
22662269

22672270
### deepks_out_unittest

python/pyabacus/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ find_package(pybind11 CONFIG REQUIRED)
1313
# set source path
1414
set(ABACUS_SOURCE_DIR "${PROJECT_SOURCE_DIR}/../../source")
1515
set(BASE_PATH "${ABACUS_SOURCE_DIR}/source_base")
16-
set(NAO_PATH "${ABACUS_SOURCE_DIR}/module_basis/module_nao")
16+
set(NAO_PATH "${ABACUS_SOURCE_DIR}/source_basis/module_nao")
1717
set(HSOLVER_PATH "${ABACUS_SOURCE_DIR}/source_hsolver")
1818
set(PSI_PATH "${ABACUS_SOURCE_DIR}/module_psi")
1919
set(ENABLE_LCAO ON)
@@ -82,7 +82,7 @@ set(PARAMETER_BINARY_DIR "${PROJECT_SOURCE_DIR}/build/parameter")
8282
add_subdirectory(${ABACUS_SOURCE_DIR}/module_parameter ${PARAMETER_BINARY_DIR})
8383
# add orb
8484
set(ORB_BINARY_DIR "${PROJECT_SOURCE_DIR}/build/orb")
85-
add_subdirectory(${ABACUS_SOURCE_DIR}/module_basis/module_ao ${ORB_BINARY_DIR})
85+
add_subdirectory(${ABACUS_SOURCE_DIR}/source_basis/module_ao ${ORB_BINARY_DIR})
8686
# set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
8787

8888
# set RPATH

python/pyabacus/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ find_package(pybind11 CONFIG REQUIRED)
7373
# Set source path
7474
set(ABACUS_SOURCE_DIR "${PROJECT_SOURCE_DIR}/../../source")
7575
set(BASE_PATH "${ABACUS_SOURCE_DIR}/source_base")
76-
set(NAO_PATH "${ABACUS_SOURCE_DIR}/module_basis/module_nao")
76+
set(NAO_PATH "${ABACUS_SOURCE_DIR}/source_basis/module_nao")
7777
set(HSOLVER_PATH "${ABACUS_SOURCE_DIR}/source_hsolver")
7878
set(PSI_PATH "${ABACUS_SOURCE_DIR}/module_psi")
7979
set(ENABLE_LCAO ON)
@@ -147,7 +147,7 @@ set(PARAMETER_BINARY_DIR "${PROJECT_SOURCE_DIR}/build/parameter")
147147
add_subdirectory(${ABACUS_SOURCE_DIR}/module_parameter ${PARAMETER_BINARY_DIR})
148148
# Add orb
149149
set(ORB_BINARY_DIR "${PROJECT_SOURCE_DIR}/build/orb")
150-
add_subdirectory(${ABACUS_SOURCE_DIR}/module_basis/module_ao ${ORB_BINARY_DIR})
150+
add_subdirectory(${ABACUS_SOURCE_DIR}/source_basis/module_ao ${ORB_BINARY_DIR})
151151
```
152152
- This section sets the position-independent code flag and adds subdirectories for the base, parameter, and orb modules. It specifies the build directories for these modules.
153153

python/pyabacus/src/ModuleNAO/py_m_nao.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#include <pybind11/stl.h>
44

55
#include "source_base/vector3.h"
6-
#include "module_basis/module_nao/radial_collection.h"
7-
#include "module_basis/module_nao/two_center_integrator.h"
6+
#include "source_basis/module_nao/radial_collection.h"
7+
#include "source_basis/module_nao/two_center_integrator.h"
88

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

python/pyabacus/src/py_numerical_radial.cpp

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

4-
#include "module_basis/module_nao/numerical_radial.h"
4+
#include "source_basis/module_nao/numerical_radial.h"
55

66
namespace py = pybind11;
77
using namespace pybind11::literals;

source/CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
add_subdirectory(source_base)
2-
add_subdirectory(module_cell)
2+
add_subdirectory(source_cell)
33
add_subdirectory(module_psi)
44
add_subdirectory(module_elecstate)
55
add_subdirectory(module_hamilt_general)
66
add_subdirectory(module_hamilt_pw)
77
add_subdirectory(module_hamilt_lcao)
88
add_subdirectory(source_hsolver)
9-
add_subdirectory(module_basis/module_ao)
10-
add_subdirectory(module_basis/module_nao)
9+
add_subdirectory(source_basis/module_ao)
10+
add_subdirectory(source_basis/module_nao)
1111
add_subdirectory(module_md)
12-
add_subdirectory(module_basis/module_pw)
12+
add_subdirectory(source_basis/module_pw)
1313
add_subdirectory(source_esolver)
1414
add_subdirectory(module_hamilt_lcao/module_gint)
1515
add_subdirectory(module_io)
@@ -34,7 +34,7 @@ list(APPEND device_srcs
3434
module_hamilt_pw/hamilt_pwdft/kernels/ekinetic_op.cpp
3535
module_hamilt_pw/hamilt_pwdft/kernels/meta_op.cpp
3636
module_hamilt_pw/hamilt_stodft/kernels/hpsi_norm_op.cpp
37-
module_basis/module_pw/kernels/pw_op.cpp
37+
source_basis/module_pw/kernels/pw_op.cpp
3838
source_hsolver/kernels/dngvd_op.cpp
3939
source_hsolver/kernels/bpcg_kernel_op.cpp
4040
module_elecstate/kernels/elecstate_op.cpp
@@ -64,7 +64,7 @@ if(USE_CUDA)
6464
module_hamilt_pw/hamilt_pwdft/kernels/cuda/meta_op.cu
6565
module_hamilt_pw/hamilt_stodft/kernels/cuda/hpsi_norm_op.cu
6666
module_hamilt_pw/hamilt_pwdft/kernels/cuda/onsite_op.cu
67-
module_basis/module_pw/kernels/cuda/pw_op.cu
67+
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
7070
module_elecstate/kernels/cuda/elecstate_op.cu
@@ -91,7 +91,7 @@ if(USE_ROCM)
9191
module_hamilt_pw/hamilt_pwdft/kernels/rocm/meta_op.hip.cu
9292
module_hamilt_pw/hamilt_pwdft/kernels/rocm/onsite_op.hip.cu
9393
module_hamilt_pw/hamilt_stodft/kernels/rocm/hpsi_norm_op.hip.cu
94-
module_basis/module_pw/kernels/rocm/pw_op.hip.cu
94+
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
9797
module_elecstate/kernels/rocm/elecstate_op.hip.cu

source/Makefile.Objects

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ HEADERS = source_main/*.h
1313

1414
VPATH=./src_global:\
1515
./source_main:\
16-
./module_basis/module_ao:\
17-
./module_basis/module_nao:\
18-
./module_cell/module_neighbor:\
19-
./module_cell/module_symmetry:\
20-
./module_cell:\
16+
./source_basis/module_ao:\
17+
./source_basis/module_nao:\
18+
./source_cell/module_neighbor:\
19+
./source_cell/module_symmetry:\
20+
./source_cell:\
2121
./source_base:\
2222
./source_base/kernels:\
2323
./source_base/module_container/base/core:\
@@ -27,8 +27,8 @@ VPATH=./src_global:\
2727
./source_base/module_device:\
2828
./source_base/module_mixing:\
2929
./module_md:\
30-
./module_basis/module_pw:\
31-
./module_basis/module_pw/module_fft:\
30+
./source_basis/module_pw:\
31+
./source_basis/module_pw/module_fft:\
3232
./source_esolver:\
3333
./source_hsolver:\
3434
./source_hsolver/kernels:\

source/module_elecstate/cal_nelec_nband.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef CAL_NELEC_NBAND_H
22
#define CAL_NELEC_NBAND_H
33

4-
#include "module_cell/atom_spec.h"
4+
#include "source_cell/atom_spec.h"
55

66
namespace elecstate {
77

source/module_elecstate/cal_ux.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef CAL_UX_H
22
#define CAL_UX_H
33

4-
#include "module_cell/unitcell.h"
4+
#include "source_cell/unitcell.h"
55

66
namespace elecstate {
77

0 commit comments

Comments
 (0)