Skip to content

Commit fded737

Browse files
authored
Merge pull request #791 from maki49/develop
Merge `develop` into `TDDFT`
2 parents 1209a0c + e3d5b62 commit fded737

File tree

337 files changed

+6254
-7176
lines changed

Some content is hidden

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

337 files changed

+6254
-7176
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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
pull_request_target:
55
branches:
66
- develop
7+
- tryEigen
78
- update_MD
89
- ABACUS_2.2.0_beta
910
- deepks
@@ -12,9 +13,11 @@ on:
1213
- TDDFT
1314
jobs:
1415

16+
jobs:
1517
test:
1618
name: Do the job on the runner
1719
runs-on: self-hosted
20+
if: github.repository_owner == 'deepmodeling'
1821
container: ghcr.io/deepmodeling/abacus-development-kit:gnu
1922
steps:
2023
- name: Checkout

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,8 @@ IF (BUILD_TESTING)
225225
enable_testing()
226226
find_package(Threads)
227227
set(CMAKE_CXX_STANDARD_REQUIRED ON)
228-
find_package(GTest)
229-
if(NOT ${GTEST_FOUND})
228+
find_package(GTest HINTS /usr/local/lib/ ${GTEST_DIR})
229+
if(NOT ${GTest_FOUND})
230230
include(FetchContent)
231231
FetchContent_Declare(
232232
googletest
@@ -260,7 +260,6 @@ target_link_libraries(${ABACUS_BIN_NAME}
260260
cell
261261
symmetry
262262
md
263-
symmetry
264263
neighbor
265264
orb
266265
io
@@ -272,6 +271,7 @@ target_link_libraries(${ABACUS_BIN_NAME}
272271
pw
273272
ri
274273
driver
274+
xc
275275
esolver
276276
-lm
277277
)

doc/developers.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
- [Code Formatting style](#code-formatting-style)
1212
[back to main page](../README.md)
1313

14-
## Raising issues on GitHub
14+
## Creating issues on GitHub
1515

16-
Raising issues on GitHub is a convernient way to notify the develper team about bugs and feature requests of the ABACUS code. We provide a few templates for issues.
16+
Creating issues on GitHub is a convernient way to notify the develper team about bugs and feature requests of the ABACUS code. We provide a few templates for issues.
1717

1818
[back to top](#for-developers)
1919

@@ -23,7 +23,7 @@ The ABACUS code is refactored to several self-contained modules. A description o
2323

2424
### Add a unit test
2525

26-
If there are currently no unit tests provided for the module, do as follows. `module_base` provides a simple demonstration.
26+
We use 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.
2727

2828
- Add a folder named `test` under the module.
2929
- Append the content below to `CMakeLists.txt` of the module:
@@ -106,9 +106,6 @@ After your pull request is merged, you can safely delete your branch and pull th
106106
git pull --ff upstream develop
107107
```
108108

109-
### Providing unit tests
110-
111-
We use 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`. To build tests for abacus, set `BUILD_TESTING=1` when configuring with CMake. Executables of test programs will be under `build/tests`.
112109

113110
### Updating documentation
114111

doc/examples/md.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,22 @@ basis_type lcao
3333
mixing_beta 0.4
3434
charge_extrap second-order
3535
36-
md_mdtype 1 //choose ensemble
36+
md_type 1 //choose ensemble
3737
md_dt 1 //time step
3838
md_tfirst 700 //the first target temperature
39-
md_rstmd 0 //whether restart md
40-
md_qmass 1 //mass of themostat
41-
md_dumpfred 10 //The period to dump MD information for monitoring and restarting MD
39+
md_restart 0 //whether restart md
40+
md_dumpfreq 10 //The period to dump MD information
4241
```
4342

4443
These MD parameters means that ABACUS will use NVT ensemble with Nosé-hoover themostat; the time step is 1fs, and target temperature is 700K; start renew without restart file, set the mass of themostat as 1g/mol, and calculate the MSD and diffusion coefficent from first step.
4544

4645
Note: *Please turn off symmetry when do MD simulation.*
4746

48-
- md_mdtype : 0, NVE; 1, NVT; 2, velocity scaling
47+
- md_type : -1, FIRE; 0, NVE; 1, NHC; 2, LGV; 3, ADS; 4, MSST
4948
- md_dt : time step in md simulation (fs)
50-
- md_tfirst : target temperature in md simulation(K), you should set parameter md_tlast and md_fixtemperature when you want to change temperature during md simulation.
51-
- md_rstmd : 0, no need of restart ; 1, restart with restart file, you must repalce STRU file with STRU_MD before you run the restart task.
52-
- md_qmass : mass of thermostat, set by experience, if you don’t know how to set, set it to 0 will have a number autosetted by ABACUS
53-
- md_dumpfred : frequency for output consequence of md simulation
49+
- md_tfirst : target temperature in md simulation(K), you should set parameter md_tlast when you want to change temperature during md simulation.
50+
- md_restart : 0, no need of restart ; 1, restart with restart file, you must repalce STRU file with STRU_MD before you run the restart task.
51+
- md_dumpfreq : frequency for output consequence of md simulation
5452

5553
The STRU file is:
5654
```
@@ -149,9 +147,9 @@ Gamma
149147
```
150148

151149
Run the program, and see results in the output directory. The following files are about MD:
152-
- md_pos_$num.cif optimized structure in direct coordinate
153-
- MD_RESTART output the information of md for restart
154-
- STRU_MD if you want to restart md, you must replace the STRU with this file.
150+
- STRU_MD_$num: optimized structures in direct coordinate
151+
- Restart_md.dat: output the information of md for restart
152+
- If you want to restart md, you must replace the STRU with STRU_MD_$num.
155153

156154
MD information can be found in file running_md.log or in file MD_OUT
157155

doc/examples/tddft.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,12 @@ out_charge 1
2525
gamma_only 0
2626
nstep 2000
2727
dr2 1.0e-6
28-
md_mdtype 0
28+
md_type 0
2929
md_dt 0.01
3030
md_tfirst 30
31-
md_mdoutpath mdtest
32-
md_rstmd 0
33-
md_fixtemperature 20000
34-
md_nresn 3
35-
md_nyosh 3
36-
md_qmass 0
31+
md_restart 0
3732
md_tlast 30
38-
md_dumpfred 1
39-
md_domsd 0
40-
md_domsdatom 0
41-
md_outputstressperiod 0
33+
md_dumpfreq 1
4234
tddft 1
4335
set_vel 1
4436
ocp 1

doc/input-main.md

Lines changed: 29 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,14 @@
3232
- [Density of states](#density-of-states)
3333

3434
[dos_edelta_ev](#dos-edelta-ev) | [dos_sigma](#dos-sigma) | [dos_scale](#dos-scale)
35-
36-
- [Electric field](#electric-field)
37-
38-
[efield](#efield) | [edir](#edir) | [emaxpos](#emaxpos) | [eopreg](#eopreg) | [eamp](#eamp)
3935

4036
- [Exact exchange](#exact-exchange) (under tests)
4137

4238
[exx_hybrid_type](#exx-hybrid-type) | [exx_hybrid_alpha](#exx-hybrid-alpha) | [exx_hse_omega](#exx-hse-omega) | [exx_separate_loop](#exx-separate-loop) | [exx_hybrid_step](#exx-hybrid-step) | [exx_lambda](#exx-lambda) | [exx_pca_threshold](#exx-pca-threshold) | [exx_c_threshold](#exx-c-threshold) | [exx_v_threshold](#exx-v-threshold) | [exx_dm_threshold](#exx-dm-threshold) | [exx_schwarz_threshold](#exx-schwarz-threshold) | [exx_cauchy_threshold](#exx-cauchy-threshold) | [exx_ccp_threshold](#exx-ccp-threshold) | [exx_ccp_rmesh_times](#exx-ccp-rmesh-times) | [exx_distribute_type](#exx-distribute-type) | [exx_opt_orb_lmax](#exx-opt-orb-lmax) | [exx_opt_orb_ecut](#exx-opt-orb-ecut) | [exx_opt_orb_tolerence](#exx-opt-orb-tolerence)
4339

4440
- [Molecular dynamics](#molecular-dynamics)
4541

46-
[md_type](#md-type) | [md_potential](#md-potential) | [md_rstmd](#md-rstmd) | [md_dt](#md_dt) | [md_t](#md-t) | [md_qmass](#md-qmass) | [md_dumpfred](#md-dumpfred) | [md_rstfred](#md-rstfred) | [md_tfreq](#md-tfreq) | [MNHC](#mnhc) | [rcut_lj](#rcut_lj) | [epsilon_lj](#epsilon_lj) | [sigma_lj](#sigma_lj) | [direction](#direction) | [velocity](#velocity) | [viscosity](#viscosity) | [tscale](#tscale) | [damp](#damp)
42+
[md_type](#md-type) | [md_ensolver](#md-ensolver) | [md_restart](#md-restart) | [md_dt](#md-dt) | [md_t](#md-t) | [md_dumpfreq](#md-dumpfreq) | [md_restartfreq](#md-restartfreq) | [md_tfreq](#md-tfreq) | [md_mnhc](#md-mnhc) | [lj_rcut](#lj-rcut) | [lj_epsilon](#lj-epsilon) | [lj_sigma](#lj-sigma) | [msst_direction](#msst-direction) | [msst_vel](#msst-vel) | [msst_vis](#msst-vis) | [msst_tscale](#msst-tscale) | [msst_qmass](#msst-qmass) | [md_damp](#md-damp)
4743

4844
- [DFT+U correction](#DFT_U-correction)
4945

@@ -912,43 +908,6 @@ This part of variables are used to control the calculation of DOS.
912908
913909
[back to top](#input-file)
914910
915-
### Electric field
916-
This part of variables are used to control the addition of an external electric field. It is achieved by adding a saw-like potential to the local ionic potential.
917-
918-
- efield<a id="efield"></a>
919-
- *Type*: Boolean
920-
- *Description*: Controls whether to add the external electric field. When set to 1, the electric field is turned on. When set to 0, there is no electric field.
921-
- *Default*: 0.
922-
923-
[back to top](#input-file)
924-
925-
- edir<a id="edir"></a>
926-
- *Type*: Integer
927-
- *Description*: Tells which reciprocal lattice vector the external electric field aligns with. Allowed values are 1,2, and 3, corresponding to the three reciprocal lattice vectors respectively.
928-
- *Default*: 1
929-
930-
[back to top](#input-file)
931-
932-
- emaxpos<a id="emaxpos"></a>
933-
- *Type*: Real
934-
- *Description*: Position of the maximum of the saw-like potential along the reciprocal lattice vector specified by edir, 0 < emaxpos < 1.
935-
- *Default*: 0.5
936-
937-
[back to top](#input-file)
938-
939-
- eopreg<a id="eopreg"></a>
940-
- *Type*: Real
941-
- *Description*: The saw-like potential increases in the region from `(emaxpos+eopreg-1)` to `(emaxpos)`, then decreases to 0 until (emaxpos+eopreg), in units of the crystal vector `edir`. Important: the change of slope of this potential must be located in the empty region, or else unphysical forces will result.
942-
- *Default*: 0.1
943-
944-
[back to top](#input-file)
945-
946-
- eamp<a id="eamp"></a>
947-
- *Type*: Real
948-
- *Description*: Amplitude of the electric field, in atomic unit: 1 a.u. = 51.4220632*10^10 V/m.
949-
- *Default*: 0.001
950-
951-
[back to top](#input-file)
952911
953912
### DeePKS
954913
This part of variables are used to control the usage of DeePKS method (a comprehensive data-driven approach to improve accuracy of DFT).
@@ -1113,61 +1072,56 @@ This part of variables are used to control the molecular dynamics calculations.
11131072
- *Description*: control the ensemble to run md.
11141073
- -1: FIRE method to relax;
11151074
- 0: NVE ensemble;
1116-
- 1: NVT ensemble with Anderson thermostat;
1117-
- 2: NVT ensemble with Nose Hoover Chain;
1118-
- 3: NVT ensemble with Langevin method;
1075+
- 1: NVT ensemble with Nose Hoover Chain;
1076+
- 2: NVT ensemble with Langevin method;
1077+
- 3: NVT ensemble with Anderson thermostat;
11191078
- 4: MSST method;
1120-
- *Default*: 2
1079+
- *Default*: 1
11211080
11221081
[back to top](#input-file)
11231082
1124-
- md_potential<a id="md-potential"></a>
1083+
- md_ensolver<a id="md-ensolver"></a>
11251084
- *Type*: String
1126-
- *Description*: choose the potential type.
1085+
- *Description*: choose the energy solver for MD.
11271086
- FP: First-Principles MD;
11281087
- LJ: Leonard Jones potential;
11291088
- DP: DeeP potential;
11301089
- *Default*: FP
11311090
11321091
[back to top](#input-file)
11331092
1134-
- md_rstmd<a id="md-rstmd"></a>
1093+
- md_restart<a id="md-restart"></a>
11351094
- *Type*: Boolean
11361095
- *Description*: to control whether restart md.
11371096
- 0: When set to 0, ABACUS will calculate md normolly.
11381097
- 1: When set to 1, ABACUS will calculate md from last step in your test before.
11391098
- *Default*: 0
11401099
11411100
[back to top](#input-file)
1142-
- md_dt<a id="md_dt"></a>
1101+
- md_dt<a id="md-dt"></a>
11431102
- *Type*: Double
11441103
- *Description*: This is the time step(fs) used in md simulation .
11451104
- *Default*: 1
11461105
11471106
[back to top](#input-file)
11481107
- md_tfirst & md_tlast<a id="md-t"></a>
11491108
- *Type*: Double
1150-
- *Description*: This is the temperature used in md simulation, md_tlast’s default value is md_tfirst. If md_tlast is setted and be different from the md_tfirst, ABACUS will automatically generate a linear temperature gradient file named ”ChangeTemp.dat”, you can also set this file according to your needs instead.
1109+
- *Description*: This is the temperature (K) used in md simulation, md_tlast’s default value is md_tfirst. If md_tlast is set to be different from md_tfirst, ABACUS will automatically change the temperature from md_tfirst to md_tlast.
11511110
- *Default*: No default
11521111
11531112
[back to top](#input-file)
1154-
- md_qmass<a id="md-qmass"></a>
1155-
- *Type*: Double
1156-
- *Description*: Inertia of extended system variable. Used only when md_type is 4, you should set a number which is larger than 0. Note that Qmass of NHC is set by md_tfreq.
1157-
- *Default*: No default
11581113
1159-
[back to top](#input-file)
1160-
- md_dumpfred<a id="md-dumpfred"></a>
1114+
- md_dumpfreq<a id="md-dumpfreq"></a>
11611115
- *Type*: Integer
11621116
- *Description*:This is the frequence to dump md information.
11631117
- *Default*: 1
11641118
11651119
[back to top](#input-file)
11661120
1167-
- md_rstfred<a id="md-rstfred"></a>
1121+
- md_restartfreq<a id="md-restartfreq"></a>
11681122
- *Type*: Integer
11691123
- *Description*:This is the frequence to output restart information.
1170-
- *Default*: 1
1124+
- *Default*: 5
11711125
11721126
[back to top](#input-file)
11731127
@@ -1180,63 +1134,70 @@ This part of variables are used to control the molecular dynamics calculations.
11801134
11811135
[back to top](#input-file)
11821136
1183-
- MNHC<a id="mnhc"></a>
1137+
- md_mnhc<a id="md-mnhc"></a>
11841138
- *Type*: Integer
11851139
- *Description*: Number of Nose-Hoover chains.
11861140
- *Default*: 4
11871141
11881142
[back to top](#input-file)
11891143
1190-
- rcut_lj<a id="rcut_lj"></a>
1144+
- lj_rcut<a id="lj-rcut"></a>
11911145
- *Type*: Real
11921146
- *Description*: Cut-off radius for Leonard Jones potential (angstrom).
11931147
- *Default*: 8.5 (for He)
11941148
11951149
[back to top](#input-file)
11961150
1197-
- epsilon_lj<a id="epsilon_lj"></a>
1151+
- lj_epsilon<a id="lj-epsilon"></a>
11981152
- *Type*: Real
11991153
- *Description*: The value of epsilon for Leonard Jones potential (eV).
12001154
- *Default*: 0.01032 (for He)
12011155
12021156
[back to top](#input-file)
12031157
1204-
- sigma_lj<a id="sigma_lj"></a>
1158+
- lj_sigma<a id="lj-sigma"></a>
12051159
- *Type*: Real
12061160
- *Description*: The value of sigma for Leonard Jones potential (angstrom).
12071161
- *Default*: 3.405 (for He)
12081162
12091163
[back to top](#input-file)
12101164
1211-
- direction<a id="direction"></a>
1165+
- msst_direction<a id="msst-direction"></a>
12121166
- *Type*: Integer
12131167
- *Description*: the direction of shock wave for MSST.
12141168
- *Default*: 2 (z direction)
12151169
12161170
[back to top](#input-file)
12171171
1218-
- velocity<a id="velocity"></a>
1172+
- msst_vel<a id="msst-vel"></a>
12191173
- *Type*: Real
12201174
- *Description*: the velocity of shock wave (\AA/fs) for MSST.
12211175
- *Default*: 0
12221176
12231177
[back to top](#input-file)
12241178
1225-
- viscosity<a id="viscosity"></a>
1179+
- msst_vis<a id="msst-vis"></a>
12261180
- *Type*: Real
12271181
- *Description*: artificial viscosity (mass/length/time) for MSST.
12281182
- *Default*: 0
12291183
12301184
[back to top](#input-file)
12311185
1232-
- tscale<a id="tscale"></a>
1186+
- msst_tscale<a id="msst-tscale"></a>
12331187
- *Type*: Real
12341188
- *Description*: reduction in initial temperature (0~1) used to compress volume in MSST.
12351189
- *Default*: 0
12361190
12371191
[back to top](#input-file)
12381192
1239-
- damp<a id="damp"></a>
1193+
- msst_qmass<a id="msst-qmass"></a>
1194+
- *Type*: Double
1195+
- *Description*: Inertia of extended system variable. Used only when md_type is 4, you should set a number which is larger than 0. Note that Qmass of NHC is set by md_tfreq.
1196+
- *Default*: No default
1197+
1198+
[back to top](#input-file)
1199+
1200+
- md_damp<a id="md-damp"></a>
12401201
- *Type*: Real
12411202
- *Description*: damping parameter (fs) used to add force in Langevin method.
12421203
- *Default*: 1

0 commit comments

Comments
 (0)