Skip to content

Commit d6669c1

Browse files
authored
Merge pull request #116 from dyzheng/new
Merge deepmodeling/abacus-develop to abacusmodeling
2 parents 6bfe505 + 03c335b commit d6669c1

File tree

1,121 files changed

+257294
-19118
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,121 files changed

+257294
-19118
lines changed

.github/workflows/dynamic.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Dynamic Analysis
22

33
on:
44
schedule:
5-
- cron: '0 20 * * *'
5+
- cron: '0 3 * * *'
66
workflow_dispatch:
77
inputs:
88
name:
@@ -14,6 +14,7 @@ jobs:
1414
test:
1515
name: Do the job on the runner
1616
runs-on: self-hosted
17+
if: github.repository_owner == 'deepmodeling'
1718
container: ghcr.io/deepmodeling/abacus-development-kit:gnu
1819
steps:
1920
- name: Checkout

.github/workflows/static.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
jobs:
77
clang-tidy:
88
runs-on: self-hosted
9+
if: github.repository_owner == 'deepmodeling'
910
container: ghcr.io/deepmodeling/abacus-development-kit:gnu
1011
steps:
1112
- name: Checkout Pull Request

.github/workflows/test.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,19 @@ on:
44
pull_request_target:
55
branches:
66
- develop
7+
- tryEigen
78
- update_MD
89
- ABACUS_2.2.0_beta
910
- deepks
1011
- planewave
11-
jobs:
12+
- pw_refactor
13+
- TDDFT
1214

15+
jobs:
1316
test:
1417
name: Do the job on the runner
1518
runs-on: self-hosted
19+
if: github.repository_owner == 'deepmodeling'
1620
container: ghcr.io/deepmodeling/abacus-development-kit:gnu
1721
steps:
1822
- name: Checkout
@@ -23,7 +27,7 @@ jobs:
2327
env:
2428
GTEST_COLOR: 'yes'
2529
run: |
26-
cmake -B build -DBUILD_TESTING=ON
30+
cmake -B build -DBUILD_TESTING=ON -DENABLE_DEEPKS=ON
2731
cmake --build build -j8
2832
cmake --install build
2933
cmake --build build --target test ARGS="-V"

CMakeLists.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,14 @@ else()
167167
message(WARNING "Cannot find the correct library for Fortran.")
168168
endif()
169169
endif()
170-
target_link_libraries(${ABACUS_BIN_NAME} ${math_libs})
171170

172171
if(ENABLE_DEEPKS)
173172
set(CMAKE_CXX_STANDARD 14)
174173
find_package(Torch REQUIRED)
175174
include_directories(${TORCH_INCLUDE_DIRS})
176-
target_link_libraries(${ABACUS_BIN_NAME} ${TORCH_LIBRARIES})
175+
target_link_libraries(${ABACUS_BIN_NAME} deepks)
176+
list(APPEND math_libs ${TORCH_LIBRARIES})
177+
177178
add_compile_options(${TORCH_CXX_FLAGS})
178179

