Skip to content

Commit 4197223

Browse files
authored
Merge pull request #157 from deepmodeling/develop
Merge: from deepmodeling branch develop
2 parents efc37dd + ab47503 commit 4197223

File tree

331 files changed

+16869
-4590
lines changed

Some content is hidden

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

331 files changed

+16869
-4590
lines changed

.github/workflows/image.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ jobs:
2020
images: |
2121
ghcr.io/${{ github.repository_owner }}/abacus
2222
${{ secrets.DP_HARBOR_REGISTRY }}/dplc/abacus
23-
tags: type=semver,pattern={{version}}
23+
tags: |
24+
type=semver,pattern={{version}}
25+
type=raw,value=latest,enable=${{ github.event_name == 'workflow_dispatch' }}
2426
2527
- name: Setup Docker Buildx
2628
uses: docker/setup-buildx-action@v1
@@ -44,5 +46,5 @@ jobs:
4446
with:
4547
tags: ${{ steps.meta.outputs.tags }}
4648
file: Dockerfile
47-
push: ${{ github.event_name == 'push' }}
49+
push: true
4850
labels: ${{ steps.meta.outputs.labels }}

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.16)
55
########################################
66

77
project(ABACUS
8-
VERSION 2.2.3
8+
VERSION 2.3.0
99
DESCRIPTION "ABACUS is an electronic structure package based on DFT."
1010
HOMEPAGE_URL "https://github.com/deepmodeling/abacus-develop"
1111
LANGUAGES CXX

Dockerfile.gnu

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM debian:bullseye-slim
22

3-
RUN apt-get update && apt-get install -y --no-install-recommends git g++ gfortran libssl-dev make cmake vim wget bc unzip python3-numpy\
4-
&& apt-get install -y --no-install-recommends mpich libmpich-dev
3+
RUN apt-get update && apt-get install -y --no-install-recommends libopenblas-dev liblapack-dev libscalapack-mpi-dev git g++ gfortran libssl-dev make cmake vim wget bc unzip python3-numpy
4+
ENV OMPI_ALLOW_RUN_AS_ROOT=1 OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 OMPI_MCA_btl_vader_single_copy_mechanism=none
55

66
ENV GIT_SSL_NO_VERIFY=1 TERM=xterm-256color
77

@@ -10,16 +10,6 @@ RUN cd /tmp \
1010
&& cp -r cereal/include /usr/local \
1111
&& rm -rf cereal
1212

13-
RUN cd /tmp \
14-
&& git clone https://github.com/xianyi/OpenBLAS.git --single-branch --depth=1 \
15-
&& cd OpenBLAS && make USE_OPENMP=1 NO_AVX512=1 FC=gfortran -j8 && make PREFIX=/usr/local install \
16-
&& cd /tmp && rm -rf OpenBLAS
17-
18-
RUN cd /tmp \
19-
&& git clone https://github.com/darelbeida/scalapack.git -b v2.0.2-openblas --single-branch --depth=1 \
20-
&& cd scalapack && make lib && cp libscalapack.a /usr/local/lib/ \
21-
&& cd /tmp && rm -rf scalapack
22-
2313
RUN cd /tmp \
2414
&& wget https://elpa.mpcdf.mpg.de/software/tarball-archive/Releases/2021.05.002/elpa-2021.05.002.tar.gz --no-check-certificate --quiet \
2515
&& tar xzf elpa-2021.05.002.tar.gz && rm elpa-2021.05.002.tar.gz \

README.md

Lines changed: 107 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
</p>
44

55
<p align="center">
6-
<a href="https://github.com/deepmodeling/abacus-develop/actions/workflows/container.yml">
7-
<img src="https://github.com/deepmodeling/abacus-develop/actions/workflows/container.yml/badge.svg">
6+
<a href="https://github.com/deepmodeling/abacus-develop/actions/workflows/image.yml">
7+
<img src="https://github.com/deepmodeling/abacus-develop/actions/workflows/image.yml/badge.svg">
88
</a>
99
<a href="https://github.com/deepmodeling/abacus-develop/actions/workflows/test.yml">
1010
<img src="https://github.com/deepmodeling/abacus-develop/actions/workflows/test.yml/badge.svg">
@@ -21,30 +21,37 @@ Please refer to our [GitHub repository](https://github.com/deepmodeling/abacus-d
2121
- [Download and install](#download-and-install)
2222
- [Quickstart guide](#quickstart-guide)
2323
- [Input files](#input-files)
24+
- [Run ABACUS](#run-abacus)
2425
- [Output files](#output-files)
25-
- [Features](#features)
26-
- [Functionalities](#functionalities)
27-
- [Examples](#examples)
28-
- [For developers](#for-developers)
26+
- [Hands-on examples](#hands-on-examples)
27+
- [Citations](#citations)
28+
- [Development team](#development-team)
29+
- [Communicating and making contributions](#communicating-and-making-contributions)
2930

3031
# Features
3132

3233
ABACUS provides the following features and functionalities:
3334

34-
1. Ground-state total energy calculations using Kohn-Sham (KS) density functional theory
35-
(DFT) with local-density, generalized gradient approximations (LDA/GGAs), and hybrid functionals
36-
(PBE0 and HSE06, only for LCAO).
37-
2. Brillouin zone sampling using the Monkhorst-Pack special k-points.
38-
3. Geometry relaxations with Conjugated Gradient (CG) and BFGS methods.
35+
1. Three types of supported basis sets: pw, LCAO, and LCAO-in-pw.
36+
2. Ground-state total energy calculations using Kohn-Sham (KS) density functional theory (DFT) with local-density, generalized gradient approximations (LDA/GGAs), Meta-GGA(requires LIBXC, only for PW), and hybrid functionals (PBE0 and HSE06, only for LCAO and currently under test).
37+
3. Geometry relaxations with Conjugated Gradient (CG), BFGS, and FIRE methods.
3938
4. Semi-empirical van der Waals energy correction using the Grimme DFT-D2/D3 scheme.
40-
5. NVT molecular dynamics simulation.
39+
5. NVT and NVE molecular dynamics simulation. AIMD, DP potential, LJ potential are supported.
4140
6. Stress calculations and cell relaxations.
4241
7. Electric polarization calculation using Berry Phase theory.
4342
8. Interface to the Wannier90 package.
4443
9. Real-time time dependent density functional theory (TDDFT).
45-
10. Electrostatic potential.
46-
11. Mulliken charge analysis.
47-
12. Projected density of states (PDOS).
44+
10. Print-out of the electrostatic potential.
45+
11. Mulliken charge analysis (only for LCAO).
46+
12. Projected density of states (PDOS) (only for LCAO).
47+
13. DFT+U calculation (only for LCAO).
48+
14. Solvation model method for solvation energy.
49+
15. Stochastic DFT (only for PW).
50+
16. DeePKS method (under development, only for LCAO).
51+
17. Electric field and dipole correction.
52+
18. Orbital-free DFT.
53+
19. (subsidiary tool)Plot_tools for plot PDOS and PBANDS.
54+
20. (subsidiary tool)Generator for second generation numerical orbital basis.
4855

4956
[back to top](#readme-top)
5057

@@ -62,33 +69,47 @@ Please refer to the [installation guide](docs/install.md) for instruction on the
6269

6370
The following files are the central input files for ABACUS. Before executing the program, please make sure these files are prepared and stored in the working directory.
6471

65-
- The INPUT file
72+
- `INPUT`
6673

67-
The file named INPUT contains the setting parameters used in the calculation, which informs the program “what to do and how to do it”. Most parameters are supplied with default values, but some important parameters must be explicitly set by the user. For a complete list of the input parameters, please consult this [instruction](docs/input-main.md).
74+
This is the main input file that contains the setting parameters used in the calculation. For a complete list of the input parameters, please consult this [instruction](docs/input-main.md).
6875

6976
*Attention: Users cannot change the filename “INPUT” to other names.*
70-
- The structure file
71-
72-
The default name for structure file is STRU.The name can however be changed to a different name by explicitly specifying the name in the INPUT file.
77+
- `STRU`
7378

74-
The STRU file contains the structural information about the system, e.g., lattice constant, lattice vectors, and positions of the atoms within a unit cell. The positions can be given either in direct or Cartesian coordinates. Moreover, the name (and location of the pseudopotential and numerical orbital files, see below) need to be specified in the STRU file.
79+
This is the structure file that contains the structural information about the system, e.g., lattice constant, lattice vectors, and positions of the atoms within a unit cell. The positions can be given either in direct or Cartesian coordinates. Moreover, the name of the atom (and location of the pseudopotential and numerical orbital files, see below) needs to be specified in the STRU file. The name of the structure file can be changed to a different name by explicitly specifying the name in the INPUT file.
7580

7681
Specifications of the STRU file can be found in this [short instruction](docs/input-stru.md).
77-
- The k-point file
78-
79-
The default name is KPT. It contains the information of the k-grid setting for the Brillouin zone sampling.
82+
- `KPT`
8083

84+
This is the k-point file that contains the information of the k-grid setting for the Brillouin zone sampling.
8185
Specification of the k-point file can be found in this [short instruction](docs/input-kpt.md).
8286
- The pseudopotential files
8387

84-
Norm-conserving pseudopotentials are used in ABACUS, in the UPF file format.The filename of each element’s pseudopotential needs to be specified in the `STRU` file, if the the pseudopotential files are already present in the working directory. However, in case that the pseudopotential files are stored in some other directories, then a full path to access the pseudopotential files have to be specified in the `STRU` file.
88+
Norm-conserving pseudopotentials are used in ABACUS, in the UPF file format.The filename of each element’s pseudopotential needs to be specified in the STRU file, together with the directory of the pseudopotential files unless they are already present in the working directory.
8589

8690
More information on pseudopotentials is given [here](docs/features.md#pseudopotentials).
8791

8892
- The numerical orbital files
8993

90-
When performing calculations with numerical atomic orbital basis, it is necessary to prepare a numerical orbital file for each element in the system. Generally, the numerical orbital file should be prepared by the user, which will be described later. The filename for each element’s numerical orbital basis needs to be specified in the `STRU` file. However, in case that the numerical orbital files are stored in a location different from the working directory, then a full path to access the orbital files have to be specified in the `STRU` file.
91-
ABACUS provides numerical atomic basis sets of different accuracy levels for most elements commonly used. Users can download these basis sets from the [website](http://abacus.ustc.edu.cn/pseudo.html). Moreover, users can generate numerical atomic orbitals by themselves, and the procedure is provided in this [short introduction](docs/generate-basis.md).
94+
This part is only required in LCAO calculations.
95+
The filename for each element’s numerical orbital basis needs to be specified in the STRU file, together with the directory of the orbital files unless they are already present in the working directory.
96+
ABACUS provides numerical atomic basis sets of different accuracy levels for most elements commonly used. Users can download these basis sets from the [website](http://abacus.ustc.edu.cn/pseudo/list.htm). Moreover, users can generate numerical atomic orbitals by themselves, and the procedure is provided in this [short introduction](docs/generate-basis.md).
97+
98+
[back to top](#readme-top)
99+
100+
## Run ABACUS
101+
102+
After putting all required input files under one folder, enter this folder.
103+
```bash
104+
cd input_folder
105+
```
106+
107+
Perform calculation by:
108+
```bash
109+
mpirun -np 4 abacus
110+
```
111+
112+
You can replace `4` with your desired number of process, typically the result of the command `nproc`.
92113

93114
[back to top](#readme-top)
94115

@@ -110,21 +131,10 @@ into which the following output files will be generated:
110131

111132
[back to top](#readme-top)
112133

113-
# Features
114-
115-
Users can refer to this [page](docs/features.md) for several features of the ABACUS code:
116-
117-
- [Basis sets](docs/features.md#basis-sets)
118-
- [Pseudopotentials](docs/features.md#pseudopotentials)
119-
- [Boundary conditions and k-points](docs/features.md#boundary-conditions-and-k-points)
120-
- [Kohn-Sham solver](docs/features.md#kohn-sham-solver)
121-
- [Exchange-correlation functionals](docs/features.md#exchange-correlation-functionals)
122-
123-
[back to top](#readme-top)
124-
125-
# Functionalities
134+
## Hands-on examples
135+
The following provides basic sample jobs in ABACUS. More can be found in the directories `examples/` and `tests/`, with an introduction [here](tests/README.md), and the corresponding reference outputs can be found in the file `result.ref` under each subdirectory.
126136

127-
ABACUS provides a wide variety of functionalities, with explanation and examples:
137+
*Note that the examples there are intended as quick hands-on jobs, and the results are NOT converged with regard to basis set or k point sampling.*
128138

129139
- [Basic electronic structure calculation with PW basis set](docs/examples/basic-pw.md)
130140
- [Basic electronic structure calculation with LCAO basis set](docs/examples/basic-lcao.md)
@@ -141,22 +151,61 @@ ABACUS provides a wide variety of functionalities, with explanation and examples
141151
- [Electrostatic potential](docs/examples/potential.md)
142152
- [Mulliken charge](docs/examples/mulliken.md)
143153
- [Hybrid functional](docs/examples/hybrid.md)
154+
- [Electric field and dipole correction](docs/examples/electric_dipole.md)
155+
- [Stochastic DFT and mix stochastic-deterministic DFT](docs/examples/stochastic.md)
144156

145157
[back to top](#readme-top)
146158

147-
# Examples
148159

149-
We also provide many examples in the directories examples/ and tests/.
150160

151-
Note that the examples there are intended as references, and the results are not converged with regard to basis set or k point sampling.
161+
# Citations
162+
The following references are required to be cited when using ABACUS. Specifically:
163+
- **For general purpose:**
152164

153-
In the directory tests/, each sub-directory contains a separate test example. An introduction of the examples in tests/ directory can be found [here](tests/README.md). In each subdirectory, you may also find a file named jd which contains a short job description, and for some cases you may also find a README file containing more details about the run. Also, reference output is provided in the file `result.ref`.
165+
[1]. Mohan Chen, G. C. Guo, and Lixin He. "Systematically improvable optimized atomic basis sets for ab initio calculations." Journal of Physics: Condensed Matter 22.44 (2010): 445501.
166+
167+
[2]. Pengfei Li, et al. "Large-scale ab initio simulations based on systematically improvable atomic basis." Computational Materials Science 112 (2016): 503-517.
168+
169+
- **If Stochastic DFT is used:**
170+
171+
[1]. Qianrui Liu, and Mohan Chen. "Plane-Wave-Based Stochastic-Deterministic Density Functional Theory for Extended Systems." https://arxiv.org/abs/2204.05662.
172+
173+
- **If DFT+U is used:**
174+
175+
[1]. Xin Qu, et al. "DFT+ U within the framework of linear combination of numerical atomic orbitals." The Journal of Chemical Physics (2022).
176+
177+
- **If second generation numerical orbital basis is used:**
178+
179+
[1]. Peize Lin, Xinguo Ren, and Lixin He. "Strategy for constructing compact numerical atomic orbital basis sets by incorporating the gradients of reference wavefunctions." Physical Review B 103.23 (2021): 235131.
180+
181+
- **If berry curvature calculation is used in LCAO base:**
182+
183+
[1]. Gan Jin, Daye Zheng, and Lixin He. "Calculation of Berry curvature using non-orthogonal atomic orbitals." Journal of Physics: Condensed Matter 33.32 (2021): 325503.
184+
185+
- **If DeePKS is used:**
186+
187+
[1]. Wenfei Li, Qi Ou, et al. "DeePKS+ABACUS as a Bridge between Expensive Quantum Mechanical Models and Machine Learning Potentials." https://arxiv.org/abs/2206.10093.
188+
189+
- **If hybrid functional is used:**
190+
191+
[1]. Peize Lin, Xinguo Ren, and Lixin He. "Efficient Hybrid Density Functional Calculations for Large Periodic Systems Using Numerical Atomic Orbitals." Journal of Chemical Theory and Computation 2021, 17(1), 222–239.
192+
193+
[2]. Peize Lin, Xinguo Ren, and Lixin He. "Accuracy of Localized Resolution of the Identity in Periodic Hybrid Functional Calculations with Numerical Atomic Orbitals." Journal of Physical Chemistry Letters 2020, 11, 3082-3088.
194+
195+
[back to top](#readme-top)
196+
197+
# Development team
198+
The current development team consists the following research groups/affiliations:
199+
- University of Science and Technology of China (Dr. Lixin He)
200+
- Peking University (Dr. Mohan Chen)
201+
- Institute of Physics, Chinese Academy of Sciences (Dr. Xinguo Ren)
202+
- AI for Science Institute
154203

155204
[back to top](#readme-top)
156205

157-
# For developers
206+
# Communicating and making contributions
158207

159-
We also provide some [information](docs/CONTRIBUTING.md) on how to make contributions to ABACUS.
208+
If you find a bug or have some questions, please refer to our GitHub [issue tracker](https://github.com/deepmodeling/abacus-develop/issues), and our developers are willing to help. We also provide guidelines on how to make contributions to ABACUS.
160209

161210
- [Structure of the package](docs/CONTRIBUTING.md#structure-of-the-package)
162211
- [Submitting an Issue](docs/CONTRIBUTING.md#submitting-an-issue)
@@ -165,3 +214,14 @@ We also provide some [information](docs/CONTRIBUTING.md) on how to make contribu
165214
- [Submitting a Pull Request](docs/CONTRIBUTING.md#submitting-a-pull-request)
166215
- [Commit Message Guidelines](docs/CONTRIBUTING.md#commit-message-guidelines)
167216
[back to top](#readme-top)
217+
218+
# Miscellaneous
219+
220+
- [Basis sets](docs/features.md#basis-sets)
221+
- [Pseudopotentials](docs/features.md#pseudopotentials)
222+
- [Boundary conditions and k-points](docs/features.md#boundary-conditions-and-k-points)
223+
- [Kohn-Sham solver](docs/features.md#kohn-sham-solver)
224+
- [Exchange-correlation functionals](docs/features.md#exchange-correlation-functionals)
225+
226+
[back to top](#readme-top)
227+

docs/examples/electric_dipole.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Electric field and dipole correction
2+
3+
[back to main page](../../README.md)
4+
5+
## Electric field
6+
A saw-like potential simulating an electric field
7+
is added to the bare ionic potential.
8+
```
9+
INPUT_PARAMETERS
10+
efield_flag 1
11+
dip_cor_flag 0
12+
efield_dir 2
13+
efield_pos_max 0.5
14+
efield_pos_dec 0.1
15+
efield_amp 0.001
16+
```
17+
- efield_flag : If set to true, a saw-like potential simulating an electric field
18+
is added to the bare ionic potential.
19+
- dip_cor_flag : If `dip_cor_flag` == true and `efield_flag` == true, a dipole correction is also
20+
added to the bare ionic potential. If you want no electric field, `efield_amp` should be zero. Must be used ONLY in a slab geometry for surface calculations, with the discontinuity FALLING IN THE EMPTY SPACE.
21+
- efield_dir : The direction of the electric field or dipole correction is parallel to the reciprocal lattice vector, so the potential is constant in planes defined by FFT grid points, efield_dir = 0, 1 or 2. Used only if `efield_flag` == true.
22+
- efield_pos_max : Position of the maximum of the saw-like potential along crystal axis `efield_dir`, within the unit cell, 0 < `efield_pos_max` < 1. Used only if `efield_flag` == true.
23+
- efield_pos_dec : Zone in the unit cell where the saw-like potential decreases, 0 < `efield_pos_dec` < 1. Used only if `efield_flag` == true.
24+
- efield_amp : Amplitude of the electric field, in ***Hartree*** a.u.; 1 a.u. = 51.4220632*10^10 V/m. Used only if `efield_flag` == true. The saw-like potential increases with slope `efield_amp` in the region from (`efield_pos_max`+`efield_pos_dec`-1) to (`efield_pos_max`), then decreases until (`efield_pos_max`+`efield_pos_dec`), in units of the crystal vector `efield_dir`. Important: the change of slope of this potential must be located in the empty region, or else unphysical forces will result.
25+
26+
27+
## Dipole correction
28+
A dipole correction is added to the bare ionic potential.Must be used ONLY in a slab geometry, for surface calculations, with the discontinuity FALLING IN THE EMPTY SPACE.
29+
```
30+
INPUT_PARAMETERS
31+
efield_flag 1
32+
dip_cor_flag 1
33+
efield_dir 2
34+
efield_pos_max 0.5
35+
efield_pos_dec 0.1
36+
efield_amp 0
37+
```
38+
Note: *efield_amp must be zero so that there is no electric field.*
39+
40+
## Electric field and Dipole correction
41+
Both external electric field and dipole correction are added to the bare ionic potential.
42+
```
43+
INPUT_PARAMETERS
44+
efield_flag 1
45+
dip_cor_flag 1
46+
efield_dir 2
47+
efield_pos_max 0.5
48+
efield_pos_dec 0.1
49+
efield_amp 0.001
50+
```
51+
52+
53+
[back to top](#electric-field-and-dipole-correction)

0 commit comments

Comments
 (0)