Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
be47750
Feature: output math lib info
caic99 Aug 5, 2022
c7bd18c
Feature: output math lib info into a file
caic99 Aug 6, 2022
805e79e
refactor : removed unnecessary cell layer
Aug 15, 2022
a065d9c
Merge branch 'develop' of github.com:deepmodeling/abacus-develop into…
Aug 15, 2022
6412588
refactor : unify init_esolver in driver.cpp
Aug 15, 2022
148b289
refactor : remove unused exx loop
Aug 15, 2022
570b52b
refactor : unify pw_line and lcao_line
Aug 15, 2022
d35a496
refactor : replace test_just_neighbour keyword
Aug 15, 2022
04aa1aa
refactor : rearranged some codes in the various
Aug 16, 2022
29e2756
fix : forgot to add driver_run.cpp in previous commit
Aug 16, 2022
6604150
fix : move pgird.init back to esolver_ks::init
Aug 16, 2022
61e7125
fix : revert Init in esolver_ks_lcao_tddft
Aug 16, 2022
f160674
refactor : move vdW inside Esolver
Aug 17, 2022
cafb414
feature: output math lib logs on all ranks.
caic99 Aug 17, 2022
34ab6a6
refactor : move outputting energy/potential to Esolver::postprocess
Aug 17, 2022
b292d98
refactor : unify ions.cpp and loop_ions.cpp a little bit
Aug 17, 2022
a95a9d2
fix : revert change to CASES
Aug 17, 2022
bd56c9e
fix : bug in loop_ions.cpp
Aug 17, 2022
407df18
refactor : tidy up ions.cpp
Aug 17, 2022
10d4523
fix : add 'othercalculation' in esolver_ks_pw
Aug 17, 2022
a56cc39
refactor : add some comments to codes
Aug 17, 2022
827ea44
refactor : merge ions.cpp and loop_ions.cpp
Aug 18, 2022
e9788b5
refactor : use atomic extrapolation for relaxation
Aug 18, 2022
e69c9a8
Feature: add new method for SDFT which needs small nche_sto
Qianruipku Aug 18, 2022
3aaf22e
add force correction of implicit solvation model
sunml99 Aug 18, 2022
e62485b
Merge with develop branch
Qianruipku Aug 18, 2022
9643594
add some comments
sunml99 Aug 18, 2022
e7722b7
change default method_sto; replace 2 with 3
Qianruipku Aug 18, 2022
cecbcdd
fix wrong default for method_sto
Qianruipku Aug 18, 2022
88f51bb
refactor : prepare to move charge extrapolation
Aug 18, 2022
c8c33f1
refactor : add some comment
Aug 18, 2022
673d008
fix memory leak
Qianruipku Aug 19, 2022
a7ea946
feature: build libxc in the absence of local install
caic99 Aug 18, 2022
65407e4
docs: fix dead links in deepks installation
caic99 Aug 19, 2022
27f2be8
docs: update ambiguous phrases
caic99 Aug 19, 2022
e92f03f
change renormalization of density in SDFT
Qianruipku Aug 19, 2022
84c95a2
docs: update gcc requirements
caic99 Aug 19, 2022
6b44d70
change case because previous one is different between gnu and intel c…
Qianruipku Aug 19, 2022
3bf4613
optimize Stochastic DOS of method_sto = 2
Qianruipku Aug 20, 2022
30286ca
Update docs/install.md
caic99 Aug 20, 2022
90ce545
Replace UFFT with FFT and fix makefile
sunml99 Aug 20, 2022
44d74fb
Merge branch 'develop' into develop
sunml99 Aug 20, 2022
064728a
Merge pull request #1173 from caic99/xc
dyzheng Aug 20, 2022
e139966
Merge pull request #1178 from deepmodeling/caic99-patch-2
dyzheng Aug 20, 2022
87bbbb5
Merge pull request #1172 from caic99/math_info
dyzheng Aug 20, 2022
20e5c1c
Merge pull request #1176 from deepmodeling/caic99-patch-1
dyzheng Aug 20, 2022
1e38c0b
Merge pull request #1180 from deepmodeling/caic99-patch-3
dyzheng Aug 20, 2022
e5a28d4
Fix: Veff error when MPI_threads larger than nz
dyzheng Aug 20, 2022
f08c638
Test: add test case for nz=3, add parameter test_skip_ewald for this …
dyzheng Aug 20, 2022
5d34fb1
add npart_sto to avoid using too much memory
Qianruipku Aug 21, 2022
c0f9734
Merge pull request #1179 from deepmodeling/SDFT
mohanchen Aug 21, 2022
d20b353
refactor : define new type of calculation "gen_jle"
Aug 22, 2022
040ef5a
optimize stochastic DOS and reduce a lot of time in loop
Qianruipku Aug 22, 2022
bdb17f0
change cout
Qianruipku Aug 23, 2022
889387c
Merge branch 'develop' of github.com:deepmodeling/abacus-develop into…
Aug 23, 2022
fcc8e8d
Fix: add CHECK_WARNING_QUIT function for reporting no plane wave error
dyzheng Aug 23, 2022
c1394c4
Fix: typo in annotation
dyzheng Aug 23, 2022
d8e205d
Merge branch 'develop' of github.com:deepmodeling/abacus-develop into…
dyzheng Aug 23, 2022
cc952b2
Merge pull request #1185 from deepmodeling/SDFT
Qianruipku Aug 23, 2022
94c011d
Fix: error for kpar != 1
dyzheng Aug 23, 2022
8e7040e
Merge branch 'develop' of github.com:deepmodeling/abacus-develop into…
dyzheng Aug 23, 2022
428e01f
gint : put charge extrapolation in Esolver
Aug 23, 2022
754a300
Merge pull request #1183 from dyzheng/develop
dyzheng Aug 23, 2022
babd750
Merge pull request #1174 from sunml99/develop
dyzheng Aug 23, 2022
79c9404
Merge branch 'develop' of github.com:deepmodeling/abacus-develop into…
Aug 23, 2022
e761300
Refactor: added template for Operator
dyzheng Aug 23, 2022
c2f57de
Merge branch 'develop' of github.com:deepmodeling/abacus-develop into…
dyzheng Aug 23, 2022
ec6b8ae
Merge pull request #1170 from wenfei-li/develop
wenfei-li Aug 23, 2022
41c573d
Merge branch 'develop' of github.com:deepmodeling/abacus-develop into…
dyzheng Aug 24, 2022
db57bfd
Merge branch 'develop' of github.com:abacusmodeling/abacus-develop in…
dyzheng Aug 24, 2022
aa8dde3
Merge branch 'develop' of github.com:deepmodeling/abacus-develop into…
dyzheng Aug 24, 2022
d5bfeaf
rewrite check_warning_quit
Qianruipku Aug 24, 2022
a60dbee
refactor : move init_after_vc to esolver
Aug 24, 2022
7e01f0f
Merge branch 'develop' of github.com:deepmodeling/abacus-develop into…
Aug 24, 2022
ff8fba1
refactor : renaming src_ions to module_relaxation
Aug 24, 2022
5169f08
fix bug when nproc > nz of scan
Qianruipku Aug 24, 2022
40ba632
delete input.h in too_quit.cpp
Qianruipku Aug 24, 2022
8bbd231
fix : update cmake file of test_deepks
Aug 24, 2022
85aa162
Merge pull request #1187 from Qianruipku/hotfix
Qianruipku Aug 24, 2022
0752886
Merge pull request #1177 from dyzheng/v2.2.3
hongriTianqi Aug 25, 2022
1a548f6
Refactor: modified Operator::hPsi(), hpsi memory arranged outside
dyzheng Aug 25, 2022
e15654f
Merge branch 'develop' of github.com:deepmodeling/abacus-develop into…
dyzheng Aug 25, 2022
5a6b1e3
fix : needs pw basis for envelope function
Aug 25, 2022
2193bbb
fix : in beforescf, use istep instead of istep - 1
Aug 25, 2022
ae4351e
fix : update reference value in 2nd order MD test cases
Aug 25, 2022
05425e6
example: add dpgen autotest example
hongriTianqi Aug 25, 2022
d742487
fix : makkefile
Aug 25, 2022
ebe8939
Merge pull request #1188 from deepmodeling/HSolver
dyzheng Aug 25, 2022
d3b22b1
Merge pull request #1189 from hongriTianqi/autotest
dyzheng Aug 25, 2022
d178ea4
Fix: updated key word of total time and replace "-eq" with "=="
dyzheng Aug 25, 2022
30c28c9
Merge pull request #1186 from wenfei-li/develop
dyzheng Aug 25, 2022
e69de05
Merge pull request #1190 from dyzheng/v2.2.3
hongriTianqi Aug 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ option(USE_OPENMP " Enable OpenMP in abacus." ON)
option(ENABLE_ASAN "Enable AddressSanitizer" OFF)
option(BUILD_TESTING "Build ABACUS unit tests" OFF)
option(GENERATE_TEST_REPORTS "Enable test report generation" OFF)
option(INFO "Enable gathering of math library information" OFF)

