Skip to content

Commit a853086

Browse files
committed
Merge branch 'develop' into out_mat_dh
2 parents 0cc4db9 + 3d0de86 commit a853086

File tree

248 files changed

+7245
-4416
lines changed

Some content is hidden

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

248 files changed

+7245
-4416
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ STRU_READIN_ADJUST.cif
1717
build
1818
dist
1919
.idea
20-
toolchain.tar.gz
2120
time.json
2221
*.pyc
2322
__pycache__

Dockerfile.intel

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ RUN source /opt/intel/oneapi/setvars.sh && \
4444
ln -s /usr/local/include/elpa_openmp-$ELPA_VER/elpa /usr/local/include/ && \
4545
cd /tmp && rm -rf elpa-$ELPA_VER
4646

47+
RUN cd /tmp && git clone https://github.com/Tencent/rapidjson.git && cp -r rapidjson/include/rapidjson /usr/include/ \
48+
&& rm -rf rapidjson
49+
4750
RUN wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.0.0%2Bcpu.zip \
4851
--no-check-certificate --quiet -O libtorch.zip && \
4952
unzip -q libtorch.zip -d /opt && rm libtorch.zip

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
# About ABACUS
1414

15-
ABACUS (Atomic-orbital Based Ab-initio Computation at UStc) is an open-source package based on density functional theory (DFT). The package utilizes both plane wave and numerical atomic basis sets with the usage of norm-conserving pseudopotentials to describe the interactions between nuclear ions and valence electrons. ABACUS supports LDA, GGA, meta-GGA, and hybrid functionals. Apart from single-point calculations, the package allows geometry optimizations and ab-initio molecular dynamics with various ensembles. The package also provides a variety of advanced functionalities for simulating materials, including the DFT+U, VdW corrections, and implicit solvation model, etc. In addition, ABACUS strives to provide a general infrastructure to facilitate the developments and applications of novel machine-learning-assisted DFT methods (DeePKS, DP-GEN, DeepH, DeePTB etc.) in molecular and material simulations.
15+
ABACUS (**A**tomic-orbital **B**ased **A**b-initio **C**omputation at **US**tc) is an open-source package based on density functional theory (DFT). The package utilizes both plane wave and numerical atomic basis sets with the usage of pseudopotentials to describe the interactions between nuclear ions and valence electrons. ABACUS supports LDA, GGA, meta-GGA, and hybrid functionals. Apart from single-point calculations, the package allows geometry optimizations and ab-initio molecular dynamics with various ensembles. The package also provides a variety of advanced functionalities for simulating materials, including the DFT+U, VdW corrections, and implicit solvation model, etc. In addition, ABACUS strives to provide a general infrastructure to facilitate the developments and applications of novel machine-learning-assisted DFT methods (DeePKS, DP-GEN, DeepH, DeePTB etc.) in molecular and material simulations.
1616

