Skip to content

Commit 90960d3

Browse files
authored
Merge branch 'develop' into off-nloc-vdw-xc
2 parents 4c1b930 + e27ac49 commit 90960d3

File tree

105 files changed

+2707
-2234
lines changed

Some content is hidden

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

105 files changed

+2707
-2234
lines changed

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, etc.) in molecular and material simulations.
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.
1616

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

docs/CITATIONS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The following references are required to be cited when using ABACUS. Specificall
2626

2727
- **If DeePKS is used:**
2828

29-
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>.
29+
Wenfei Li, Qi Ou, et al. "DeePKS+ABACUS as a Bridge between Expensive Quantum Mechanical Models and Machine Learning Potentials." J. Phys. Chem. A 126.49 (2022): 9154-9164.
3030

3131
- **If hybrid functional is used:**
3232

docs/advanced/input_files/input-main.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ These variables are used to control the plane wave related parameters.
728728

729729
- **Type**: Real
730730
- **Description**: Energy cutoff for plane wave functions, the unit is **Rydberg**. Note that even for localized orbitals basis, you still need to setup an energy cutoff for this system. Because our local pseudopotential parts and the related force are calculated from plane wave basis set, etc. Also, because our orbitals are generated by matching localized orbitals to a chosen set of wave functions from a certain energy cutoff, this set of localize orbitals is most accurate under this same plane wave energy cutoff.
731-
- **Default**: 50
731+
- **Default**: 50 Ry (PW basis), 100 Ry (LCAO basis)
732732

733733
### ecutrho
734734

docs/advanced/interface/deepks.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
# DeePKS
22

