Skip to content

Commit b990dfa

Browse files
njzjztuoping
andauthored
Apply suggestions from code review
Co-authored-by: tuoping <[email protected]>
1 parent c1a1224 commit b990dfa

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

source/_posts/tutorial1.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ where `npy` is the compressed format of the numpy, which is required by the DeeP
4040
We assume `OUTCAR` stores 1000 frames of molecular dynamics trajectory, then where will be 1000 points after converting.
4141
`set_size=200` means these 1000 points will be divided into 5 subsets, which is named as `data/set.000`~`data/set.004`, respectively.
4242
The size of each set is 200.
43-
In these 5 sets, `data/set.000`~`data/set.003` will be considered as the trainign set by the DeePMD-kit, and `data/set.004` will be considered as the test set.
43+
In these 5 sets, `data/set.000`~`data/set.003` will be considered as the training set by the DeePMD-kit, and `data/set.004` will be considered as the test set.
4444
The last set will be considered as the test set by the DeePMD-kit by default.
45-
If there is only one set, the set will be both the training set and the test set. (Of course, such the test set is meaningless.)
45+
If there is only one set, the set will be both the training set and the test set. (Of course, such test set is meaningless.)
4646
It's required to prepare an input script to start the DeePMD-kit training.
4747
Are you still out of the fear of being dominated by INCAR script?
4848
Don't worry, it's much easier to configure the DeePMD-kit than configuring the VASP.
@@ -60,7 +60,7 @@ Here is the first parameter to modify:
6060
```
6161

6262
In the DeePMD-kit data, each atom type is numbered as an integer starting from 0.
63-
The parameter gices an element name to each atom in the numbering system.
63+
The parameter gives an element name to each atom in the numbering system.
6464
Here, we can copy from the content of `data/type_map.raw`.
6565
For example,
6666

@@ -79,7 +79,7 @@ For example, `46` means there are at most 46 `O` (type `0`) neighbours.
7979
Here, our elements were modified to `A`, `B`, and `C`, so this parameters is also required to modify.
8080
What to do if you don’t know the maximum number of neighbors?
8181
You can be roughly estimate one by the density of the system, or try a number blindly.
82-
If it is not big enough, the DeePMD-kit will tell you.
82+
If it is not big enough, the DeePMD-kit will shoot WARNINGS.
8383
Below we changed it to
8484

8585
```json
@@ -98,12 +98,15 @@ to
9898
"systems": ["./data/"],
9999
```
100100

101-
It is the reason that the directory to write to is `./data/` in the current directory.
102-
Here I'd like to introduce the defination of the data system.
103-
The DeePMD-kit considers that data with the same atomic number and elements can form a system.
101+
It is because that the directory to write to is `./data/` in the current directory.
102+
Here I'd like to introduce the definition of the data system.
103+
The DeePMD-kit considers that data with corresponding element types and atomic numbers form a system.
104104
Our data is generated from a molecular dynamics simulation and meets this condition, so we can put them into one system.
105-
Dpdata also did so.
106-
If data cannot be put into a system, multiple systems is required to be set as a list.
105+
Dpdata works the same way.
106+
If data cannot be put into a system, multiple systems is required to be set as a list here:
107+
```json
108+
"training": {
109+
"systems": [system1, system2]
107110

108111
Finnally, we are likely to modify another two parameters:
109112

@@ -126,7 +129,7 @@ dp train input.json
126129
```
127130

128131
and wait for results. During the training process, we can see `lcurve.out` to observe the error reduction.
129-
Among them, Column 4 and 5 are the test and training errors of energy (normalize the number of atoms), and Column 6 and 7 are the test and training errors of the force.
132+
Among them, Column 4 and 5 are the test and training errors of energy (normalized by the number of atoms), and Column 6 and 7 are the test and training errors of the force.
130133

131134
After training, we can use the following script to freeze the model:
132135

@@ -136,4 +139,3 @@ dp freeze
136139

137140
The default filename of the output model is `frozen_model.pb`. As so, we have got a good or bad DP model.
138141
As for the reliability of this model and how to use it, I will give you a detailed tutorial in the next post.
139-

0 commit comments

Comments
 (0)