Skip to content

Commit

Permalink
update type embedding doc (#967)
Browse files Browse the repository at this point in the history
  • Loading branch information
yhliu918 authored Aug 13, 2021
1 parent 074f3f2 commit ee0f6e6
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions doc/development/type-embedding.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ Here is an overview of the deepmd-kit algorithm. Given a specific centric atom,
## Preliminary
In the following chart, you can find the meaning of symbols used to clarify the atom type embedding algorithm.

Symbol| Meaning
---Atom| :---:
is| Type of centric atom
j| Type of neighbor atom
s_ij| Distance between centric atom and neighbor atom
G_ij(·)Atom| Origin embedding net, take s_ij as input and output embedding vector of M1 dim
G(·) | Shared embedding net
Multi(·) | Matrix multiplication and flattening, output the descriptor vector of M1*M2 dim
F_i(·) | Origin fitting net, take the descriptor vector as input and output energy
F(·) | Shared fitting net
A(·) | Atom type embedding net, input is atom type, output is type embedding vector of dim `nchanl`
|Symbol| Meaning|
|---| :---:|
|i| Type of centric atom|
|j| Type of neighbor atom|
|s_ij| Distance between centric atom and neighbor atom|
|G_ij(·)| Origin embedding net, take s_ij as input and output embedding vector of M1 dim|
|G(·) | Shared embedding net|
|Multi(·) | Matrix multiplication and flattening, output the descriptor vector of M1*M2 dim|
|F_i(·) | Origin fitting net, take the descriptor vector as input and output energy|
|F(·) | Shared fitting net|
|A(·) | Atom type embedding net, input is atom type, output is type embedding vector of dim `nchanl`|

So, we can formulate the training process as follows.
Vanilla deepmd-kit algorithm:
Expand All @@ -24,11 +24,11 @@ Energy = F_i( Multi( G_ij( s_ij ) ) )
```
Deepmd-kit applying atom type embedding:
```
Energy = F( [ Multi( G_ij( [s_ij, A(i), A(j)] ) ), A(j)] )
Energy = F( [ Multi( G( [s_ij, A(i), A(j)] ) ), A(j)] )
```
or
```
Energy = F( [ Multi( G_ij( [s_ij, A(j)] ) ), A(j)] )
Energy = F( [ Multi( G( [s_ij, A(j)] ) ), A(j)] )
```
The difference between two variants above is whether using the information of centric atom when generating the descriptor. Users can choose by modifying the `type_one_side` hyper-parameter in the input json file.

Expand Down

0 comments on commit ee0f6e6

Please sign in to comment.