3-
[DeePKS](https://pubs.acs.org/doi/10.1021/acs.jctc.0c00872) is a machine-learning aided density funcitonal model that fits the energy difference between highly accurate but computationally demanding method and effcient but less accurate method via neural-network. As such, the trained DeePKS model can provide highly accurate energetics (and forces) with relatively low computational cost, and can therefore act as a bridge to connect expensive quantum mechanic data and machine-learning-based potentials. While the original framework of DeePKS is for molecular systems, please refer to this [reference](https://arxiv.org/abs/2206.10093) for the application of DeePKS in periodic systems.
3+
[DeePKS](https://pubs.acs.org/doi/10.1021/acs.jctc.0c00872) is a machine-learning (ML) aided density funcitonal model that fits the energy difference between highly accurate but computationally demanding method and effcient but less accurate method via neural-network. Common high-precision methods include hybrid functionals or CCSD-T, while common low-precision methods are LDA/GGA.
44

5-
Detailed instructions on installing and running DeePKS can be found on this [website](https://deepks-kit.readthedocs.io/en/latest/index.html). An [example](https://github.com/deepmodeling/deepks-kit/tree/abacus/examples/water_single_lda2pbe_abacus) for training DeePKS model with ABACUS is also provided. The DeePKS-related keywords in `INPUT` file can be found [here](http://abacus.deepmodeling.com/en/latest/advanced/input_files/input-main.html#deepks).
5+
As such, the trained DeePKS model can provide highly accurate energetics (and forces/band gap/density) with relatively low computational cost, and can therefore act as a bridge to connect expensive quantum mechanic data and machine-learning-based potentials.
6+
While the original framework of DeePKS is for molecular systems, please refer to this [J. Phys. Chem. A 126.49 (2022): 9154-9164](https://pubs.acs.org/doi/abs/10.1021/acs.jpca.2c05000) for the application of DeePKS in periodic systems.
67

7-
> Note: Use the LCAO basis for DeePKS-related calculations
8+
Detailed instructions on installing and running DeePKS can be found on this [website](https://deepks-kit.readthedocs.io/en/latest/index.html). The DeePKS-related keywords in `INPUT` file can be found [here](http://abacus.deepmodeling.com/en/latest/advanced/input_files/input-main.html#deepks). An [example](https://github.com/deepmodeling/deepks-kit/tree/abacus/examples/water_single_lda2pbe_abacus) for training DeePKS model with ABACUS is also provided. For practical applications, users can refer to a series of [Notebooks](https://bohrium.dp.tech/collections/1921409690). These Notebooks provide detailed instructions on how to train and use the DeePKS model using perovskite as an example. Currently, these tutorials are available in Chinese, but we plan to release corresponding English versions in the near future.
9+
10+
11+
12+
> Note: DeePKS calculations can only be performed by the LCAO basis.
813
914

docs/advanced/interface/deeptb.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# DeePTB
2+
3+
[DeePTB](https://github.com/deepmodeling/DeePTB) is an innovative Python package that uses deep learning to accelerate ab initio electronic structure simulations. It offers versatile, accurate, and efficient simulations for a wide range of materials and phenomena. Trained on small systems, DeePTB can predict electronic structures of large systems, handle structural perturbations, and integrate with molecular dynamics for finite temperature simulations, providing comprehensive insights into atomic and electronic behavior. See more details in [DeePTB-SK: Nat Commun 15, 6772 (2024)](https://www.nature.com/articles/s41467-024-51006-4) and [DeePTB-E3: arXiv:2407.06053](https://arxiv.org/pdf/2407.06053).
4+
5+
DeePTB trains the model based on the Structure, Eigenvalues, Hamiltonian, Density matrix, and Overlap matrix from first-principles calcualtions. DeePTB team provides the interfaces [dftio](https://github.com/deepmodeling/dftio) with other first-principles softwares. [dftio](https://github.com/deepmodeling/dftio) fully supports the interfaces with ABACUS, and can transfer the Structure, Eigenvalues, Hamiltonian, Density matrix, and Overlap matrix from ABACUS into the format used in [DeePTB](https://github.com/deepmodeling/DeePTB).

docs/advanced/interface/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Interfaces to Other Softwares
99
deepks
1010
dpgen
1111
deeph
12+
deeptb
1213
Hefei-NAMD
1314
phonopy
1415
Wannier90

docs/conf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
extensions = [
3434
'myst_parser',
3535
'deepmodeling_sphinx',
36-
'sphinxcontrib.jquery',
3736
]
3837
myst_enable_extensions = [
3938
"amsmath",
@@ -66,7 +65,7 @@
6665
# The theme to use for HTML and HTML Help pages. See the documentation for
6766
# a list of builtin themes.
6867
#
69-
html_theme = 'sphinx_rtd_theme'
68+
html_theme = 'sphinx_book_theme'
7069
html_logo = 'abacus-logo.svg'
7170

7271

docs/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
urllib3
22
myst_parser[linkify]
3-
sphinx_rtd_theme
4-
deepmodeling_sphinx
3+
sphinx-book-theme
4+
deepmodeling-sphinx>=0.3.0

source/Makefile.Objects

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,6 @@ OBJS_ESOLVER=esolver.o\
243243
esolver_of.o\
244244
esolver_of_tool.o\
245245
esolver_of_interface.o\
246-
print_funcs.o\
247246
pw_fun.o\
248247
pw_init_after_vc.o\
249248
pw_init_globalc.o\
Lines changed: 36 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,47 @@
11
#include "./elecstate_pw_sdft.h"
2+
3+
#include "module_base/global_function.h"
24
#include "module_base/global_variable.h"
3-
#include "module_parameter/parameter.h"
45
#include "module_base/timer.h"
5-
#include "module_base/global_function.h"
66
#include "module_hamilt_general/module_xc/xc_functional.h"
7+
#include "module_parameter/parameter.h"
78
namespace elecstate
89
{
9-
void ElecStatePW_SDFT::psiToRho(const psi::Psi<std::complex<double>>& psi)
10+
11+
template <typename T, typename Device>
12+
void ElecStatePW_SDFT<T, Device>::psiToRho(const psi::Psi<T>& psi)
13+
{
14+
ModuleBase::TITLE(this->classname, "psiToRho");
15+
ModuleBase::timer::tick(this->classname, "psiToRho");
16+
for (int is = 0; is < PARAM.inp.nspin; is++)
1017
{
11-
ModuleBase::TITLE(this->classname, "psiToRho");
12-
ModuleBase::timer::tick(this->classname, "psiToRho");
13-
for(int is=0; is < PARAM.inp.nspin; is++)
14-
{
15-
ModuleBase::GlobalFunc::ZEROS(this->charge->rho[is], this->charge->nrxx);
16-
if (XC_Functional::get_func_type() == 3)
17-
{
18-
ModuleBase::GlobalFunc::ZEROS(this->charge->kin_r[is], this->charge->nrxx);
19-
}
20-
}
21-
22-
if(GlobalV::MY_STOGROUP == 0)
23-
{
24-
this->calEBand();
18+
ModuleBase::GlobalFunc::ZEROS(this->charge->rho[is], this->charge->nrxx);
19+
if (XC_Functional::get_func_type() == 3)
20+
{
21+
ModuleBase::GlobalFunc::ZEROS(this->charge->kin_r[is], this->charge->nrxx);
22+
}
23+
}
24+
25+
if (GlobalV::MY_STOGROUP == 0)
26+
{
27+
this->calEBand();
2528

26-
for(int is=0; is<PARAM.inp.nspin; is++)
27-
{
28-
ModuleBase::GlobalFunc::ZEROS(this->charge->rho[is], this->charge->nrxx);
29-
}
29+
for (int is = 0; is < PARAM.inp.nspin; is++)
30+
{
31+
ModuleBase::GlobalFunc::ZEROS(this->charge->rho[is], this->charge->nrxx);
32+
}
3033

31-
for (int ik = 0; ik < psi.get_nk(); ++ik)
32-
{
33-
psi.fix_k(ik);
34-
this->updateRhoK(psi);
35-
}
36-
this->parallelK();
34+
for (int ik = 0; ik < psi.get_nk(); ++ik)
35+
{
36+
psi.fix_k(ik);
37+
this->updateRhoK(psi);
3738
}
38-
ModuleBase::timer::tick(this->classname, "psiToRho");
39-
return;
39+
this->parallelK();
4040
}
41-
}
41+
ModuleBase::timer::tick(this->classname, "psiToRho");
42+
return;
43+
}
44+
45+
// template class ElecStatePW_SDFT<std::complex<float>, base_device::DEVICE_CPU>;
46+
template class ElecStatePW_SDFT<std::complex<double>, base_device::DEVICE_CPU>;
47+
} // namespace elecstate

0 commit comments

Comments
 (0)