179180
find_path(libnpy_SOURCE_DIR
@@ -192,6 +193,8 @@ if(ENABLE_DEEPKS)
192193
add_compile_definitions(__DEEPKS)
193194
endif()
194195

196+
target_link_libraries(${ABACUS_BIN_NAME} ${math_libs})
197+
195198
if(DEFINED Libxc_DIR)
196199
set(ENABLE_LIBXC ON)
197200
endif()
@@ -226,7 +229,7 @@ IF (BUILD_TESTING)
226229
find_package(Threads)
227230
set(CMAKE_CXX_STANDARD_REQUIRED ON)
228231
find_package(GTest HINTS /usr/local/lib/ ${GTEST_DIR})
229-
if(NOT DEFINED ${GTest_FOUND})
232+
if(NOT ${GTest_FOUND})
230233
include(FetchContent)
231234
FetchContent_Declare(
232235
googletest
@@ -260,7 +263,6 @@ target_link_libraries(${ABACUS_BIN_NAME}
260263
cell
261264
symmetry
262265
md
263-
symmetry
264266
neighbor
265267
orb
266268
io
@@ -272,6 +274,8 @@ target_link_libraries(${ABACUS_BIN_NAME}
272274
pw
273275
ri
274276
driver
277+
xc
278+
esolver
275279
-lm
276280
)
277281

Dockerfile.intel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ RUN source /opt/intel/oneapi/setvars.sh \
3838
&& wget https://elpa.mpcdf.mpg.de/software/tarball-archive/Releases/2021.05.002/elpa-2021.05.002.tar.gz \
3939
&& tar xzf elpa-2021.05.002.tar.gz && rm elpa-2021.05.002.tar.gz \
4040
&& cd elpa-2021.05.002 && mkdir build && cd build \
41-
&& ../configure FCFLAGS="-mkl=cluster" \
41+
&& ../configure FCFLAGS="-qmkl=cluster" \
4242
&& make -j8 \
4343
&& make PREFIX=/usr/local install \
4444
&& ln -s /usr/local/include/elpa-2021.05.002/elpa /usr/local/include/ \

doc/developers.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ To add a unit test:
4646
AddTest(
4747
TARGET <module_name>_<test_name> # this is the executable file name of the test
4848
SOURCES <test_name>.cpp
49+
50+
# OPTIONAL: if this test requires external libraries, add them with "LIBS" statement.
51+
LIBS math_libs # `math_libs` includes all math libraries in ABACUS.
4952
)
5053
```
5154

doc/examples/band-struc.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
This example shows how to calculate the energy band structure. Similar to the [DOS case](#dos.md), we first, do a ground-state energy calculation as in [this example](#basic-lcao.md) ***with one additional keyword in the INPUT file***:
66

77
```
8-
out_charge 1
8+
out_chg 1
99
```
1010

1111
this will produce the converged charge density, which is contained in the file SPIN1_CHG. Copy the file along with the `STRU` file, the pseudopotential file and the atomic orbital file (and the local density matrix file onsite.dm if DFT+U is used) to the new working directory where we will do a non-self-consistent calculation. In this example, the potential is constructed from the ground-state charge density from the proceeding calculation. Now the INPUT file is like:
@@ -20,17 +20,17 @@ read_file_dir ./
2020
2121
#Parameters (Accuracy)
2222
ecutwfc 60
23-
niter 50
24-
dr2 1.0e-9
25-
ethr 1.0e-7
23+
scf_nmax 50
24+
scf_thr 1.0e-9
25+
pw_diag_thr 1.0e-7
2626
2727
#Parameters (File)
28-
start_charge file
28+
init_chg file
2929
out_band 1
3030
3131
#Parameters (Smearing)
32-
smearing gaussian
33-
sigma 0.02
32+
smearing_method gaussian
33+
smearing_sigma 0.02
3434
```
3535

3636
Here the the relevant k-point file KPT looks like,

doc/examples/basic-lcao.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ basis:
5252
---------------------------------------------------------
5353
SELF-CONSISTENT :
5454
---------------------------------------------------------
55-
ITER ETOT(eV) EDIFF(eV) DRHO2 TIME(s)
55+
ITER ETOT(eV) EDIFF(eV) SCF_THR TIME(s)
5656
GE1 -2.138667e+02 0.000000e+00 1.652e-01 4.690e+00
5757
GE2 -2.139153e+02 -4.859216e-02 3.480e-02 4.970e+00
5858
GE3 -2.139161e+02 -8.407097e-04 4.131e-03 4.760e+00

doc/examples/basic-pw.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ For this example, the input files are:
1515
basis_type pw
1616
suffix Si2_diamond
1717
symmetry 1
18-
niter 60
19-
dr2 1.0e-9
20-
out_charge 1
18+
scf_nmax 60
19+
scf_thr 1.0e-9
20+
out_chg 1
2121
```
2222
2323
The meanings of the above parameters are:
@@ -48,11 +48,11 @@ For this example, the input files are:
4848
4949
Use symmetry(=1) or not(=0) in the calculation. The default value is 0.
5050
51-
- niter
51+
- scf_nmax
5252
The maximal iteration number for electronic-structure calculations.
53-
- dr2
53+
- scf_thr
5454
Tolerance of the difference of charge density, below which the self-consistent calculation is considered to be converged.
55-
- out_charge
55+
- out_chg
5656
Print out the charge density(=1) or not(=0).
5757
5858
A complete list of INPUT keyewords can be found in the [instruction](../input-main.md).
@@ -131,7 +131,7 @@ The following typical output information will be printed to the screen:
131131
-------------------------------------------
132132
SELF-CONSISTENT :
133133
-------------------------------------------
134-
ITER ETOT(eV) EDIFF(eV) DRHO2 CG_ITER TIME(S)
134+
ITER ETOT(eV) EDIFF(eV) SCF_THR CG_ITER TIME(S)
135135
CG1 -2.154524e+02 0.000000e+00 6.855e-02 1.000e+00 1.290e+00
136136
CG2 -2.154992e+02 -4.673475e-02 2.378e-03 2.000e+00 8.400e-01
137137
CG3 -2.155050e+02 -5.882715e-03 8.220e-05 2.594e+00 9.000e-01

doc/examples/berry-phase.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ suffix PbTiO3
2525
ntype 3
2626
nbands 25 // number of bands
2727
ecutwfc 50 // Ry
28-
niter 20
28+
scf_nmax 20
2929
symmetry 0 // turn off symmetry
30-
ethr 1e-10
31-
smearing gaussian // gaussian smearing
32-
sigma 0.002 // Ry
30+
pw_diag_thr 1e-10
31+
smearing_method gaussian // gaussian smearing
32+
smearing_sigma 0.002 // Ry
3333
calculation nscf // non-self-consistent calculation
3434
basis_type lcao // atomic basis
35-
start_charge file // read charge from files
35+
init_chg file // read charge from files
3636
berry_phase 1 // calculate Berry phase
3737
gdir 3 // calculate polarization along c axis
3838
```

0 commit comments

Comments
 (0)