1717
# Online Documentation
1818
For detailed documentation, please refer to [our documentation website](https://abacus.deepmodeling.com/).

docs/CITATIONS.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,18 @@ The following references are required to be cited when using ABACUS. Specificall
44

55
- **For general purpose:**
66

7+
*For LCAO basis:*
8+
79
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.
810

911
Pengfei Li, et al. "Large-scale ab initio simulations based on systematically improvable atomic basis." Computational Materials Science 112 (2016): 503-517.
1012

13+
Peize Lin, Xinguo Ren, Xiaohui Liu, Lixin He. Ab initio electronic structure calculations based on numerical atomic orbitals: Basic fomalisms and recent progresses. Wiley Interdisciplinary Reviews: Computational Molecular Science, 2024, 14(1): e1687.
14+
15+
*For LCAO and PW basis:*
16+
17+
Weiqing Zhou, Deye Zheng, Qianrui Liu, et al. ABACUS: An Electronic Structure Analysis Package for the AI Era. arXiv preprint arXiv:2501.08697, 2025.
18+
1119
- **If Stochastic DFT is used:**
1220

1321
Qianrui Liu, and Mohan Chen. "Plane-Wave-Based Stochastic-Deterministic Density Functional Theory for Extended Systems." <https://arxiv.org/abs/2204.05662>.

docs/DevelopingTeam.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ The current development team consists the following research groups/affiliations
44
- University of Science and Technology of China (Dr. Lixin He)
55
- Peking University (Dr. Mohan Chen)
66
- Institute of Physics, Chinese Academy of Sciences (Dr. Xinguo Ren)
7-
- Beijing AI for Science Institute
8-
- Institute of Artificial Intelligence, Hefei Comprehensive National Science Center.
7+
- Beijing AI for Science Institute (Dr. Daye Zheng)
8+
- Institute of Artificial Intelligence, Hefei Comprehensive National Science Center (Dr. Lixin He).

docs/advanced/input_files/input-main.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3541,11 +3541,7 @@ These variables are used to control berry phase and wannier90 interface paramete
35413541
- **Description**:
35423542
`td_lcut1` is the lower bound of the interval in the length gauge RT-TDDFT, where $x$ is the fractional coordinate:
35433543
$$
3544-
E(x)=
3545-
\begin{cases}
3546-
E_0, & \mathtt{cut1}\leqslant x \leqslant \mathtt{cut2} \\
3547-
-E_0\left(\dfrac{1}{\mathtt{cut1}+1-\mathtt{cut2}}-1\right), & \text{$0<x<\mathtt{cut1}$ or $\mathtt{cut2}<x<1$}
3548-
\end{cases}
3544+
E(x)=\begin{cases}E_0, & \mathtt{cut1}\leqslant x \leqslant \mathtt{cut2} \\-E_0\left(\dfrac{1}{\mathtt{cut1}+1-\mathtt{cut2}}-1\right), & 0 < x < \mathtt{cut1~~or~~cut2} < x < 1 \end{cases}
35493545
$$
35503546
- **Default**: 0.05
35513547

@@ -3555,11 +3551,7 @@ These variables are used to control berry phase and wannier90 interface paramete
35553551
- **Description**:
35563552
`td_lcut2` is the upper bound of the interval in the length gauge RT-TDDFT, where $x$ is the fractional coordinate:
35573553
$$
3558-
E(x)=
3559-
\begin{cases}
3560-
E_0, & \mathtt{cut1}\leqslant x \leqslant \mathtt{cut2} \\
3561-
-E_0\left(\dfrac{1}{\mathtt{cut1}+1-\mathtt{cut2}}-1\right), & \text{$0<x<\mathtt{cut1}$ or $\mathtt{cut2}<x<1$}
3562-
\end{cases}
3554+
E(x)=\begin{cases}E_0, & \mathtt{cut1}\leqslant x \leqslant \mathtt{cut2} \\-E_0\left(\dfrac{1}{\mathtt{cut1}+1-\mathtt{cut2}}-1\right), & 0 < x < \mathtt{cut1~~or~~cut2} < x < 1 \end{cases}
35633555
$$
35643556
- **Default**: 0.95
35653557

docs/community/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ write(cs_stru, cs_atoms, format='abacus', pp=pp, basis=basis)
109109

110110
ABACUS applies the density difference between two SCF steps (labeled as `DRHO` in the screen output) as the convergence criterion, which is considered as a more robust choice compared with the energy difference. `DRHO` is calculated via `DRHO = |rho(G)-rho_previous(G)|^2`. Note that the energy difference between two SCF steps (labed as `EDIFF`) is also printed out in the screen output.
111111

112-
**4. Why EDIFF is much slower than DRHO?
112+
**4. Why EDIFF is much slower than DRHO?**
113113

114114
For metaGGA calculations, it is normal because in addition to charge density, kinetic density also needs to be considered in metaGGA calculations. In this case, you can try set `mixing_tau = true`. If you find EDIFF is much slower than DRHO for non-metaGGA calculations, please start a new issue to us.
115115

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ABACUS Documentation
1010
ABACUS (Atomic-orbital Based Ab-initio Computation at UStc) is
1111
an open-source computer code package based on density functional
1212
theory (DFT). The package utilizes both plane wave and numerical
13-
atomic basis sets with the usage of norm-conserving pseudopotentials
13+
atomic basis sets with the usage of pseudopotentials
1414
to describe the interactions between nuclear ions and valence electrons.
1515
ABACUS supports LDA, GGA, meta-GGA, and hybrid functionals. Apart from
1616
single-point calculations, the package allows geometry optimizations

docs/quick_start/easy_install.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Easy Installation
22

3-
This guide helps you install ABACUS with basic features. **For DeePKS, DeePMD and Libxc support, or building with `make`, please refer to [the advanced installation guide](../advanced/install.md)** after going through this page. We recommend building ABACUS with `cmake` to avoid dependency issues. We recommend compiling ABACUS(and possibly its requirements) from the source code using the latest compiler for the best performace. You can try [toolchain](#install-requirements-by-toolchain) to install ABACUS and dependencies in a source-code compilation way with convience. You can also deploy ABACUS **without building** by [Docker](#container-deployment) or [conda](#install-by-conda). Please note that ABACUS only supports Linux; for Windows users, please consider using [WSL](https://learn.microsoft.com/en-us/windows/wsl/) or docker.
3+
This guide helps you install ABACUS with basic features. **For DeePKS, DeePMD and Libxc support, or building with `make`, please refer to [the advanced installation guide](../advanced/install.md)** after going through this page. We recommend building ABACUS with `cmake` to avoid dependency issues. We recommend compiling ABACUS (and possibly its requirements) from the source code using the latest compiler for the best performace. You can try [toolchain](#install-requirements-by-toolchain) to install ABACUS and dependencies in a source-code compilation way with convience. You can also deploy ABACUS **without building** by [Docker](#container-deployment) or [conda](#install-by-conda). Please note that ABACUS only supports Linux; for Windows users, please consider using [WSL](https://learn.microsoft.com/en-us/windows/wsl/) or docker.
44

55
## Get ABACUS source code
66

@@ -79,7 +79,7 @@ git remote -v
7979

8080
# Replace "origin" with "upstream" or the remote name corresponding to deepmodeling/abacus-develop if necessary
8181
git fetch origin
82-
git checkout v3.8.4 # Replace the tag with the latest version
82+
git checkout v3.x.x # Replace the tag with the latest version, like v3.10.0
8383
git describe --tags # Verify if the tag has been successfully checked out
8484
```
8585

@@ -192,6 +192,8 @@ OMP_NUM_THREADS=4 mpirun -n 4 abacus
192192

193193
In this case, the total thread count is 16.
194194

195+
> Notice: If the MPI library you are using is OpenMPI, which is commonly the case, when you set the number of processes to 1 or 2, OpenMPI will default to `--bind-to core`. This means that no matter how many threads you set, these threads will be restricted to run on 1 or 2 CPU cores. Therefore, setting a higher number of OpenMP threads might result in slower program execution. Hence, when using `mpirun -n` set to 1 or 2, it is recommended to set `--bind-to none` to avoid performance degradation. For example:`OMP_NUM_THREADS=6 mpirun --bind-to none -n 1 abacus`. The detailed binding strategy of OpenMPI can be referred to at https://docs.open-mpi.org/en/v5.0.x/man-openmpi/man1/mpirun.1.html#quick-summary.
196+
195197
ABACUS will try to determine the number of threads used by each process if `OMP_NUM_THREADS` is not set. However, it is **required** to set `OMP_NUM_THREADS` before running `mpirun` to avoid potential performance issues.
196198

197199
Please refer to [hands-on guide](./hands_on.md) for more instructions.

docs/quick_start/hands_on.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### A quick LCAO example
66

7-
ABACUS is well known for its support of LCAO (Linear Combination of Atomic Orbital) basis set in calculating periodic condensed matter systems, so it's a good choice to start from a LCAO example of self-consistent field (SCF) calculation. Here, FCC MgO has been chosen as a quick start example. The default name of a structure file in ABACUS is `STRU`. The `STRU` file for FCC MgO in a LCAO calculation is shown below:
7+
ABACUS is well known for its support of LCAO (Linear Combination of Atomic Orbital) basis set in calculating periodic condensed matter systems. It's a good choice to start from a LCAO example of self-consistent field (SCF) calculation. Here, FCC MgO has been chosen as a quick start example. The default name of a structure file in ABACUS is `STRU`. The `STRU` file for FCC MgO in a LCAO calculation is shown below:
88

99
```
1010
#This is the atom file containing all the information
@@ -48,11 +48,10 @@ Next, the `INPUT` file is required, which sets all key parameters to direct ABAC
4848
```
4949
INPUT_PARAMETERS
5050
suffix MgO
51-
ntype 2
5251
pseudo_dir ./
5352
orbital_dir ./
5453
ecutwfc 100 # Rydberg
55-
scf_thr 1e-4 # Rydberg
54+
scf_thr 1e-6 # SCF criterion
5655
basis_type lcao
5756
calculation scf # this is the key parameter telling abacus to do a scf calculation
5857
```
@@ -71,7 +70,7 @@ Gamma
7170
After all the above input files have been set, one should be able to run the first quick example. The simplest way is to use the command line, e.g.:
7271

7372
```
74-
mpirun -np 2 abacus
73+
OMP_NUM_THREADS=1 mpirun -np 2 abacus
7574
```
7675

7776
The main output information is stored in the file `OUT.MgO/running_scf.log`, which starts with
@@ -138,10 +137,9 @@ The `INPUT` file follows as:
138137
```
139138
INPUT_PARAMETERS
140139
suffix MgO
141-
ntype 2
142140
pseudo_dir ./
143141
ecutwfc 100 # Rydberg
144-
scf_thr 1e-4 # Rydberg
142+
scf_thr 1e-6 # SCF criterion
145143
basis_type pw # changes the type of basis set
146144
calculation scf # this is the key parameter telling abacus to do a scf calculation
147145
```
@@ -201,12 +199,11 @@ The `INPUT` is provided as follows:
201199
```
202200
INPUT_PARAMETERS
203201
suffix MgO
204-
ntype 2
205202
nelec 0.0
206203
pseudo_dir ./
207204
orbital_dir ./
208205
ecutwfc 100 # Rydberg
209-
scf_thr 1e-4 # Rydberg
206+
scf_thr 1e-6 # SCF criterion
210207
basis_type lcao
211208
calculation cell-relax # this is the key parameter telling abacus to do a optimization calculation
212209
force_thr_ev 0.01 # the threshold of the force convergence, in unit of eV/Angstrom
@@ -223,11 +220,10 @@ The `INPUT` is provided as follows:
223220
```
224221
INPUT_PARAMETERS
225222
suffix MgO
226-
ntype 2
227223
nelec 0.0
228224
pseudo_dir ./
229225
ecutwfc 100 # Rydberg
230-
scf_thr 1e-4 # Rydberg
226+
scf_thr 1e-6 # SCF criterion
231227
basis_type pw
232228
calculation cell-relax # this is the key parameter telling abacus to do a optimization calculation
233229
force_thr_ev 0.01 # the threshold of the force convergence, in unit of eV/Angstrom
@@ -236,4 +232,4 @@ relax_nmax 100 # the maximal number of ionic iteration steps
236232
out_stru 1
237233
```
238234

239-
Use the same `KPT`, `STRU`, and pseudopotential files as in the above SCF-PW examples. The final optimized structure can be found in `STRU_NOW.cif` and `OUT.MgO/running_cell-relax.log`.
235+
Use the same `KPT`, `STRU`, and pseudopotential files as in the above SCF-PW examples. The final optimized structure can be found in `STRU_NOW.cif` and `STRU_ION_D` with different format.

0 commit comments

Comments
 (0)