Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Support machine-learning based kinetic energy density functional for OFDFT #5777

Merged
merged 73 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
5fe9268
refactor: Remove the global variable 'global_pseudo_type' and the inp…
sunliang98 Sep 15, 2022
bddc45b
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
sunliang98 Sep 15, 2022
7f6e47f
test: Remove `pseudo_type` from INPUT of all integrate tests, and add…
sunliang98 Sep 15, 2022
8c827a1
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
sunliang98 Sep 16, 2022
e19d414
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
sunliang98 Sep 22, 2022
861ea9f
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
sunliang98 Sep 30, 2022
fcd542e
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
sunliang98 Oct 11, 2022
fc9bd11
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
sunliang98 Oct 14, 2022
3ed4231
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
sunliang98 Oct 16, 2022
e4b6222
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
sunliang98 Oct 24, 2022
27dac25
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
sunliang98 Oct 27, 2022
9459daa
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
sunliang98 Nov 28, 2022
c74fa52
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
sunliang98 Nov 29, 2022
1737eec
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
sunliang98 Dec 6, 2022
bb133e7
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
sunliang98 Dec 9, 2022
604bff5
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
sunliang98 Feb 13, 2023
135c504
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
sunliang98 Feb 27, 2023
2616267
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
sunliang98 Mar 1, 2023
cc3fc0b
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
sunliang98 Mar 8, 2023
491270d
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
sunliang98 Mar 15, 2023
235055a
<Feature> Add input parameters about ML_KE
sunliang98 Feb 26, 2024
aaaf87b
<Feature> Add files about ML_KE into module_hamilt_pw/hamilt_ofdft
sunliang98 Feb 26, 2024
f8b4975
<Feature> Link MPN KEDF to ABACUS
sunliang98 Feb 26, 2024
4d7ad73
<Test> Add a unittest of MPN KEDF: 902_OF_KE_MPN
sunliang98 Feb 26, 2024
4d97f05
Merge branch 'develop' of https://github.com/sunliang98/abacus-develo…
sunliang98 Mar 20, 2024
0e6921c
Merge branch 'deepmodeling:develop' into ML_KEDF_merge
sunliang98 Mar 20, 2024
f5df6ad
<Feature> Output more detailed information of Energy in KSDFT
sunliang98 Mar 20, 2024
a3833d1
Merge branch 'ML_KEDF_merge' of https://github.com/sunliang98/abacus-…
sunliang98 Mar 20, 2024
ffa2dcf
<Test> Update the integrate test 902_OF_KE_MPN
sunliang98 Apr 11, 2024
dc28b4a
Merge branch 'master' of https://github.com/sunliang98/abacus-develop…
sunliang98 Apr 11, 2024
b60795e
<Feature> In order to check the validity of MPN KEDF, calculate and o…
sunliang98 Jun 23, 2024
f3b7061
Check the input rho in the localTest of MPN KEDF
sunliang98 Jun 23, 2024
493de42
Merge branch 'master' of https://github.com/sunliang98/abacus-develop…
sunliang98 Jun 23, 2024
0a36374
<Feature> Add a new descriptor: r_min = min|r-R| / r0, r0 = (Omega / …
sunliang98 Jun 25, 2024
e0a58ea
<Fix> Fix the scaling formula of kernel.
sunliang98 Jul 25, 2024
438f5cf
Correct the defination of img.
sunliang98 Oct 16, 2024
4bf06e0
Merge branch 'develop' of https://github.com/deepmodeling/abacus-deve…
sunliang98 Oct 17, 2024
ca57fbf
Update parameters
sunliang98 Oct 18, 2024
2cfd0ce
Feature: Add a compile option ENABLE_MLKEDF to control the ML KEDF mo…
sunliang98 Nov 14, 2024
ae17685
Feature: Simplify the code.
sunliang98 Nov 14, 2024
34858ac
Support Makefile
sunliang98 Dec 13, 2024
2a4ad5f
Merge branch 'develop' of https://github.com/sunliang98/abacus-develo…
sunliang98 Dec 13, 2024
9c9bc4c
Refactor:
sunliang98 Dec 23, 2024
39998a9
Refactor:
sunliang98 Dec 24, 2024
e1164c5
Doc: Update documents.
sunliang98 Dec 26, 2024
84baffb
Test: Add two integrate tests: 902_OF_KE_MPN and 902_OF_KE_CPN5
sunliang98 Dec 26, 2024
70fc5e1
Doc: Update annotations.
sunliang98 Dec 26, 2024
e47ba01
Refactor: Update the CMakeLists.txt of nnof
sunliang98 Dec 26, 2024
5fdbf52
Merge branch 'develop' of https://github.com/sunliang98/abacus-develo…
sunliang98 Dec 27, 2024
7989246
Test: Configure compilation test.
sunliang98 Dec 27, 2024
4292fe8
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Dec 27, 2024
8487708
Replace pow with std::pow
sunliang98 Dec 27, 2024
3b9876d
1. Rename potential.h (class Potential) as pauli_potential.h (class P…
sunliang98 Dec 30, 2024
48bf3f2
Merge branch 'develop' of https://github.com/sunliang98/abacus-develo…
sunliang98 Dec 30, 2024
fa46030
Feature: Provide default parameters for MPN and CPN5 KEDF.
sunliang98 Dec 30, 2024
679e66f
Doc: Update the document of `of_kinetic`.
sunliang98 Dec 31, 2024
54e1d8f
Merge branch 'develop' of https://github.com/sunliang98/abacus-develo…
sunliang98 Dec 31, 2024
6190d29
Update the file names of nnof
sunliang98 Jan 2, 2025
39f07bb
Merge branch 'develop' of https://github.com/sunliang98/abacus-develo…
sunliang98 Jan 2, 2025
6d97982
Make: Update Makefile, and compile documents.
sunliang98 Jan 4, 2025
a79c595
Merge branch 'develop' of https://github.com/sunliang98/abacus-develo…
sunliang98 Jan 4, 2025
6c98b37
Remove useless input parameters: `of_ml_nnode` and `of_ml_nlayer`
sunliang98 Jan 4, 2025
c749f72
Update the integrate tests of MPN and CPN5 KEDFs
sunliang98 Jan 4, 2025
6213fdf
Add function `get_local_pp_energy` into ElecState to calculatet the e…
sunliang98 Jan 5, 2025
168e9b9
Correct the name of eion_elec to elocal_pp, since the nonlocal part i…
sunliang98 Jan 5, 2025
97c92ad
Merge branch 'develop' of https://github.com/sunliang98/abacus-develo…
sunliang98 Jan 5, 2025
99eae78
Test: Fix module_elecstate/test/elecstate_energy_test.cpp
sunliang98 Jan 6, 2025
09547e3
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Jan 6, 2025
62e17e1
Remove useless head file parallel_reduce.h from esolver_ks.cpp
sunliang98 Jan 6, 2025
01dc920
Merge branch 'develop' of https://github.com/sunliang98/abacus-develo…
sunliang98 Jan 6, 2025
3e25aaa
Merge branch 'ML_KEDF_merge-develop' of https://github.com/sunliang98…
sunliang98 Jan 6, 2025
fbd9a6e
Format ml_tools/data.cpp and ml_tools/grid.cpp
sunliang98 Jan 6, 2025
c15aed2
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Jan 6, 2025
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
4 changes: 2 additions & 2 deletions .github/workflows/build_test_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
name: "Build with Intel toolchain"

- tag: gnu
build_args: "-DENABLE_LIBXC=1 -DENABLE_DEEPKS=1 -DENABLE_LIBRI=1 -DENABLE_PAW=1"
build_args: "-DENABLE_LIBXC=1 -DENABLE_DEEPKS=1 -DENABLE_MLKEDF=1 -DENABLE_LIBRI=1 -DENABLE_PAW=1"
name: "Build extra components with GNU toolchain"
- tag: intel
build_args: "-DENABLE_LIBXC=1 -DENABLE_DEEPKS=1 -DENABLE_LIBRI=1"
build_args: "-DENABLE_LIBXC=1 -DENABLE_DEEPKS=1 -DENABLE_MLKEDF=1 -DENABLE_LIBRI=1"
name: "Build extra components with Intel toolchain"

- tag: cuda
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- name: Configure
run: |
cmake -B build -DBUILD_TESTING=ON -DENABLE_DEEPKS=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON -DENABLE_PAW=ON -DENABLE_GOOGLEBENCH=ON -DENABLE_RAPIDJSON=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=1
cmake -B build -DBUILD_TESTING=ON -DENABLE_DEEPKS=ON -DENABLE_MLKEDF=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON -DENABLE_PAW=ON -DENABLE_GOOGLEBENCH=ON -DENABLE_RAPIDJSON=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=1

- uses: pre-commit/action@v3.0.1
with:
Expand Down
22 changes: 21 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ project(

option(ENABLE_LCAO "Enable LCAO calculation." ON)
option(ENABLE_DEEPKS "Enable DeePKS functionality" OFF)
option(ENABLE_MLKEDF "Enable Machine Learning based KEDF for OFDFT" OFF)
option(ENABLE_LIBXC "Enable LibXC functionality" OFF)
option(USE_CUDA "Enable support to CUDA for ABACUS." OFF)
option(ENABLE_FLOAT_FFTW "Enable support to single precision FFTW library." OFF)
Expand Down Expand Up @@ -469,10 +470,29 @@ if(ENABLE_DEEPKS)
add_compile_definitions(__DEEPKS)
endif()

if(ENABLE_MLKEDF)
target_link_libraries(${ABACUS_BIN_NAME} hamilt_mlkedf)

find_path(libnpy_SOURCE_DIR npy.hpp HINTS ${libnpy_INCLUDE_DIR})
if(NOT libnpy_SOURCE_DIR)
include(FetchContent)
FetchContent_Declare(
libnpy
GIT_REPOSITORY https://github.com/llohse/libnpy.git
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE)
FetchContent_MakeAvailable(libnpy)
else()
include_directories(${libnpy_INCLUDE_DIR})
endif()
include_directories(${libnpy_SOURCE_DIR}/include)
add_compile_definitions(__MLKEDF)
endif()

# Torch uses outdated components to detect CUDA arch, causing failure on
# latest CUDA kits. Set CMake variable TORCH_CUDA_ARCH_LIST in the form of
# "major.minor" if required.
if(ENABLE_DEEPKS OR DEFINED Torch_DIR)
if(ENABLE_DEEPKS OR ENABLE_MLKEDF OR DEFINED Torch_DIR)
find_package(Torch REQUIRED)
if(NOT Torch_VERSION VERSION_LESS "2.1.0")
set_if_higher(CMAKE_CXX_STANDARD 17)
Expand Down
6 changes: 6 additions & 0 deletions docs/CITATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,9 @@ The following references are required to be cited when using ABACUS. Specificall
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.

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.

- **If ML-KEDF is used:**

Sun, Liang, and Mohan Chen. "Machine learning based nonlocal kinetic energy density functional for simple metals and alloys." Physical Review B 109.11 (2024): 115135.

Sun, Liang, and Mohan Chen. "Multi-channel machine learning based nonlocal kinetic energy density functional for semiconductors." Electronic Structure 6.4 (2024): 045006.
254 changes: 253 additions & 1 deletion docs/advanced/input_files/input-main.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,36 @@
- [of\_kernel\_file](#of_kernel_file)
- [of\_full\_pw](#of_full_pw)
- [of\_full\_pw\_dim](#of_full_pw_dim)
- [ML-KEDF: machine learning based kinetic energy density functional for OFDFT](#ml-kedf-machine-learning-based-kinetic-energy-density-functional-for-ofdft)
- [of\_ml\_gene\_data](#of_ml_gene_data)
- [of\_ml\_device](#of_ml_device)
- [of\_ml\_feg](#of_ml_feg)
- [of\_ml\_nkernel](#of_ml_nkernel)
- [of\_ml\_kernel](#of_ml_kernel)
- [of\_ml\_kernel\_scaling](#of_ml_kernel_scaling)
- [of\_ml\_yukawa\_alpha](#of_ml_yukawa_alpha)
- [of\_ml\_kernel\_file](#of_ml_kernel_file)
- [of\_ml\_gamma](#of_ml_gamma)
- [of\_ml\_p](#of_ml_p)
- [of\_ml\_q](#of_ml_q)
- [of\_ml\_tanhp](#of_ml_tanhp)
- [of\_ml\_tanhq](#of_ml_tanhq)
- [of\_ml\_gammanl](#of_ml_gammanl)
- [of\_ml\_pnl](#of_ml_pnl)
- [of\_ml\_qnl](#of_ml_qnl)
- [of\_ml\_xi](#of_ml_xi)
- [of\_ml\_tanhxi](#of_ml_tanhxi)
- [of\_ml\_tanhxi\_nl](#of_ml_tanhxi_nl)
- [of\_ml\_tanh\_pnl](#of_ml_tanh_pnl)
- [of\_ml\_tanh\_qnl](#of_ml_tanh_qnl)
- [of\_ml\_tanhp\_nl](#of_ml_tanhp_nl)
- [of\_ml\_tanhq\_nl](#of_ml_tanhq_nl)
- [of\_ml\_chi\_p](#of_ml_chi_p)
- [of\_ml\_chi\_q](#of_ml_chi_q)
- [of\_ml\_chi\_xi](#of_ml_chi_xi)
- [of\_ml\_chi\_pnl](#of_ml_chi_pnl)
- [of\_ml\_chi\_qnl](#of_ml_chi_qnl)
- [of\_ml\_local\_test](#of_ml_local_test)
- [Electric field and dipole correction](#electric-field-and-dipole-correction)
- [efield\_flag](#efield_flag)
- [dip\_cor\_flag](#dip_cor_flag)
Expand Down Expand Up @@ -2077,11 +2107,18 @@ Warning: this function is not robust enough for the current version. Please try
- **Type**: String
- **Availability**: OFDFT
- **Description**: The type of KEDF (kinetic energy density functional).

Analytical functionals:
- **wt**: Wang-Teter.
- **tf**: Thomas-Fermi.
- **vw**: von Weizsäcker.
- **tf+**: TF$\rm{\lambda}$vW, the parameter $\rm{\lambda}$ can be set by `of_vw_weight`.
- **tf+**: TF $\rm{\lambda}$ vW, the parameter $\rm{\lambda}$ can be set by `of_vw_weight`.
- **lkt**: Luo-Karasiev-Trickey.

Machine learning (ML) based functionals:
- **ml**: ML-based KEDF allows for greater flexibility, enabling users to set related ML model parameters themselves. see [ML-KEDF: machine learning based kinetic energy density functional for OFDFT](#ml-kedf-machine-learning-based-kinetic-energy-density-functional-for-ofdft).
- **mpn**: ML-based Physically-constrained Non-local (MPN) KEDF. ABACUS automatically configures the necessary parameters, requiring no manual intervention from the user.
- **cpn5**: Multi-Channel MPN (CPN) KEDF with 5 channels. Similar to mpn, ABACUS handles all parameter settings automatically.
- **Default**: wt

### of_method
Expand Down Expand Up @@ -2212,6 +2249,221 @@ Warning: this function is not robust enough for the current version. Please try

[back to top](#full-list-of-input-keywords)

## ML-KEDF: machine learning based kinetic energy density functional for OFDFT

### of_ml_gene_data

- **Type**: Boolean
- **Availability**: OFDFT
- **Description**: Generate training data or not.
- **Default**: False

### of_ml_device

- **Type**: String
- **Availability**: OFDFT
- **Description**: Run Neural Network on GPU or CPU.
- **cpu**: CPU
- **gpu**: GPU
- **Default**: cpu

### of_ml_feg

- **Type**: Integer
- **Availability**: OFDFT
- **Description**: The method to incorporate the Free Electron Gas (FEG) limit: $F_\theta |_{\rm{FEG}} = 1$, where $F_\theta$ is enhancement factor of Pauli energy.
- **0**: Do not incorporate the FEG limit.
- **1**: Incorporate the FEG limit by translation: $F_\theta = F^{\rm{NN}}_\theta - F^{\rm{NN}}_\theta|_{\rm{FEG}} + 1$.
- **3**: Incorporate the FEG limit by nonlinear transformation: $F_\theta = f(F^{\rm{NN}}_\theta - F^{\rm{NN}}_\theta|_{\rm{FEG}} + \ln(e - 1))$, where $f = \ln(1 + e^x)$ is softplus function, satisfying $f(x)|_{x=\ln(e-1)} = 1$.
- **Default**: 0

### of_ml_nkernel

- **Type**: Integer
- **Availability**: OFDFT
- **Description**: Number of kernel functions.
- **Default**: 1

### of_ml_kernel

- **Type**: Vector of Integer
- **Availability**: OFDFT
- **Description**: Containing nkernel (see [of_ml_nkernel](#of_ml_nkernel)) elements. The $i$-th element specifies the type of the $i$-th kernel function.
- **1**: Wang-Teter kernel function.
- **2**: Modified Yukawa function: $k_{\rm{F}}^2\frac{\exp{({-\alpha k_{\rm{F}}|\mathbf{r}-\mathbf{r}'|})}}{|\mathbf{r}-\mathbf{r}'|}$, and $\alpha$ is specified by [of_ml_yukawa_alpha](#of_ml_yukawa_alpha).
- **3**: Truncated kinetic kernel (TKK), the file containing TKK is specified by [of_ml_kernel_file](#of_kernel_file).
- **Default**: 1

### of_ml_kernel_scaling

- **Type**: Vector of Real
- **Availability**: OFDFT
- **Description**: Containing nkernel (see [of_ml_nkernel](#of_ml_nkernel)) elements. The $i$-th element specifies the RECIPROCAL of scaling parameter $\lambda$ of the $i$-th kernel function. $w_i(\mathbf{r}-\mathbf{r}') = \lambda^3 w_i'(\lambda(\mathbf{r}-\mathbf{r}'))$.
- **Default**: 1.0

### of_ml_yukawa_alpha

- **Type**: Vector of Real
- **Availability**: OFDFT
- **Description**: Containing nkernel (see [of_ml_nkernel](#of_ml_nkernel)) elements. The $i$-th element specifies the parameter $\alpha$ of $i$-th kernel function. ONLY used for Yukawa kernel function.
- **Default**: 1.0

### of_ml_kernel_file

- **Type**: Vector of String
- **Availability**: OFDFT
- **Description**: Containing nkernel (see [of_ml_nkernel](#of_ml_nkernel)) elements. The $i$-th element specifies the file containint the $i$-th kernel function. ONLY used for TKK.
- **Default**: none

### of_ml_gamma

- **Type**: Boolean
- **Availability**: OFDFT
- **Description**: Local descriptor: $\gamma(\mathbf{r}) = (\rho(\mathbf{r}) / \rho_0)^{1/3}$.
- **Default**: False

### of_ml_p

- **Type**: Boolean
- **Availability**: OFDFT
- **Description**: Semi-local descriptor: $p(\mathbf{r}) = \frac{|\nabla \rho(\mathbf{r})|^2} {[2 (3 \pi^2)^{1/3} \rho^{4/3}(\mathbf{r})]^2}$.
- **Default**: False

### of_ml_q

- **Type**: Boolean
- **Availability**: OFDFT
- **Description**: Semi-local descriptor: $q(\mathbf{r}) = \frac{\nabla^2 \rho(\mathbf{r})} {[4 (3 \pi^2)^{2/3} \rho^{5/3}(\mathbf{r})]}$.
- **Default**: False

### of_ml_tanhp

- **Type**: Boolean
- **Availability**: OFDFT
- **Description**: Semi-local descriptor: $\tilde{p}(\mathbf{r}) = \tanh(\chi_p p(\mathbf{r}))$.
- **Default**: False

### of_ml_tanhq

- **Type**: Boolean
- **Availability**: OFDFT
- **Description**: Semi-local descriptor: $\tilde{q}(\mathbf{r}) = \tanh(\chi_q q(\mathbf{r}))$.
- **Default**: False

### of_ml_chi_p

- **Type**: Real
- **Availability**: OFDFT
- **Description**: Hyperparameter $\chi_p$: $\tilde{p}(\mathbf{r}) = \tanh(\chi_p p(\mathbf{r}))$.
- **Default**: 1.0

### of_ml_chi_q

- **Type**: Real
- **Availability**: OFDFT
- **Description**: Hyperparameter $\chi_q$: $\tilde{q}(\mathbf{r}) = \tanh(\chi_q q(\mathbf{r}))$.
- **Default**: False

### of_ml_gammanl

- **Type**: Vector of Integer
- **Availability**: OFDFT
- **Description**: Containing nkernel (see [of_ml_nkernel](#of_ml_nkernel)) elements. The $i$-th element controls the non-local descriptor defined by the $i$-th kernel function $w_i(\mathbf{r}-\mathbf{r}')$: $\gamma_{\rm{nl}}(\mathbf{r}) = \int{w_i(\mathbf{r}-\mathbf{r}') \gamma(\mathbf{r}') dr'}$.
- **Default**: 0

### of_ml_pnl

- **Type**: Vector of Integer
- **Availability**: OFDFT
- **Description**: Containing nkernel (see [of_ml_nkernel](#of_ml_nkernel)) elements. The $i$-th element controls the non-local descriptor defined by the $i$-th kernel function $w_i(\mathbf{r}-\mathbf{r}')$: $p_{\rm{nl}}(\mathbf{r}) = \int{w_i(\mathbf{r}-\mathbf{r}') p(\mathbf{r}') dr'}$.
- **Default**: 0

### of_ml_qnl

- **Type**: Vector of Integer
- **Availability**: OFDFT
- **Description**: Containing nkernel (see [of_ml_nkernel](#of_ml_nkernel)) elements. The $i$-th element controls the non-local descriptor defined by the $i$-th kernel function $w_i(\mathbf{r}-\mathbf{r}')$: $q_{\rm{nl}}(\mathbf{r}) = \int{w_i(\mathbf{r}-\mathbf{r}') q(\mathbf{r}') dr'}$.
- **Default**: 0

### of_ml_xi

- **Type**: Vector of Integer
- **Availability**: OFDFT
- **Description**: Containing nkernel (see [of_ml_nkernel](#of_ml_nkernel)) elements. The $i$-th element controls the non-local descriptor defined by the $i$-th kernel function $w_i(\mathbf{r}-\mathbf{r}')$: $\xi(\mathbf{r}) = \frac{\int{w_i(\mathbf{r}-\mathbf{r}') \rho^{1/3}(\mathbf{r}') dr'}}{\rho^{1/3}(\mathbf{r})}$.
- **Default**: 0

### of_ml_tanhxi

- **Type**: Vector of Integer
- **Availability**: OFDFT
- **Description**: Containing nkernel (see [of_ml_nkernel](#of_ml_nkernel)) elements. The $i$-th element controls the non-local descriptor defined by the $i$-th kernel function $w_i(\mathbf{r}-\mathbf{r}')$: $\tilde{\xi}(\mathbf{r}) = \tanh(\chi_{\xi} \xi(\mathbf{r}))$.
- **Default**: 0

### of_ml_tanhxi_nl

- **Type**: Vector of Integer
- **Availability**: OFDFT
- **Description**: Containing nkernel (see [of_ml_nkernel](#of_ml_nkernel)) elements. The $i$-th element controls the non-local descriptor defined by the $i$-th kernel function $w_i(\mathbf{r}-\mathbf{r}')$: $\tilde{\xi}_{\rm{nl}}(\mathbf{r}) = \int{w_i(\mathbf{r}-\mathbf{r}') \tilde{\xi}(\mathbf{r}') dr'}$.
- **Default**: 0

### of_ml_tanh_pnl

- **Type**: Vector of Integer
- **Availability**: OFDFT
- **Description**: Containing nkernel (see [of_ml_nkernel](#of_ml_nkernel)) elements. The $i$-th element controls the non-local descriptor defined by the $i$-th kernel function $w_i(\mathbf{r}-\mathbf{r}')$: $\tilde{p_{\rm{nl}}}(\mathbf{r}) = \tanh{(\chi_{p_{\rm{nl}}} p_{\rm{nl}}(\mathbf{r}))}$.
- **Default**: 0

### of_ml_tanh_qnl

- **Type**: Vector of Integer
- **Availability**: OFDFT
- **Description**: Containing nkernel (see [of_ml_nkernel](#of_ml_nkernel)) elements. The $i$-th element controls the non-local descriptor defined by the $i$-th kernel function $w_i(\mathbf{r}-\mathbf{r}')$: $\tilde{q_{\rm{nl}}}(\mathbf{r}) = \tanh{(\chi_{q_{\rm{nl}}} q_{\rm{nl}}(\mathbf{r}))}$.
- **Default**: 0

### of_ml_tanhp_nl

- **Type**: Vector of Integer
- **Availability**: OFDFT
- **Description**: Containing nkernel (see [of_ml_nkernel](#of_ml_nkernel)) elements. The $i$-th element controls the non-local descriptor defined by the $i$-th kernel function $w_i(\mathbf{r}-\mathbf{r}')$: $\tilde{p}_{\rm{nl}}(\mathbf{r}) = \int{w_i(\mathbf{r}-\mathbf{r}') \tilde{p}(\mathbf{r}') dr'}$.
- **Default**: 0

### of_ml_tanhq_nl

- **Type**: Vector of Integer
- **Availability**: OFDFT
- **Description**: Containing nkernel (see [of_ml_nkernel](#of_ml_nkernel)) elements. The $i$-th element controls the non-local descriptor defined by the $i$-th kernel function $w_i(\mathbf{r}-\mathbf{r}')$: $\tilde{q}_{\rm{nl}}(\mathbf{r}) = \int{w_i(\mathbf{r}-\mathbf{r}') \tilde{q}(\mathbf{r}') dr'}$.
- **Default**: 0

### of_ml_chi_xi

- **Type**: Vector of Real
- **Availability**: OFDFT
- **Description**: Containing nkernel (see [of_ml_nkernel](#of_ml_nkernel)) elements. The $i$-th element specifies the hyperparameter $\chi_\xi$ of non-local descriptor defined by the $i$-th kernel function $w_i(\mathbf{r}-\mathbf{r}')$: $\tilde{\xi}(\mathbf{r}) = \tanh(\chi_{\xi} \xi(\mathbf{r}))$.
- **Default**: 1.0

### of_ml_chi_pnl

- **Type**: Vector of Real
- **Availability**: OFDFT
- **Description**: Containing nkernel (see [of_ml_nkernel](#of_ml_nkernel)) elements. The $i$-th element specifies the hyperparameter $\chi_{p_{\rm{nl}}}$ of non-local descriptor defined by the $i$-th kernel function $w_i(\mathbf{r}-\mathbf{r}')$: $\tilde{p_{\rm{nl}}}(\mathbf{r}) = \tanh{(\chi_{p_{\rm{nl}}} p_{\rm{nl}}(\mathbf{r}))}$.
- **Default**: 1.0

### of_ml_chi_qnl

- **Type**: Vector of Real
- **Availability**: OFDFT
- **Description**: Containing nkernel (see [of_ml_nkernel](#of_ml_nkernel)) elements. The $i$-th element specifies the hyperparameter $\chi_{q_{\rm{nl}}}$ of non-local descriptor defined by the $i$-th kernel function $w_i(\mathbf{r}-\mathbf{r}')$: $\tilde{q_{\rm{nl}}}(\mathbf{r}) = \tanh{(\chi_{q_{\rm{nl}}} q_{\rm{nl}}(\mathbf{r}))}$.
- **Default**: 1.0

### of_ml_local_test

- **Type**: Boolean
- **Availability**: OFDFT
- **Description**: FOR TEST. Read in the density, and output the F and Pauli potential.
- **Default**: False

[back to top](#full-list-of-input-keywords)

## Electric field and dipole correction

These variables are relevant to electric field and dipole correction
Expand Down
Loading
Loading