Skip to content

Commit

Permalink
add documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Jinzhe Zeng <[email protected]>
  • Loading branch information
njzjz committed Jan 1, 2024
1 parent 21bf696 commit 075f1c3
Showing 1 changed file with 54 additions and 1 deletion.
55 changes: 54 additions & 1 deletion doc/model/pairtab.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Interpolation with a pairwise potential
# Interpolation or combination with a pairwise potential

## Theory
In applications like the radiation damage simulation, the interatomic distance may become too close, so that the DFT calculations fail.
Expand Down Expand Up @@ -33,3 +33,56 @@ where the scale $\alpha_s$ is a tunable scale of the interatomic distance $r_{ij
The pairwise potential $u^{\textrm{pair}}(r)$ is defined by a user-defined table that provides the value of $u^{\textrm{pair}}$ on an evenly discretized grid from 0 to the cutoff distance.[^1]

[^1]: This section is built upon Jinzhe Zeng, Duo Zhang, Denghui Lu, Pinghui Mo, Zeyu Li, Yixiao Chen, Marián Rynik, Li'ang Huang, Ziyao Li, Shaochen Shi, Yingze Wang, Haotian Ye, Ping Tuo, Jiabin Yang, Ye Ding, Yifan Li, Davide Tisi, Qiyu Zeng, Han Bao, Yu Xia, Jiameng Huang, Koki Muraoka, Yibo Wang, Junhan Chang, Fengbo Yuan, Sigbjørn Løland Bore, Chun Cai, Yinnian Lin, Bo Wang, Jiayan Xu, Jia-Xin Zhu, Chenxing Luo, Yuzhi Zhang, Rhys E. A. Goodall, Wenshuo Liang, Anurag Kumar Singh, Sikai Yao, Jingchao Zhang, Renata Wentzcovitch, Jiequn Han, Jie Liu, Weile Jia, Darrin M. York, Weinan E, Roberto Car, Linfeng Zhang, Han Wang, [J. Chem. Phys. 159, 054801 (2023)](https://doi.org/10.1063/5.0155600) licensed under a [Creative Commons Attribution (CC BY) license](http://creativecommons.org/licenses/by/4.0/).

DeePMD-kit also supports combination with a pairwise potential:

```math
E_i = E_i^{\mathrm{DP}} + E_i^{\mathrm{pair}},
```

## Table file

The table file should be a text file that can be read by {py:meth}`numpy.loadtxt`.
The first column is the distance between two atoms, where upper range should be larger than the cutoff radius.
Other columns are two-body interaction energies for pairs of certain types,
in the order of Type_0-Type_0, Type_0-Type_1, ..., Type_0-Type_N, Type_1-Type_1, ..., Type_1-Type_N, ..., and Type_N-Type_N.

The interaction should be smooth at the cut-off distance.

## Interpolation with a short-range pairwise potential

```json
"model": {
"use_srtab": "H2O_tab_potential.txt",
"smin_alpha": 0.1,
"sw_rmin": 0.8,
"sw_rmax": 1.0,
"_comment": "Below uses a normal DP model"
}
```

{ref}`sw_rmin <model/sw_rmin>` and {ref}`sw_rmax <model/sw_rmax>` must be smaller than the cutoff radius of the DP model.

## Combination with a pairwise potential

To combine with a pairwise potential, use the [linear model](./linear.md):

```json
"model": {
"type": "linear_ener",
"weights": "sum",
"models": [
{
"_comment": "Here uses a normal DP model"
},
{
"type": "pairtab",
"tab_file": "dftd3.txt",
"rcut": 10.0,
"sel": 534
}
]
}
```

The {ref}`rcut <model[pairtab]/rcut>` can be larger than that of the DP model.

0 comments on commit 075f1c3

Please sign in to comment.