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

add an example of nopbc and related docs #994

Merged
merged 1 commit into from
Aug 18, 2021
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions doc/data/data-conv.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ $ ls
box.raw coord.raw energy.raw force.raw set.000 set.001 set.002 type.raw virial.raw
```
It generates three sets `set.000`, `set.001` and `set.002`, with each set contains 2000 frames. One do not need to take care of the binary data files in each of the `set.*` directories. The path containing `set.*` and `type.raw` is called a *system*.

If one needs to train a non-periodic system, an empty `nopbc` file should be put under the system directory. `box.raw` is not necessary is a non-periodic system.

4 changes: 2 additions & 2 deletions doc/train/training-advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Other training parameters are given in the `training` section.
}
```
The sections `"training_data"` and `"validation_data"` give the training dataset and validation dataset, respectively. Taking the training dataset for example, the keys are explained below:
* `systems` provide paths of the training data systems. DeePMD-kit allows you to provide multiple systems. This key can be a `list` or a `str`.
* `systems` provide paths of the training data systems. DeePMD-kit allows you to provide multiple systems with different numbers of atoms. This key can be a `list` or a `str`.
* `list`: `systems` gives the training data systems.
* `str`: `systems` should be a valid path. DeePMD-kit will recursively search all data systems in this path.
* At each training step, DeePMD-kit randomly pick `batch_size` frame(s) from one of the systems. The probability of using a system is by default in proportion to the number of batches in the system. More optional are available for automatically determining the probability of using systems. One can set the key `auto_prob` to
Expand Down Expand Up @@ -118,4 +118,4 @@ One can set other environmental variables:

| Environment variables | Allowed value | Default value | Usage |
| --------------------- | ---------------------- | ------------- | -------------------------- |
| DP_INTERFACE_PREC | `high`, `low` | `high` | Control high (double) or low (float) precision of training. |
| DP_INTERFACE_PREC | `high`, `low` | `high` | Control high (double) or low (float) precision of training. |
8 changes: 8 additions & 0 deletions examples/nopbc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Example of training non-periodic data

This is an example of training Deep Potential models using non-periodic data with flexible sizes. The example is extracted from the following reference.

It's warned that the example data is of very limited amount, so it cannot be put into production. Full data set can be downloaded from the following reference.

Zeng, J., Cao, L., Xu, M. et al. Complex reaction processes in combustion unraveled by neural network-based molecular dynamics simulation. Nat Commun 11, 5713 (2020). DOI: [10.1038/s41467-020-19497-z](https://doi.org/10.1038/s41467-020-19497-z)

Empty file.
Binary file added examples/nopbc/data/C1H4O2/set.000/coord.npy
Binary file not shown.
Binary file added examples/nopbc/data/C1H4O2/set.000/energy.npy
Binary file not shown.
Binary file added examples/nopbc/data/C1H4O2/set.000/force.npy
Binary file not shown.
7 changes: 7 additions & 0 deletions examples/nopbc/data/C1H4O2/type.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
1
1
1
1
0
2
2
3 changes: 3 additions & 0 deletions examples/nopbc/data/C1H4O2/type_map.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
C
H
O
Empty file.
Binary file added examples/nopbc/data/C3H3O4/set.000/coord.npy
Binary file not shown.
Binary file added examples/nopbc/data/C3H3O4/set.000/energy.npy
Binary file not shown.
Binary file added examples/nopbc/data/C3H3O4/set.000/force.npy
Binary file not shown.
10 changes: 10 additions & 0 deletions examples/nopbc/data/C3H3O4/type.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
1
1
1
0
0
0
2
2
2
2
3 changes: 3 additions & 0 deletions examples/nopbc/data/C3H3O4/type_map.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
C
H
O
Empty file.
Binary file added examples/nopbc/data/C4H3O1/set.000/coord.npy
Binary file not shown.
Binary file added examples/nopbc/data/C4H3O1/set.000/energy.npy
Binary file not shown.
Binary file added examples/nopbc/data/C4H3O1/set.000/force.npy
Binary file not shown.
8 changes: 8 additions & 0 deletions examples/nopbc/data/C4H3O1/type.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
1
1
1
0
0
0
0
2
3 changes: 3 additions & 0 deletions examples/nopbc/data/C4H3O1/type_map.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
C
H
O
60 changes: 60 additions & 0 deletions examples/nopbc/train/input.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"_comment": " model parameters",
"model": {
"type_map": ["C", "H", "O"],
"descriptor" :{
"type": "se_e2_a",
"sel": [40, 80, 40],
"rcut_smth": 1.00,
"rcut": 6.00,
"neuron": [25, 50, 100],
"resnet_dt": false,
"axis_neuron": 12,
"seed": 1,
"_comment": " that's all"
},
"fitting_net" : {
"neuron": [240, 240, 240],
"resnet_dt": true,
"seed": 1,
"_comment": " that's all"
},
"_comment": " that's all"
},

"learning_rate" :{
"type": "exp",
"decay_steps": 4000,
"start_lr": 0.001,
"stop_lr": 3.51e-8,
"_comment": "that's all"
},

"loss" :{
"type": "ener",
"start_pref_e": 0.02,
"limit_pref_e": 1,
"start_pref_f": 1000,
"limit_pref_f": 1,
"start_pref_v": 0,
"limit_pref_v": 0,
"_comment": " that's all"
},

"training" : {
"training_data": {
"systems": "../data/",
"batch_size": "auto",
"_comment": "that's all"
},
"numb_steps": 4000000,
"seed": 10,
"disp_file": "lcurve.out",
"disp_freq": 100,
"save_freq": 1000,
"_comment": "that's all"
},

"_comment": "that's all"
}