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

update type embedding doc #967

Merged
merged 1 commit into from
Aug 13, 2021
Merged
Changes from all commits
Commits
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
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