Skip to content

Commit

Permalink
Merge pull request deepmodeling#319 from amcadmus/master
Browse files Browse the repository at this point in the history
add doc for short-range tabulated interaction
  • Loading branch information
amcadmus authored Jan 1, 2021
2 parents 7564f36 + 6c33cdc commit c3f8c94
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
38 changes: 37 additions & 1 deletion doc/train-input-auto.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,42 @@ model:
The model determines the normalization from the statistics of the data. This key specifies the number of `frames` in each `system` used for statistics.

.. raw:: html

<a id="model/use_srtab"></a>
use_srtab:
| type: ``str``, optional
| argument path: ``model/use_srtab``
The table for the short-range pairwise interaction added on top of DP. The table is a text data file with (N_t + 1) * N_t / 2 + 1 columes. The first colume is the distance between atoms. The second to the last columes are energies for pairs of certain types. For example we have two atom types, 0 and 1. The columes from 2nd to 4th are for 0-0, 0-1 and 1-1 correspondingly.

.. raw:: html

<a id="model/smin_alpha"></a>
smin_alpha:
| type: ``float``, optional
| argument path: ``model/smin_alpha``
The short-range tabulated interaction will be swithed according to the distance of the nearest neighbor. This distance is calculated by softmin. This parameter is the decaying parameter in the softmin. It is only required when `use_srtab` is provided.

.. raw:: html

<a id="model/sw_rmin"></a>
sw_rmin:
| type: ``float``, optional
| argument path: ``model/sw_rmin``
The lower boundary of the interpolation between short-range tabulated interaction and DP. It is only required when `use_srtab` is provided.

.. raw:: html

<a id="model/sw_rmax"></a>
sw_rmax:
| type: ``float``, optional
| argument path: ``model/sw_rmax``
The upper boundary of the interpolation between short-range tabulated interaction and DP. It is only required when `use_srtab` is provided.

.. raw:: html

<a id="model/descriptor"></a>
Expand Down Expand Up @@ -962,7 +998,7 @@ training:

<a id="training/numb_test"></a>
numb_test:
| type: ``int``, optional, default: ``1``
| type: ``int`` | ``list`` | ``str``, optional, default: ``1``
| argument path: ``training/numb_test``
Number of frames used for the test during training.
Expand Down
9 changes: 9 additions & 0 deletions source/train/argcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,18 @@ def model_args ():
doc_data_stat_nbatch = 'The model determines the normalization from the statistics of the data. This key specifies the number of `frames` in each `system` used for statistics.'
doc_descrpt = 'The descriptor of atomic environment.'
doc_fitting = 'The fitting of physical properties.'
doc_use_srtab = 'The table for the short-range pairwise interaction added on top of DP. The table is a text data file with (N_t + 1) * N_t / 2 + 1 columes. The first colume is the distance between atoms. The second to the last columes are energies for pairs of certain types. For example we have two atom types, 0 and 1. The columes from 2nd to 4th are for 0-0, 0-1 and 1-1 correspondingly.'
doc_smin_alpha = 'The short-range tabulated interaction will be swithed according to the distance of the nearest neighbor. This distance is calculated by softmin. This parameter is the decaying parameter in the softmin. It is only required when `use_srtab` is provided.'
doc_sw_rmin = 'The lower boundary of the interpolation between short-range tabulated interaction and DP. It is only required when `use_srtab` is provided.'
doc_sw_rmax = 'The upper boundary of the interpolation between short-range tabulated interaction and DP. It is only required when `use_srtab` is provided.'

ca = Argument("model", dict,
[Argument("type_map", list, optional = True, doc = doc_type_map),
Argument("data_stat_nbatch", int, optional = True, default = 10, doc = doc_data_stat_nbatch),
Argument("use_srtab", str, optional = True, doc = doc_use_srtab),
Argument("smin_alpha", float, optional = True, doc = doc_smin_alpha),
Argument("sw_rmin", float, optional = True, doc = doc_sw_rmin),
Argument("sw_rmax", float, optional = True, doc = doc_sw_rmax),
Argument("descriptor", dict, [], [descrpt_variant_type_args()], doc = doc_descrpt),
Argument("fitting_net", dict, [], [fitting_variant_type_args()], doc = doc_fitting)
])
Expand Down

0 comments on commit c3f8c94

Please sign in to comment.