Skip to content

Commit 4009f6a

Browse files
Feature: Support machine-learning based kinetic energy density functional for OFDFT (#5777)
* refactor: Remove the global variable 'global_pseudo_type' and the input variable 'pseudo_type'. Now the type of pseudopotential is assigned in STRU, not INPUT, and different type of pseudopotentials can be assigned for different elements in one calculation. Following are the supported format of STRU: Al 26.98 Al_ONCV_PBE-1.2.upf Al 26.98 Al_ONCV_PBE-1.2.upf auto Al 26.98 Al_ONCV_PBE-1.2.upf upf201 Al 26.98 Al_ONCV_PBE-1.2.upf upf201 # annotations... If no pseudo_type is assigned in STRU, the default value is 'auto', and ABACUS will recongnize the pp by itself. * test: Remove `pseudo_type` from INPUT of all integrate tests, and add them into STRU. Add two integrate tests, `101_PW_upf201_blps_pseudopots` and `101_PW_upf201_upf100_pseudopots`, which contain two elements (Mg3Al), and different types of pseudopotentials are specified for different elements. * <Feature> Add input parameters about ML_KE * <Feature> Add files about ML_KE into module_hamilt_pw/hamilt_ofdft * <Feature> Link MPN KEDF to ABACUS * <Test> Add a unittest of MPN KEDF: 902_OF_KE_MPN * <Feature> Output more detailed information of Energy in KSDFT * <Test> Update the integrate test 902_OF_KE_MPN * <Feature> In order to check the validity of MPN KEDF, calculate and output TF KEDF when running MPN KEDF. * Check the input rho in the localTest of MPN KEDF * <Feature> Add a new descriptor: r_min = min|r-R| / r0, r0 = (Omega / natom) ** (1/3). * <Fix> Fix the scaling formula of kernel. * Correct the defination of img. * Update parameters * Feature: Add a compile option ENABLE_MLKEDF to control the ML KEDF module. * Feature: Simplify the code. * Support Makefile * Refactor: Remove GlobalC::ucell. Optimize the format of input parameters of ML KEDF. * Refactor: 1. Update annotation. 2. Remove useless parameters and codes. * Doc: Update documents. * Test: Add two integrate tests: 902_OF_KE_MPN and 902_OF_KE_CPN5 * Doc: Update annotations. * Refactor: Update the CMakeLists.txt of nnof * Test: Configure compilation test. * [pre-commit.ci lite] apply automatic fixes * Replace pow with std::pow * 1. Rename potential.h (class Potential) as pauli_potential.h (class PauliPotential). 2. Replace si.gga.psp used by 902_OF_KE_CPN5 with si.lda.lps. * Feature: Provide default parameters for MPN and CPN5 KEDF. * Doc: Update the document of `of_kinetic`. * Update the file names of nnof * Make: Update Makefile, and compile documents. * Remove useless input parameters: `of_ml_nnode` and `of_ml_nlayer` * Update the integrate tests of MPN and CPN5 KEDFs * Add function `get_local_pp_energy` into ElecState to calculatet the energy contributed by local pseudopotential. * Correct the name of eion_elec to elocal_pp, since the nonlocal part is not considered. Delet the output of Ekinetic, since it only works for local pp. * Test: Fix module_elecstate/test/elecstate_energy_test.cpp * [pre-commit.ci lite] apply automatic fixes * Remove useless head file parallel_reduce.h from esolver_ks.cpp * Format ml_tools/data.cpp and ml_tools/grid.cpp * [pre-commit.ci lite] apply automatic fixes --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
1 parent eb19348 commit 4009f6a

Some content is hidden

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

63 files changed

+6428
-42
lines changed

.github/workflows/build_test_cmake.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
name: "Build with Intel toolchain"
1818

1919
- tag: gnu
20-
build_args: "-DENABLE_LIBXC=1 -DENABLE_DEEPKS=1 -DENABLE_LIBRI=1 -DENABLE_PAW=1"
20+
build_args: "-DENABLE_LIBXC=1 -DENABLE_DEEPKS=1 -DENABLE_MLKEDF=1 -DENABLE_LIBRI=1 -DENABLE_PAW=1"
2121
name: "Build extra components with GNU toolchain"
2222
- tag: intel
23-
build_args: "-DENABLE_LIBXC=1 -DENABLE_DEEPKS=1 -DENABLE_LIBRI=1"
23+
build_args: "-DENABLE_LIBXC=1 -DENABLE_DEEPKS=1 -DENABLE_MLKEDF=1 -DENABLE_LIBRI=1"
2424
name: "Build extra components with Intel toolchain"
2525

2626
- tag: cuda

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
3232
- name: Configure
3333
run: |
34-
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
34+
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
3535
3636
- uses: pre-commit/[email protected]
3737
with:

CMakeLists.txt

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ project(
1212

1313
option(ENABLE_LCAO "Enable LCAO calculation." ON)
1414
option(ENABLE_DEEPKS "Enable DeePKS functionality" OFF)
15+
option(ENABLE_MLKEDF "Enable Machine Learning based KEDF for OFDFT" OFF)
1516
option(ENABLE_LIBXC "Enable LibXC functionality" OFF)
1617
option(USE_CUDA "Enable support to CUDA for ABACUS." OFF)
1718
option(ENABLE_FLOAT_FFTW "Enable support to single precision FFTW library." OFF)
@@ -469,10 +470,29 @@ if(ENABLE_DEEPKS)
469470
add_compile_definitions(__DEEPKS)
470471
endif()
471472

473+
if(ENABLE_MLKEDF)
474+
target_link_libraries(${ABACUS_BIN_NAME} hamilt_mlkedf)
475+
476+
find_path(libnpy_SOURCE_DIR npy.hpp HINTS ${libnpy_INCLUDE_DIR})
477+
if(NOT libnpy_SOURCE_DIR)
478+
include(FetchContent)
479+
FetchContent_Declare(
480+
libnpy
481+
GIT_REPOSITORY https://github.com/llohse/libnpy.git
482+
GIT_SHALLOW TRUE
483+
GIT_PROGRESS TRUE)
484+
FetchContent_MakeAvailable(libnpy)
485+
else()
486+
include_directories(${libnpy_INCLUDE_DIR})
487+
endif()
488+
include_directories(${libnpy_SOURCE_DIR}/include)
489+
add_compile_definitions(__MLKEDF)
490+
endif()
491+
472492
# Torch uses outdated components to detect CUDA arch, causing failure on
473493
# latest CUDA kits. Set CMake variable TORCH_CUDA_ARCH_LIST in the form of
474494
# "major.minor" if required.
475-
if(ENABLE_DEEPKS OR DEFINED Torch_DIR)
495+
if(ENABLE_DEEPKS OR ENABLE_MLKEDF OR DEFINED Torch_DIR)
476496
find_package(Torch REQUIRED)
477497
if(NOT Torch_VERSION VERSION_LESS "2.1.0")
478498
set_if_higher(CMAKE_CXX_STANDARD 17)

docs/CITATIONS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,9 @@ The following references are required to be cited when using ABACUS. Specificall
3333
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.
3434

3535
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.
36+
37+
- **If ML-KEDF is used:**
38+
39+
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.
40+
41+
Sun, Liang, and Mohan Chen. "Multi-channel machine learning based nonlocal kinetic energy density functional for semiconductors." Electronic Structure 6.4 (2024): 045006.

docs/advanced/input_files/input-main.md

Lines changed: 253 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,36 @@
210210
- [of\_kernel\_file](#of_kernel_file)
211211
- [of\_full\_pw](#of_full_pw)
212212
- [of\_full\_pw\_dim](#of_full_pw_dim)
213+
- [ML-KEDF: machine learning based kinetic energy density functional for OFDFT](#ml-kedf-machine-learning-based-kinetic-energy-density-functional-for-ofdft)
214+
- [of\_ml\_gene\_data](#of_ml_gene_data)
215+
- [of\_ml\_device](#of_ml_device)
216+
- [of\_ml\_feg](#of_ml_feg)
217+
- [of\_ml\_nkernel](#of_ml_nkernel)
218+
- [of\_ml\_kernel](#of_ml_kernel)
219+
- [of\_ml\_kernel\_scaling](#of_ml_kernel_scaling)
220+
- [of\_ml\_yukawa\_alpha](#of_ml_yukawa_alpha)
221+
- [of\_ml\_kernel\_file](#of_ml_kernel_file)
222+
- [of\_ml\_gamma](#of_ml_gamma)
223+
- [of\_ml\_p](#of_ml_p)
224+
- [of\_ml\_q](#of_ml_q)
225+
- [of\_ml\_tanhp](#of_ml_tanhp)
226+
- [of\_ml\_tanhq](#of_ml_tanhq)
227+
- [of\_ml\_gammanl](#of_ml_gammanl)
228+
- [of\_ml\_pnl](#of_ml_pnl)
229+
- [of\_ml\_qnl](#of_ml_qnl)
230+
- [of\_ml\_xi](#of_ml_xi)
231+
- [of\_ml\_tanhxi](#of_ml_tanhxi)
232+
- [of\_ml\_tanhxi\_nl](#of_ml_tanhxi_nl)
233+
- [of\_ml\_tanh\_pnl](#of_ml_tanh_pnl)
234+
- [of\_ml\_tanh\_qnl](#of_ml_tanh_qnl)
235+
- [of\_ml\_tanhp\_nl](#of_ml_tanhp_nl)
236+
- [of\_ml\_tanhq\_nl](#of_ml_tanhq_nl)
237+
- [of\_ml\_chi\_p](#of_ml_chi_p)
238+
- [of\_ml\_chi\_q](#of_ml_chi_q)
239+
- [of\_ml\_chi\_xi](#of_ml_chi_xi)
240+
- [of\_ml\_chi\_pnl](#of_ml_chi_pnl)
241+
- [of\_ml\_chi\_qnl](#of_ml_chi_qnl)
242+
- [of\_ml\_local\_test](#of_ml_local_test)
213243
- [Electric field and dipole correction](#electric-field-and-dipole-correction)
214244
- [efield\_flag](#efield_flag)
215245
- [dip\_cor\_flag](#dip_cor_flag)
@@ -2093,11 +2123,18 @@ Warning: this function is not robust enough for the current version. Please try
20932123
- **Type**: String
20942124
- **Availability**: OFDFT
20952125
- **Description**: The type of KEDF (kinetic energy density functional).
2126+
2127+
Analytical functionals:
20962128
- **wt**: Wang-Teter.
20972129
- **tf**: Thomas-Fermi.
20982130
- **vw**: von Weizsäcker.
2099-
- **tf+**: TF$\rm{\lambda}$vW, the parameter $\rm{\lambda}$ can be set by `of_vw_weight`.
2131+
- **tf+**: TF $\rm{\lambda}$ vW, the parameter $\rm{\lambda}$ can be set by `of_vw_weight`.
21002132
- **lkt**: Luo-Karasiev-Trickey.
2133+
2134+
Machine learning (ML) based functionals:
2135+
- **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).
2136+
- **mpn**: ML-based Physically-constrained Non-local (MPN) KEDF. ABACUS automatically configures the necessary parameters, requiring no manual intervention from the user.
2137+
- **cpn5**: Multi-Channel MPN (CPN) KEDF with 5 channels. Similar to mpn, ABACUS handles all parameter settings automatically.
21012138
- **Default**: wt
21022139

21032140
### of_method
@@ -2228,6 +2265,221 @@ Warning: this function is not robust enough for the current version. Please try
22282265

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

2268+
## ML-KEDF: machine learning based kinetic energy density functional for OFDFT
2269+
2270+
### of_ml_gene_data
2271+
2272+
- **Type**: Boolean
2273+
- **Availability**: OFDFT
2274+
- **Description**: Generate training data or not.
2275+
- **Default**: False
2276+
2277+
### of_ml_device
2278+
2279+
- **Type**: String
2280+
- **Availability**: OFDFT
2281+
- **Description**: Run Neural Network on GPU or CPU.
2282+
- **cpu**: CPU
2283+
- **gpu**: GPU
2284+
- **Default**: cpu
2285+
2286+
### of_ml_feg
2287+
2288+
- **Type**: Integer
2289+
- **Availability**: OFDFT
2290+
- **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.
2291+
- **0**: Do not incorporate the FEG limit.
2292+
- **1**: Incorporate the FEG limit by translation: $F_\theta = F^{\rm{NN}}_\theta - F^{\rm{NN}}_\theta|_{\rm{FEG}} + 1$.
2293+
- **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$.
2294+
- **Default**: 0
2295+
2296+
### of_ml_nkernel
2297+
2298+
- **Type**: Integer
2299+
- **Availability**: OFDFT
2300+
- **Description**: Number of kernel functions.
2301+
- **Default**: 1
2302+
2303+
### of_ml_kernel
2304+
2305+
- **Type**: Vector of Integer
2306+
- **Availability**: OFDFT
2307+
- **Description**: Containing nkernel (see [of_ml_nkernel](#of_ml_nkernel)) elements. The $i$-th element specifies the type of the $i$-th kernel function.
2308+
- **1**: Wang-Teter kernel function.
2309+
- **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).
2310+
- **3**: Truncated kinetic kernel (TKK), the file containing TKK is specified by [of_ml_kernel_file](#of_kernel_file).
2311+
- **Default**: 1
2312+
2313+
### of_ml_kernel_scaling
2314+
2315+
- **Type**: Vector of Real
2316+
- **Availability**: OFDFT
2317+
- **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}'))$.
2318+
- **Default**: 1.0
2319+
2320+
### of_ml_yukawa_alpha
2321+
2322+
- **Type**: Vector of Real
2323+
- **Availability**: OFDFT
2324+
- **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.
2325+
- **Default**: 1.0
2326+
2327+
### of_ml_kernel_file
2328+
2329+
- **Type**: Vector of String
2330+
- **Availability**: OFDFT
2331+
- **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.
2332+
- **Default**: none
2333+
2334+
### of_ml_gamma
2335+
2336+
- **Type**: Boolean
2337+
- **Availability**: OFDFT
2338+
- **Description**: Local descriptor: $\gamma(\mathbf{r}) = (\rho(\mathbf{r}) / \rho_0)^{1/3}$.
2339+
- **Default**: False
2340+
2341+
### of_ml_p
2342+
2343+
- **Type**: Boolean
2344+
- **Availability**: OFDFT
2345+
- **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}$.
2346+
- **Default**: False
2347+
2348+
### of_ml_q
2349+
2350+
- **Type**: Boolean
2351+
- **Availability**: OFDFT
2352+
- **Description**: Semi-local descriptor: $q(\mathbf{r}) = \frac{\nabla^2 \rho(\mathbf{r})} {[4 (3 \pi^2)^{2/3} \rho^{5/3}(\mathbf{r})]}$.
2353+
- **Default**: False
2354+
2355+
### of_ml_tanhp
2356+
2357+
- **Type**: Boolean
2358+
- **Availability**: OFDFT
2359+
- **Description**: Semi-local descriptor: $\tilde{p}(\mathbf{r}) = \tanh(\chi_p p(\mathbf{r}))$.
2360+
- **Default**: False
2361+
2362+
### of_ml_tanhq
2363+
2364+
- **Type**: Boolean
2365+
- **Availability**: OFDFT
2366+
- **Description**: Semi-local descriptor: $\tilde{q}(\mathbf{r}) = \tanh(\chi_q q(\mathbf{r}))$.
2367+
- **Default**: False
2368+
2369+
### of_ml_chi_p
2370+
2371+
- **Type**: Real
2372+
- **Availability**: OFDFT
2373+
- **Description**: Hyperparameter $\chi_p$: $\tilde{p}(\mathbf{r}) = \tanh(\chi_p p(\mathbf{r}))$.
2374+
- **Default**: 1.0
2375+
2376+
### of_ml_chi_q
2377+
2378+
- **Type**: Real
2379+
- **Availability**: OFDFT
2380+
- **Description**: Hyperparameter $\chi_q$: $\tilde{q}(\mathbf{r}) = \tanh(\chi_q q(\mathbf{r}))$.
2381+
- **Default**: False
2382+
2383+
### of_ml_gammanl
2384+
2385+
- **Type**: Vector of Integer
2386+
- **Availability**: OFDFT
2387+
- **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'}$.
2388+
- **Default**: 0
2389+
2390+
### of_ml_pnl
2391+
2392+
- **Type**: Vector of Integer
2393+
- **Availability**: OFDFT
2394+
- **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'}$.
2395+
- **Default**: 0
2396+
2397+
### of_ml_qnl
2398+
2399+
- **Type**: Vector of Integer
2400+
- **Availability**: OFDFT
2401+
- **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'}$.
2402+
- **Default**: 0
2403+
2404+
### of_ml_xi
2405+
2406+
- **Type**: Vector of Integer
2407+
- **Availability**: OFDFT
2408+
- **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})}$.
2409+
- **Default**: 0
2410+
2411+
### of_ml_tanhxi
2412+
2413+
- **Type**: Vector of Integer
2414+
- **Availability**: OFDFT
2415+
- **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}))$.
2416+
- **Default**: 0
2417+
2418+
### of_ml_tanhxi_nl
2419+
2420+
- **Type**: Vector of Integer
2421+
- **Availability**: OFDFT
2422+
- **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'}$.
2423+
- **Default**: 0
2424+
2425+
### of_ml_tanh_pnl
2426+
2427+
- **Type**: Vector of Integer
2428+
- **Availability**: OFDFT
2429+
- **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}))}$.
2430+
- **Default**: 0
2431+
2432+
### of_ml_tanh_qnl
2433+
2434+
- **Type**: Vector of Integer
2435+
- **Availability**: OFDFT
2436+
- **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}))}$.
2437+
- **Default**: 0
2438+
2439+
### of_ml_tanhp_nl
2440+
2441+
- **Type**: Vector of Integer
2442+
- **Availability**: OFDFT
2443+
- **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'}$.
2444+
- **Default**: 0
2445+
2446+
### of_ml_tanhq_nl
2447+
2448+
- **Type**: Vector of Integer
2449+
- **Availability**: OFDFT
2450+
- **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'}$.
2451+
- **Default**: 0
2452+
2453+
### of_ml_chi_xi
2454+
2455+
- **Type**: Vector of Real
2456+
- **Availability**: OFDFT
2457+
- **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}))$.
2458+
- **Default**: 1.0
2459+
2460+
### of_ml_chi_pnl
2461+
2462+
- **Type**: Vector of Real
2463+
- **Availability**: OFDFT
2464+
- **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}))}$.
2465+
- **Default**: 1.0
2466+
2467+
### of_ml_chi_qnl
2468+
2469+
- **Type**: Vector of Real
2470+
- **Availability**: OFDFT
2471+
- **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}))}$.
2472+
- **Default**: 1.0
2473+
2474+
### of_ml_local_test
2475+
2476+
- **Type**: Boolean
2477+
- **Availability**: OFDFT
2478+
- **Description**: FOR TEST. Read in the density, and output the F and Pauli potential.
2479+
- **Default**: False
2480+
2481+
[back to top](#full-list-of-input-keywords)
2482+
22312483
## Electric field and dipole correction
22322484

22332485
These variables are relevant to electric field and dipole correction

0 commit comments

Comments
 (0)