Skip to content

Commit

Permalink
docs: DPRc for PT, DPModel (#3373)
Browse files Browse the repository at this point in the history
It should be merged after #3370.

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
  • Loading branch information
njzjz authored Mar 1, 2024
1 parent f684be8 commit 2594f09
Showing 1 changed file with 49 additions and 2 deletions.
51 changes: 49 additions & 2 deletions doc/model/dprc.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Deep Potential - Range Correction (DPRc) {{ tensorflow_icon }}
# Deep Potential - Range Correction (DPRc) {{ tensorflow_icon }} {{ pytorch_icon }} {{ dpmodel_icon }}

:::{note}
**Supported backends**: TensorFlow {{ tensorflow_icon }}
**Supported backends**: TensorFlow {{ tensorflow_icon }}, PyTorch {{ pytorch_icon }}, DPModel {{ dpmodel_icon }}
:::

Deep Potential - Range Correction (DPRc) is designed to combine with QM/MM method, and corrects energies from a low-level QM/MM method to a high-level QM/MM method:
Expand Down Expand Up @@ -62,6 +62,10 @@ In a DPRc model, QM atoms and MM atoms have different atom types. Assuming we ha

As described in the paper, the DPRc model only corrects $E_\text{QM}$ and $E_\text{QM/MM}$ within the cutoff, so we use a hybrid descriptor to describe them separatedly:

::::{tab-set}

:::{tab-item} TensorFlow {{ tensorflow_icon }}

```json
"descriptor" :{
"type": "hybrid",
Expand Down Expand Up @@ -91,6 +95,45 @@ As described in the paper, the DPRc model only corrects $E_\text{QM}$ and $E_\te
}
```

:::

:::{tab-item} PyTorch {{ pytorch_icon }}

```json
"descriptor" :{
"type": "hybrid",
"list" : [
{
"type": "se_e2_a",
"sel": [6, 11, 0, 6, 0, 1],
"rcut_smth": 1.00,
"rcut": 9.00,
"neuron": [12, 25, 50],
"exclude_types": [[2, 2], [2, 4], [4, 4], [0, 2], [0, 4], [1, 2], [1, 4], [3, 2], [3, 4], [5, 2], [5, 4]],
"axis_neuron": 12,
"type_one_side": true,
"_comment": " QM/QM interaction"
},
{
"type": "se_e2_a",
"sel": [6, 11, 100, 6, 50, 1],
"rcut_smth": 0.50,
"rcut": 6.00,
"neuron": [12, 25, 50],
"exclude_types": [[0, 0], [0, 1], [0, 3], [0, 5], [1, 1], [1, 3], [1, 5], [3, 3], [3, 5], [5, 5], [2, 2], [2, 4], [4, 4]],
"axis_neuron": 12,
"set_davg_zero": true,
"type_one_side": true,
"_comment": " QM/MM interaction"
}
]
}
```

:::

::::

{ref}`exclude_types <model/descriptor[se_a_ebd_v2]/exclude_types>` can be generated by the following Python script:
```py
from itertools import combinations_with_replacement, product
Expand Down Expand Up @@ -131,6 +174,10 @@ The DPRc model has the best practices with the [AMBER](../third-party/out-of-dee

## Pairwise DPRc

:::{note}
**Supported backends**: TensorFlow {{ tensorflow_icon }}
:::

If one wants to correct from a low-level method into a full DFT level, and the system is too large to do full DFT calculation, one may try the experimental pairwise DPRc model.
In a pairwise DPRc model, the total energy is divided into QM internal energy and the sum of QM/MM energy for each MM residue $l$:

Expand Down

0 comments on commit 2594f09

Please sign in to comment.