set(ABACUS_BIN_NAME abacus)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/modules)
Expand Down Expand Up @@ -217,7 +218,7 @@ if(ENABLE_DEEPKS)
HINTS ${libnpy_INCLUDE_DIR}
)
if(NOT libnpy_SOURCE_DIR)
include(FetchContent)
include(FetchContent)
FetchContent_Declare(
libnpy
GIT_REPOSITORY https://github.com/llohse/libnpy.git
Expand All @@ -237,14 +238,22 @@ if(DEFINED Libxc_DIR)
set(ENABLE_LIBXC ON)
endif()
if(ENABLE_LIBXC)
find_package(Libxc)
find_package(Libxc HINTS ${Libxc_DIR}/share/cmake/Libxc)
if(${Libxc_FOUND})
message("Using Libxc.")
add_compile_definitions(USE_LIBXC)
target_link_libraries(${ABACUS_BIN_NAME} Libxc::xc)
include_directories(${Libxc_INCLUDE_DIRS})
else()
message(WARNING "Will not use Libxc.")
include(FetchContent)
FetchContent_Declare(
Libxc
GIT_REPOSITORY https://gitlab.com/libxc/libxc.git
GIT_TAG "5.2.3"
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE
)
FetchContent_MakeAvailable(Libxc)
endif()
endif()

Expand All @@ -261,6 +270,12 @@ add_compile_definitions(
TEST_EXX_RADIAL=1
)

if(INFO)
message(STATUS "Will gather math lib info.")
add_compile_definitions(GATHER_INFO)
# modifications on blas_connector and lapack_connector
endif()

IF (BUILD_TESTING)
set(CMAKE_CXX_STANDARD 14) # Required in orbital
include(CTest)
Expand Down Expand Up @@ -310,7 +325,7 @@ target_link_libraries(${ABACUS_BIN_NAME}
neighbor
orb
io
ions
relax
lcao
gint
parallel
Expand All @@ -319,7 +334,7 @@ target_link_libraries(${ABACUS_BIN_NAME}
pw
ri
driver
xc
xc_
hsolver
elecstate
hamilt
Expand Down
190 changes: 187 additions & 3 deletions docs/examples/dpgen.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

[back to main page](../../README.md)

[DP-GEN](https://github.com/deepmodeling/dpgen), the deep potential generator, is a package designed to generate deep learning based model of interatomic potential energy and force fields (Yuzhi Zhang, Haidi Wang, Weijie Chen, Jinzhe Zeng, Linfeng Zhang, Han Wang, and Weinan E, DP-GEN: A concurrent learning platform for the generation of reliable deep learning based potential energy models, Computer Physics Communications, 2020, 107206). ABACUS can now interface with DP-GEN to generate deep potentials. In the following, we take the FCC aluminum as an example.
[DP-GEN](https://github.com/deepmodeling/dpgen), the deep potential generator, is a package designed to generate deep learning based model of interatomic potential energy and force fields (Yuzhi Zhang, Haidi Wang, Weijie Chen, Jinzhe Zeng, Linfeng Zhang, Han Wang, and Weinan E, DP-GEN: A concurrent learning platform for the generation of reliable deep learning based potential energy models, Computer Physics Communications, 2020, 107206). ABACUS can now interface with DP-GEN to generate deep potentials and performe autotests. In the following, we take the FCC aluminum as an example.

## init_bulk and run

This example can be found in examples/dpgen-example/init_and_run directory.

Expand All @@ -11,7 +13,7 @@ Firstly, one needs to prepare input files for ABACUS calculation, e.g., “INPUT
Secondly, for the "dpgen init_bulk" step, an `init.json` file should be provided:


```
```json
{
"init_fp_style": "ABACUS", # abacus interface
"stages": [1,2,3,4],
Expand All @@ -36,7 +38,7 @@ Secondly, for the "dpgen init_bulk" step, an `init.json` file should be provided
```

Next, for the "dpgen run" step, the following `run_param.json` should be provided.
```
```json
{
"type_map": [
"Al"
Expand Down Expand Up @@ -181,6 +183,188 @@ Next, for the "dpgen run" step, the following `run_param.json` should be provide
}
```

## autotest

This example can be found in examples/dpgen-example/autotest directory.

`dpgen autotest` supports to perform `relaxation`,`eos` (equation of state),`elastic`,`surface`,`vacancy`, and `interstitial` calculations with ABACUS. A `property.json` and `machine.json` file need to be provided. For example,

`property.json`:
```json

{
"structures": ["confs/"],
"interaction": {
"type": "abacus",
"incar": "./INPUT",
"potcar_prefix":"./",
"potcars": {"Al": "Al.PD04.PBE.UPF"},
"orb_files": {"Al":"Al_gga_10au_100Ry_3s3p2d.orb"}
},
"_relaxation": {
"cal_type": "relaxation",
"cal_setting":{
"input_prop": "./INPUT.rlx"
}
},
"properties": [
{
"type": "eos",
"vol_start": 0.85,
"vol_end": 1.15,
"vol_step": 0.01,
"cal_setting": {
"relax_pos": true,
"relax_shape": true,
"relax_vol": false,
"overwrite_interaction":{
"type": "abacus",
"incar": "./INPUT",
"potcar_prefix":"./",
"orb_files": {"Al":"Al_gga_10au_100Ry_3s3p2d.orb"},
"potcars": {"Al": "Al.PD04.PBE.UPF"} }
}
},
{
"type": "elastic",
"skip": false,
"norm_deform": 1e-2,
"shear_deform": 1e-2
},
{
"type": "vacancy",
"skip": false,
"supercell": [2, 2, 2]
},
{
"type": "surface",
"skip": true,
"min_slab_size": 15,
"min_vacuum_size":11,
"pert_xz": 0.01,
"max_miller": 3,
"cal_type": "static"
}
]
}
```

`machine.json`

```json
{
"api_version": "1.0",
"deepmd_version": "2.1.0",
"train" :[
{
"command": "dp",
"machine": {
"batch_type": "DpCloudServer",
"context_type": "DpCloudServerContext",
"local_root" : "./",
"remote_profile":{
"email": "xxx@xxx.xxx",
"password": "xxx",
"program_id": 000,
"input_data":{
"api_version":2,
"job_type": "indicate",
"log_file": "00*/train.log",
"grouped":true,
"job_name": "Al-train-VASP",
"disk_size": 100,
"scass_type":"c8_m32_1 * NVIDIA V100",
"platform": "ali",
"image_name":"LBG_DeePMD-kit_2.1.0_v1",
"on_demand":0
}
}
},
"resources": {
"number_node":123473334635,
"local_root":"./",
"cpu_per_node": 4,
"gpu_per_node": 1,
"queue_name": "GPU",
"group_size": 1
}
}],
"model_devi":
[{
"command": "lmp -i input.lammps -v restart 0",
"machine": {
"batch_type": "DpCloudServer",
"context_type": "DpCloudServerContext",
"local_root" : "./",
"remote_profile":{
"email": "xxx@xxx.xxx",
"password": "xxx",
"program_id": 000,
"input_data":{
"api_version":2,
"job_type": "indicate",
"log_file": "*/model_devi.log",
"grouped":true,
"job_name": "Al-devia-ABACUS",
"disk_size": 200,
"scass_type":"c8_m32_1 * NVIDIA V100",
"platform": "ali",
"image_name":"LBG_DeePMD-kit_2.1.0_v1",
"on_demand":0
}
}
},
"resources": {
"number_node": 28348383,
"local_root":"./",
"cpu_per_node": 4,
"gpu_per_node": 1,
"queue_name": "GPU",
"group_size": 100
}
}],
"fp":
[{
"command": "OMP_NUM_THREADS=1 mpirun -np 16 abacus",
"machine": {
"batch_type": "DpCloudServer",
"context_type": "DpCloudServerContext",
"local_root" : "./",
"remote_profile":{
"email": "xxx@xxx.xxx",
"password": "xxx",
"program_id": 000,
"input_data":{
"api_version":2,
"job_type": "indicate",
"log_file": "task*/fp.log",
"grouped":true,
"job_name": "al-DFT-test",
"disk_size": 100,
"scass_type":"c32_m128_cpu",
"platform": "ali",
"image_name":"XXXXX",
"on_demand":0
}
}
},
"resources": {
"number_node": 712254638889,
"cpu_per_node": 32,
"gpu_per_node": 0,
"queue_name": "CPU",
"group_size": 2,
"local_root":"./",
"source_list": ["/opt/intel/oneapi/setvars.sh"]
}
}
]
}

```

For each property, the command `dpgen autotest make property.json` will generate the input files, `dpgen autotest run property.json machine.json` will run the corresponding tasks, and `dpgen autotest post property.json` will collect the final results.


Notes:
- The ABACUS-DPGEN interface can be used in both pw and lcao basis.
Expand Down
27 changes: 15 additions & 12 deletions docs/input-main.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@

- [Variables useful for debugging](#variables-useful-for-debugging)

[nurse](#nurse) | [t_in_h](#t_in_h) | [vl_in_h](#vl_in_h) | [vnl_in_h](#vnl_in_h) | [test_force](#test_force) | [test_stress](#test_stress) | [colour](#colour) | [test_just_neighbor](#test_just_neighbor)
[nurse](#nurse) | [t_in_h](#t_in_h) | [vl_in_h](#vl_in_h) | [vnl_in_h](#vnl_in_h) | [test_force](#test_force) | [test_stress](#test_stress) | [colour](#colour)

- [DeePKS](#deepks)

Expand Down Expand Up @@ -148,6 +148,9 @@ This part of variables are used to control general system parameters.
- *md*: molecular dynamics
- *sto-scf*: do self-consistent electronic structure calculation with [stochastic DFT](#electronic-structure-sdft)
- *sto-md*: molecular dynamics with [stochastic DFT](#electronic-structure-sdft)
- *test_memory* : checks memory required for the calculation. The number is not quite reliable, please use with care
- *test_neighbour* : only performs neighbouring atom search
- *gen_jle* : generates projectors for DeePKS; see also deepks_lmax_descriptor

> Note: *istate* and *ienvelope* only work for LCAO basis set and are not working right now.
- **Default**: scf
Expand Down Expand Up @@ -597,9 +600,9 @@ This part of variables are used to control the parameters of stochastic DFT (SDF
- **Description**:
- Different method to do SDFT.
- 1: SDFT calculates $T_n(\hat{h})\ket{\chi}$ twice, where $T_n(x)$ is the n-th order Chebyshev polynomial and $\hat{h}=\frac{\hat{H}-\bar{E}}{\Delta E}$ owning eigen-value $\in(-1,1)$. This method cost less memory but slow.
- 2: SDFT calculates $T_n(\hat{h})\ket{\chi}$ once but need much more memory. This method is fast but when memory is not enough, only method 1 can be used.
- other: use 1
- **Default**: 1
- 2: SDFT calculates $T_n(\hat{h})\ket{\chi}$ once but need much more memory. This method is much faster. Besides, it calculate $N_e$ with $\bra{\chi}\sqrt{\hat f}\sqrt{\hat f}\ket{\chi}$, which needs smaller [nche_sto](#nche_sto). However, when memory is not enough, only method 1 can be used.
- other: use 2
- **Default**: 2

#### nbands_sto

Expand Down Expand Up @@ -642,6 +645,12 @@ This part of variables are used to control the parameters of stochastic DFT (SDF
- **Description**: Frequency (once each initsto_freq steps) to generate new stochastic orbitals when running md.
- **Default**:1000

#### npart_sto

- **Type**: Integer
- **Description**: Make memory cost to 1/npart_sto times of previous one when running post process of SDFT like DOS with method_sto = 2.
- **Default**:1

### Geometry relaxation

This part of variables are used to control the geometry relaxation.
Expand Down Expand Up @@ -963,8 +972,8 @@ Warning: this function is not robust enough for the current version. Please try
#### deepks_descriptor_lmax

- **Type**: Integer
- **Description**: control the max angular momentum of descriptor basis.
- **Default**: 0
- **Description**: when generating projectors, this variable controls the max angular momentum of descriptor basis.
- **Default**: 2

#### deepks_scf

Expand Down Expand Up @@ -1597,12 +1606,6 @@ This part of variables are used to control berry phase and wannier90 interfacae
- **Description**: If set to 1, output to terminal will have some color.
- **Default**: 0

#### test_just_neighbor

- **Type**: Boolean
- **Description**: If set to 1, then only perform the neighboring atoms search.
- **Default**: 0

### Electronic conductivities

Frequency-dependent electronic conductivities can be calculated with Kubo-Greenwood formula[Phys. Rev. B 83, 235120 (2011)].
Expand Down
Loading