From 8ab68293c2534b4a4226a1def912980e459a1b01 Mon Sep 17 00:00:00 2001 From: Han Wang Date: Mon, 19 Apr 2021 21:22:31 +0800 Subject: [PATCH] update doc: changed name of descriptors. with updated dargs --- deepmd/utils/argcheck.py | 12 +- doc/train-input-auto.rst | 836 ++++++++++++++++++++------------------- 2 files changed, 434 insertions(+), 414 deletions(-) diff --git a/deepmd/utils/argcheck.py b/deepmd/utils/argcheck.py index 121079bead..1e151b7a1e 100644 --- a/deepmd/utils/argcheck.py +++ b/deepmd/utils/argcheck.py @@ -162,16 +162,16 @@ def descrpt_hybrid_args(): def descrpt_variant_type_args(): link_lf = make_link('loc_frame', 'model/descriptor[loc_frame]') - link_se_a = make_link('se_a', 'model/descriptor[se_a]') - link_se_r = make_link('se_r', 'model/descriptor[se_r]') - link_se_t = make_link('se_t', 'model/descriptor[se_t]') + link_se_e2_a = make_link('se_e2_a', 'model/descriptor[se_e2_a]') + link_se_e2_r = make_link('se_e2_r', 'model/descriptor[se_e2_r]') + link_se_e3 = make_link('se_e3', 'model/descriptor[se_e3]') link_se_a_tpe = make_link('se_a_tpe', 'model/descriptor[se_a_tpe]') link_hybrid = make_link('hybrid', 'model/descriptor[hybrid]') doc_descrpt_type = f'The type of the descritpor. See explanation below. \n\n\ - `loc_frame`: Defines a local frame at each atom, and the compute the descriptor as local coordinates under this frame.\n\n\ -- `se_a`: Used by the smooth edition of Deep Potential. The full relative coordinates are used to construct the descriptor.\n\n\ -- `se_r`: Used by the smooth edition of Deep Potential. Only the distance between atoms is used to construct the descriptor.\n\n\ -- `se_t`: Used by the smooth edition of Deep Potential. The full relative coordinates are used to construct the descriptor. Three-body embedding will be used by this descriptor.\n\n\ +- `se_e2_a`: Used by the smooth edition of Deep Potential. The full relative coordinates are used to construct the descriptor.\n\n\ +- `se_e2_r`: Used by the smooth edition of Deep Potential. Only the distance between atoms is used to construct the descriptor.\n\n\ +- `se_e3`: Used by the smooth edition of Deep Potential. The full relative coordinates are used to construct the descriptor. Three-body embedding will be used by this descriptor.\n\n\ - `se_a_tpe`: Used by the smooth edition of Deep Potential. The full relative coordinates are used to construct the descriptor. Type embedding will be used by this descriptor.\n\n\ - `hybrid`: Concatenate of a list of descriptors as a new descriptor.' diff --git a/doc/train-input-auto.rst b/doc/train-input-auto.rst index 6da37d5264..edfb634654 100644 --- a/doc/train-input-auto.rst +++ b/doc/train-input-auto.rst @@ -1,76 +1,67 @@ -.. raw:: html +.. _`model`: - model: | type: ``dict`` | argument path: ``model`` - .. raw:: html + .. _`model/type_map`: - type_map: | type: ``list``, optional | argument path: ``model/type_map`` A list of strings. Give the name to each type of atoms. - .. raw:: html + .. _`model/data_stat_nbatch`: - data_stat_nbatch: | type: ``int``, optional, default: ``10`` | argument path: ``model/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. - .. raw:: html + .. _`model/data_stat_protect`: - data_stat_protect: | type: ``float``, optional, default: ``0.01`` | argument path: ``model/data_stat_protect`` Protect parameter for atomic energy regression. - .. raw:: html + .. _`model/use_srtab`: - 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 + .. _`model/smin_alpha`: - 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 + .. _`model/sw_rmin`: - 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 + .. _`model/sw_rmax`: - 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 + .. _`model/descriptor`: - descriptor: | type: ``dict`` | argument path: ``model/descriptor`` @@ -80,65 +71,74 @@ model: Depending on the value of *type*, different sub args are accepted. - .. raw:: html + .. _`model/descriptor/type`: - type: | type: ``str`` (flag key) | argument path: ``model/descriptor/type`` + | possible choices: |code:model/descriptor[loc_frame]|_, |code:model/descriptor[se_e2_a]|_, |code:model/descriptor[se_e2_r]|_, |code:model/descriptor[se_e3]|_, |code:model/descriptor[se_a_tpe]|_, |code:model/descriptor[hybrid]|_ - The type of the descritpor. Valid types are `loc_frame <#model/descriptor[loc_frame]>`__, `se_a <#model/descriptor[se_a]>`__, `se_r <#model/descriptor[se_r]>`__, `se_a_3be <#model/descriptor[se_a_3be]>`__, `se_a_tpe <#model/descriptor[se_a_tpe]>`__, `hybrid <#model/descriptor[hybrid]>`__. + The type of the descritpor. See explanation below. - `loc_frame`: Defines a local frame at each atom, and the compute the descriptor as local coordinates under this frame. - - `se_a`: Used by the smooth edition of Deep Potential. The full relative coordinates are used to construct the descriptor. + - `se_e2_a`: Used by the smooth edition of Deep Potential. The full relative coordinates are used to construct the descriptor. - - `se_r`: Used by the smooth edition of Deep Potential. Only the distance between atoms is used to construct the descriptor. + - `se_e2_r`: Used by the smooth edition of Deep Potential. Only the distance between atoms is used to construct the descriptor. - - `se_a_3be`: Used by the smooth edition of Deep Potential. The full relative coordinates are used to construct the descriptor. Three-body embedding will be used by this descriptor. + - `se_e3`: Used by the smooth edition of Deep Potential. The full relative coordinates are used to construct the descriptor. Three-body embedding will be used by this descriptor. - `se_a_tpe`: Used by the smooth edition of Deep Potential. The full relative coordinates are used to construct the descriptor. Type embedding will be used by this descriptor. - `hybrid`: Concatenate of a list of descriptors as a new descriptor. - - `se_ar`: A hybrid of `se_a` and `se_r`. Typically `se_a` has a smaller cut-off while the `se_r` has a larger cut-off. Deprecated, use `hybrid` instead. + .. |code:model/descriptor[loc_frame]| replace:: ``loc_frame`` + .. _`code:model/descriptor[loc_frame]`: `model/descriptor[loc_frame]`_ + .. |code:model/descriptor[se_e2_a]| replace:: ``se_e2_a`` + .. _`code:model/descriptor[se_e2_a]`: `model/descriptor[se_e2_a]`_ + .. |code:model/descriptor[se_e2_r]| replace:: ``se_e2_r`` + .. _`code:model/descriptor[se_e2_r]`: `model/descriptor[se_e2_r]`_ + .. |code:model/descriptor[se_e3]| replace:: ``se_e3`` + .. _`code:model/descriptor[se_e3]`: `model/descriptor[se_e3]`_ + .. |code:model/descriptor[se_a_tpe]| replace:: ``se_a_tpe`` + .. _`code:model/descriptor[se_a_tpe]`: `model/descriptor[se_a_tpe]`_ + .. |code:model/descriptor[hybrid]| replace:: ``hybrid`` + .. _`code:model/descriptor[hybrid]`: `model/descriptor[hybrid]`_ + .. |flag:model/descriptor/type| replace:: *type* + .. _`flag:model/descriptor/type`: `model/descriptor/type`_ - .. raw:: html - - When *type* is set to ``loc_frame``: + .. _`model/descriptor[loc_frame]`: - .. raw:: html + When |flag:model/descriptor/type|_ is set to ``loc_frame``: + + .. _`model/descriptor[loc_frame]/sel_a`: - sel_a: | type: ``list`` | argument path: ``model/descriptor[loc_frame]/sel_a`` A list of integers. The length of the list should be the same as the number of atom types in the system. `sel_a[i]` gives the selected number of type-i neighbors. The full relative coordinates of the neighbors are used by the descriptor. - .. raw:: html + .. _`model/descriptor[loc_frame]/sel_r`: - sel_r: | type: ``list`` | argument path: ``model/descriptor[loc_frame]/sel_r`` A list of integers. The length of the list should be the same as the number of atom types in the system. `sel_r[i]` gives the selected number of type-i neighbors. Only relative distance of the neighbors are used by the descriptor. sel_a[i] + sel_r[i] is recommended to be larger than the maximally possible number of type-i neighbors in the cut-off radius. - .. raw:: html + .. _`model/descriptor[loc_frame]/rcut`: - rcut: | type: ``float``, optional, default: ``6.0`` | argument path: ``model/descriptor[loc_frame]/rcut`` The cut-off radius. The default value is 6.0 - .. raw:: html + .. _`model/descriptor[loc_frame]/axis_rule`: - axis_rule: | type: ``list`` | argument path: ``model/descriptor[loc_frame]/axis_rule`` @@ -158,482 +158,427 @@ model: - axis_rule[i*6+5]: class of the atom defining the second axis of type-i atom. 0 for neighbors with full coordinates and 1 for neighbors only with relative distance. - .. raw:: html + .. _`model/descriptor[se_e2_a]`: - - When *type* is set to ``se_a``: + When |flag:model/descriptor/type|_ is set to ``se_e2_a`` (or its alias ``se_a``): - .. raw:: html + .. _`model/descriptor[se_e2_a]/sel`: - sel: | type: ``list`` - | argument path: ``model/descriptor[se_a]/sel`` + | argument path: ``model/descriptor[se_e2_a]/sel`` A list of integers. The length of the list should be the same as the number of atom types in the system. `sel[i]` gives the selected number of type-i neighbors. `sel[i]` is recommended to be larger than the maximally possible number of type-i neighbors in the cut-off radius. - .. raw:: html + .. _`model/descriptor[se_e2_a]/rcut`: - rcut: | type: ``float``, optional, default: ``6.0`` - | argument path: ``model/descriptor[se_a]/rcut`` + | argument path: ``model/descriptor[se_e2_a]/rcut`` The cut-off radius. - .. raw:: html + .. _`model/descriptor[se_e2_a]/rcut_smth`: - rcut_smth: | type: ``float``, optional, default: ``0.5`` - | argument path: ``model/descriptor[se_a]/rcut_smth`` + | argument path: ``model/descriptor[se_e2_a]/rcut_smth`` Where to start smoothing. For example the 1/r term is smoothed from `rcut` to `rcut_smth` - .. raw:: html + .. _`model/descriptor[se_e2_a]/neuron`: - neuron: | type: ``list``, optional, default: ``[10, 20, 40]`` - | argument path: ``model/descriptor[se_a]/neuron`` + | argument path: ``model/descriptor[se_e2_a]/neuron`` Number of neurons in each hidden layers of the embedding net. When two layers are of the same size or one layer is twice as large as the previous layer, a skip connection is built. - .. raw:: html + .. _`model/descriptor[se_e2_a]/axis_neuron`: - axis_neuron: | type: ``int``, optional, default: ``4`` - | argument path: ``model/descriptor[se_a]/axis_neuron`` + | argument path: ``model/descriptor[se_e2_a]/axis_neuron`` Size of the submatrix of G (embedding matrix). - .. raw:: html + .. _`model/descriptor[se_e2_a]/activation_function`: - activation_function: | type: ``str``, optional, default: ``tanh`` - | argument path: ``model/descriptor[se_a]/activation_function`` + | argument path: ``model/descriptor[se_e2_a]/activation_function`` The activation function in the embedding net. Supported activation functions are "relu", "relu6", "softplus", "sigmoid", "tanh", "gelu". - .. raw:: html + .. _`model/descriptor[se_e2_a]/resnet_dt`: - resnet_dt: | type: ``bool``, optional, default: ``False`` - | argument path: ``model/descriptor[se_a]/resnet_dt`` + | argument path: ``model/descriptor[se_e2_a]/resnet_dt`` Whether to use a "Timestep" in the skip connection - .. raw:: html + .. _`model/descriptor[se_e2_a]/type_one_side`: - type_one_side: | type: ``bool``, optional, default: ``False`` - | argument path: ``model/descriptor[se_a]/type_one_side`` + | argument path: ``model/descriptor[se_e2_a]/type_one_side`` Try to build N_types embedding nets. Otherwise, building N_types^2 embedding nets - .. raw:: html + .. _`model/descriptor[se_e2_a]/precision`: - precision: | type: ``str``, optional, default: ``float64`` - | argument path: ``model/descriptor[se_a]/precision`` + | argument path: ``model/descriptor[se_e2_a]/precision`` The precision of the embedding net parameters, supported options are "default", "float16", "float32", "float64". - .. raw:: html + .. _`model/descriptor[se_e2_a]/trainable`: - trainable: | type: ``bool``, optional, default: ``True`` - | argument path: ``model/descriptor[se_a]/trainable`` + | argument path: ``model/descriptor[se_e2_a]/trainable`` If the parameters in the embedding net is trainable - .. raw:: html + .. _`model/descriptor[se_e2_a]/seed`: - seed: | type: ``int`` | ``NoneType``, optional - | argument path: ``model/descriptor[se_a]/seed`` + | argument path: ``model/descriptor[se_e2_a]/seed`` Random seed for parameter initialization - .. raw:: html + .. _`model/descriptor[se_e2_a]/exclude_types`: - exclude_types: | type: ``list``, optional, default: ``[]`` - | argument path: ``model/descriptor[se_a]/exclude_types`` + | argument path: ``model/descriptor[se_e2_a]/exclude_types`` The Excluded types - .. raw:: html + .. _`model/descriptor[se_e2_a]/set_davg_zero`: - set_davg_zero: | type: ``bool``, optional, default: ``False`` - | argument path: ``model/descriptor[se_a]/set_davg_zero`` + | argument path: ``model/descriptor[se_e2_a]/set_davg_zero`` Set the normalization average to zero. This option should be set when `atom_ener` in the energy fitting is used - .. raw:: html + .. _`model/descriptor[se_e2_r]`: - - When *type* is set to ``se_r``: + When |flag:model/descriptor/type|_ is set to ``se_e2_r`` (or its alias ``se_r``): - .. raw:: html + .. _`model/descriptor[se_e2_r]/sel`: - sel: | type: ``list`` - | argument path: ``model/descriptor[se_r]/sel`` + | argument path: ``model/descriptor[se_e2_r]/sel`` A list of integers. The length of the list should be the same as the number of atom types in the system. `sel[i]` gives the selected number of type-i neighbors. `sel[i]` is recommended to be larger than the maximally possible number of type-i neighbors in the cut-off radius. - .. raw:: html + .. _`model/descriptor[se_e2_r]/rcut`: - rcut: | type: ``float``, optional, default: ``6.0`` - | argument path: ``model/descriptor[se_r]/rcut`` + | argument path: ``model/descriptor[se_e2_r]/rcut`` The cut-off radius. - .. raw:: html + .. _`model/descriptor[se_e2_r]/rcut_smth`: - rcut_smth: | type: ``float``, optional, default: ``0.5`` - | argument path: ``model/descriptor[se_r]/rcut_smth`` + | argument path: ``model/descriptor[se_e2_r]/rcut_smth`` Where to start smoothing. For example the 1/r term is smoothed from `rcut` to `rcut_smth` - .. raw:: html + .. _`model/descriptor[se_e2_r]/neuron`: - neuron: | type: ``list``, optional, default: ``[10, 20, 40]`` - | argument path: ``model/descriptor[se_r]/neuron`` + | argument path: ``model/descriptor[se_e2_r]/neuron`` Number of neurons in each hidden layers of the embedding net. When two layers are of the same size or one layer is twice as large as the previous layer, a skip connection is built. - .. raw:: html + .. _`model/descriptor[se_e2_r]/activation_function`: - activation_function: | type: ``str``, optional, default: ``tanh`` - | argument path: ``model/descriptor[se_r]/activation_function`` + | argument path: ``model/descriptor[se_e2_r]/activation_function`` The activation function in the embedding net. Supported activation functions are "relu", "relu6", "softplus", "sigmoid", "tanh", "gelu". - .. raw:: html + .. _`model/descriptor[se_e2_r]/resnet_dt`: - resnet_dt: | type: ``bool``, optional, default: ``False`` - | argument path: ``model/descriptor[se_r]/resnet_dt`` + | argument path: ``model/descriptor[se_e2_r]/resnet_dt`` Whether to use a "Timestep" in the skip connection - .. raw:: html + .. _`model/descriptor[se_e2_r]/type_one_side`: - type_one_side: | type: ``bool``, optional, default: ``False`` - | argument path: ``model/descriptor[se_r]/type_one_side`` + | argument path: ``model/descriptor[se_e2_r]/type_one_side`` Try to build N_types embedding nets. Otherwise, building N_types^2 embedding nets - .. raw:: html + .. _`model/descriptor[se_e2_r]/precision`: - precision: | type: ``str``, optional, default: ``float64`` - | argument path: ``model/descriptor[se_r]/precision`` + | argument path: ``model/descriptor[se_e2_r]/precision`` The precision of the embedding net parameters, supported options are "default", "float16", "float32", "float64". - .. raw:: html + .. _`model/descriptor[se_e2_r]/trainable`: - trainable: | type: ``bool``, optional, default: ``True`` - | argument path: ``model/descriptor[se_r]/trainable`` + | argument path: ``model/descriptor[se_e2_r]/trainable`` If the parameters in the embedding net is trainable - .. raw:: html + .. _`model/descriptor[se_e2_r]/seed`: - seed: | type: ``int`` | ``NoneType``, optional - | argument path: ``model/descriptor[se_r]/seed`` + | argument path: ``model/descriptor[se_e2_r]/seed`` Random seed for parameter initialization - .. raw:: html + .. _`model/descriptor[se_e2_r]/exclude_types`: - exclude_types: | type: ``list``, optional, default: ``[]`` - | argument path: ``model/descriptor[se_r]/exclude_types`` + | argument path: ``model/descriptor[se_e2_r]/exclude_types`` The Excluded types - .. raw:: html + .. _`model/descriptor[se_e2_r]/set_davg_zero`: - set_davg_zero: | type: ``bool``, optional, default: ``False`` - | argument path: ``model/descriptor[se_r]/set_davg_zero`` + | argument path: ``model/descriptor[se_e2_r]/set_davg_zero`` Set the normalization average to zero. This option should be set when `atom_ener` in the energy fitting is used - .. raw:: html + .. _`model/descriptor[se_e3]`: - - When *type* is set to ``se_a_3be``: + When |flag:model/descriptor/type|_ is set to ``se_e3`` (or its aliases ``se_at``, ``se_a_3be``, ``se_t``): - .. raw:: html + .. _`model/descriptor[se_e3]/sel`: - sel: | type: ``list`` - | argument path: ``model/descriptor[se_a_3be]/sel`` + | argument path: ``model/descriptor[se_e3]/sel`` A list of integers. The length of the list should be the same as the number of atom types in the system. `sel[i]` gives the selected number of type-i neighbors. `sel[i]` is recommended to be larger than the maximally possible number of type-i neighbors in the cut-off radius. - .. raw:: html + .. _`model/descriptor[se_e3]/rcut`: - rcut: | type: ``float``, optional, default: ``6.0`` - | argument path: ``model/descriptor[se_a_3be]/rcut`` + | argument path: ``model/descriptor[se_e3]/rcut`` The cut-off radius. - .. raw:: html + .. _`model/descriptor[se_e3]/rcut_smth`: - rcut_smth: | type: ``float``, optional, default: ``0.5`` - | argument path: ``model/descriptor[se_a_3be]/rcut_smth`` + | argument path: ``model/descriptor[se_e3]/rcut_smth`` Where to start smoothing. For example the 1/r term is smoothed from `rcut` to `rcut_smth` - .. raw:: html + .. _`model/descriptor[se_e3]/neuron`: - neuron: | type: ``list``, optional, default: ``[10, 20, 40]`` - | argument path: ``model/descriptor[se_a_3be]/neuron`` + | argument path: ``model/descriptor[se_e3]/neuron`` Number of neurons in each hidden layers of the embedding net. When two layers are of the same size or one layer is twice as large as the previous layer, a skip connection is built. - .. raw:: html + .. _`model/descriptor[se_e3]/activation_function`: - activation_function: | type: ``str``, optional, default: ``tanh`` - | argument path: ``model/descriptor[se_a_3be]/activation_function`` + | argument path: ``model/descriptor[se_e3]/activation_function`` The activation function in the embedding net. Supported activation functions are "relu", "relu6", "softplus", "sigmoid", "tanh", "gelu". - .. raw:: html + .. _`model/descriptor[se_e3]/resnet_dt`: - resnet_dt: | type: ``bool``, optional, default: ``False`` - | argument path: ``model/descriptor[se_a_3be]/resnet_dt`` + | argument path: ``model/descriptor[se_e3]/resnet_dt`` Whether to use a "Timestep" in the skip connection - .. raw:: html + .. _`model/descriptor[se_e3]/precision`: - precision: | type: ``str``, optional, default: ``float64`` - | argument path: ``model/descriptor[se_a_3be]/precision`` + | argument path: ``model/descriptor[se_e3]/precision`` The precision of the embedding net parameters, supported options are "default", "float16", "float32", "float64". - .. raw:: html + .. _`model/descriptor[se_e3]/trainable`: - trainable: | type: ``bool``, optional, default: ``True`` - | argument path: ``model/descriptor[se_a_3be]/trainable`` + | argument path: ``model/descriptor[se_e3]/trainable`` If the parameters in the embedding net is trainable - .. raw:: html + .. _`model/descriptor[se_e3]/seed`: - seed: | type: ``int`` | ``NoneType``, optional - | argument path: ``model/descriptor[se_a_3be]/seed`` + | argument path: ``model/descriptor[se_e3]/seed`` Random seed for parameter initialization - .. raw:: html + .. _`model/descriptor[se_e3]/set_davg_zero`: - set_davg_zero: | type: ``bool``, optional, default: ``False`` - | argument path: ``model/descriptor[se_a_3be]/set_davg_zero`` + | argument path: ``model/descriptor[se_e3]/set_davg_zero`` Set the normalization average to zero. This option should be set when `atom_ener` in the energy fitting is used - .. raw:: html + .. _`model/descriptor[se_a_tpe]`: - - When *type* is set to ``se_a_tpe``: + When |flag:model/descriptor/type|_ is set to ``se_a_tpe`` (or its alias ``se_a_ebd``): - .. raw:: html + .. _`model/descriptor[se_a_tpe]/sel`: - sel: | type: ``list`` | argument path: ``model/descriptor[se_a_tpe]/sel`` A list of integers. The length of the list should be the same as the number of atom types in the system. `sel[i]` gives the selected number of type-i neighbors. `sel[i]` is recommended to be larger than the maximally possible number of type-i neighbors in the cut-off radius. - .. raw:: html + .. _`model/descriptor[se_a_tpe]/rcut`: - rcut: | type: ``float``, optional, default: ``6.0`` | argument path: ``model/descriptor[se_a_tpe]/rcut`` The cut-off radius. - .. raw:: html + .. _`model/descriptor[se_a_tpe]/rcut_smth`: - rcut_smth: | type: ``float``, optional, default: ``0.5`` | argument path: ``model/descriptor[se_a_tpe]/rcut_smth`` Where to start smoothing. For example the 1/r term is smoothed from `rcut` to `rcut_smth` - .. raw:: html + .. _`model/descriptor[se_a_tpe]/neuron`: - neuron: | type: ``list``, optional, default: ``[10, 20, 40]`` | argument path: ``model/descriptor[se_a_tpe]/neuron`` Number of neurons in each hidden layers of the embedding net. When two layers are of the same size or one layer is twice as large as the previous layer, a skip connection is built. - .. raw:: html + .. _`model/descriptor[se_a_tpe]/axis_neuron`: - axis_neuron: | type: ``int``, optional, default: ``4`` | argument path: ``model/descriptor[se_a_tpe]/axis_neuron`` Size of the submatrix of G (embedding matrix). - .. raw:: html + .. _`model/descriptor[se_a_tpe]/activation_function`: - activation_function: | type: ``str``, optional, default: ``tanh`` | argument path: ``model/descriptor[se_a_tpe]/activation_function`` The activation function in the embedding net. Supported activation functions are "relu", "relu6", "softplus", "sigmoid", "tanh", "gelu". - .. raw:: html + .. _`model/descriptor[se_a_tpe]/resnet_dt`: - resnet_dt: | type: ``bool``, optional, default: ``False`` | argument path: ``model/descriptor[se_a_tpe]/resnet_dt`` Whether to use a "Timestep" in the skip connection - .. raw:: html + .. _`model/descriptor[se_a_tpe]/type_one_side`: - type_one_side: | type: ``bool``, optional, default: ``False`` | argument path: ``model/descriptor[se_a_tpe]/type_one_side`` Try to build N_types embedding nets. Otherwise, building N_types^2 embedding nets - .. raw:: html + .. _`model/descriptor[se_a_tpe]/precision`: - precision: | type: ``str``, optional, default: ``float64`` | argument path: ``model/descriptor[se_a_tpe]/precision`` The precision of the embedding net parameters, supported options are "default", "float16", "float32", "float64". - .. raw:: html + .. _`model/descriptor[se_a_tpe]/trainable`: - trainable: | type: ``bool``, optional, default: ``True`` | argument path: ``model/descriptor[se_a_tpe]/trainable`` If the parameters in the embedding net is trainable - .. raw:: html + .. _`model/descriptor[se_a_tpe]/seed`: - seed: | type: ``int`` | ``NoneType``, optional | argument path: ``model/descriptor[se_a_tpe]/seed`` Random seed for parameter initialization - .. raw:: html + .. _`model/descriptor[se_a_tpe]/exclude_types`: - exclude_types: | type: ``list``, optional, default: ``[]`` | argument path: ``model/descriptor[se_a_tpe]/exclude_types`` The Excluded types - .. raw:: html + .. _`model/descriptor[se_a_tpe]/set_davg_zero`: - set_davg_zero: | type: ``bool``, optional, default: ``False`` | argument path: ``model/descriptor[se_a_tpe]/set_davg_zero`` Set the normalization average to zero. This option should be set when `atom_ener` in the energy fitting is used - .. raw:: html + .. _`model/descriptor[se_a_tpe]/type_nchanl`: - type_nchanl: | type: ``int``, optional, default: ``4`` | argument path: ``model/descriptor[se_a_tpe]/type_nchanl`` number of channels for type embedding - .. raw:: html + .. _`model/descriptor[se_a_tpe]/type_nlayer`: - type_nlayer: | type: ``int``, optional, default: ``2`` | argument path: ``model/descriptor[se_a_tpe]/type_nlayer`` number of hidden layers of type embedding net - .. raw:: html + .. _`model/descriptor[se_a_tpe]/numb_aparam`: - numb_aparam: | type: ``int``, optional, default: ``0`` | argument path: ``model/descriptor[se_a_tpe]/numb_aparam`` @@ -641,47 +586,20 @@ model: dimension of atomic parameter. if set to a value > 0, the atomic parameters are embedded. - .. raw:: html + .. _`model/descriptor[hybrid]`: - - When *type* is set to ``hybrid``: + When |flag:model/descriptor/type|_ is set to ``hybrid``: - .. raw:: html + .. _`model/descriptor[hybrid]/list`: - list: | type: ``list`` | argument path: ``model/descriptor[hybrid]/list`` A list of descriptor definitions + .. _`model/fitting_net`: - .. raw:: html - - - When *type* is set to ``se_ar``: - - .. raw:: html - - - a: - | type: ``dict`` - | argument path: ``model/descriptor[se_ar]/a`` - - The parameters of descriptor `se_a <#model/descriptor[se_a]>`__ - - .. raw:: html - - - r: - | type: ``dict`` - | argument path: ``model/descriptor[se_ar]/r`` - - The parameters of descriptor `se_r <#model/descriptor[se_r]>`__ - - .. raw:: html - - fitting_net: | type: ``dict`` | argument path: ``model/fitting_net`` @@ -691,14 +609,14 @@ model: Depending on the value of *type*, different sub args are accepted. - .. raw:: html + .. _`model/fitting_net/type`: - type: | type: ``str`` (flag key), default: ``ener`` | argument path: ``model/fitting_net/type`` + | possible choices: |code:model/fitting_net[ener]|_, |code:model/fitting_net[dipole]|_, |code:model/fitting_net[polar]|_, |code:model/fitting_net[global_polar]|_ - The type of the fitting. Valid types are `ener`, `dipole`, `polar` and `global_polar`. + The type of the fitting. See explanation below. - `ener`: Fit an energy model (potential energy surface). @@ -708,69 +626,73 @@ model: - `global_polar`: Fit a polarizability model. Polarizability labels should be provided by `polarizability.npy` in each data system. The file has number of frames lines and 9 columns. + .. |code:model/fitting_net[ener]| replace:: ``ener`` + .. _`code:model/fitting_net[ener]`: `model/fitting_net[ener]`_ + .. |code:model/fitting_net[dipole]| replace:: ``dipole`` + .. _`code:model/fitting_net[dipole]`: `model/fitting_net[dipole]`_ + .. |code:model/fitting_net[polar]| replace:: ``polar`` + .. _`code:model/fitting_net[polar]`: `model/fitting_net[polar]`_ + .. |code:model/fitting_net[global_polar]| replace:: ``global_polar`` + .. _`code:model/fitting_net[global_polar]`: `model/fitting_net[global_polar]`_ + + .. |flag:model/fitting_net/type| replace:: *type* + .. _`flag:model/fitting_net/type`: `model/fitting_net/type`_ - .. raw:: html - - When *type* is set to ``ener``: + .. _`model/fitting_net[ener]`: - .. raw:: html + When |flag:model/fitting_net/type|_ is set to ``ener``: + + .. _`model/fitting_net[ener]/numb_fparam`: - numb_fparam: | type: ``int``, optional, default: ``0`` | argument path: ``model/fitting_net[ener]/numb_fparam`` The dimension of the frame parameter. If set to >0, file `fparam.npy` should be included to provided the input fparams. - .. raw:: html + .. _`model/fitting_net[ener]/numb_aparam`: - numb_aparam: | type: ``int``, optional, default: ``0`` | argument path: ``model/fitting_net[ener]/numb_aparam`` The dimension of the atomic parameter. If set to >0, file `aparam.npy` should be included to provided the input aparams. - .. raw:: html + .. _`model/fitting_net[ener]/neuron`: - neuron: | type: ``list``, optional, default: ``[120, 120, 120]`` | argument path: ``model/fitting_net[ener]/neuron`` The number of neurons in each hidden layers of the fitting net. When two hidden layers are of the same size, a skip connection is built. - .. raw:: html + .. _`model/fitting_net[ener]/activation_function`: - activation_function: | type: ``str``, optional, default: ``tanh`` | argument path: ``model/fitting_net[ener]/activation_function`` The activation function in the fitting net. Supported activation functions are "relu", "relu6", "softplus", "sigmoid", "tanh", "gelu". - .. raw:: html + .. _`model/fitting_net[ener]/precision`: - precision: | type: ``str``, optional, default: ``float64`` | argument path: ``model/fitting_net[ener]/precision`` The precision of the fitting net parameters, supported options are "default", "float16", "float32", "float64". - .. raw:: html + .. _`model/fitting_net[ener]/resnet_dt`: - resnet_dt: | type: ``bool``, optional, default: ``True`` | argument path: ``model/fitting_net[ener]/resnet_dt`` Whether to use a "Timestep" in the skip connection - .. raw:: html + .. _`model/fitting_net[ener]/trainable`: - trainable: | type: ``bool`` | ``list``, optional, default: ``True`` | argument path: ``model/fitting_net[ener]/trainable`` @@ -781,27 +703,24 @@ model: - list of bool: Specifies if each layer is trainable. Since the fitting net is composed by hidden layers followed by a output layer, the length of tihs list should be equal to len(`neuron`)+1. - .. raw:: html + .. _`model/fitting_net[ener]/rcond`: - rcond: | type: ``float``, optional, default: ``0.001`` | argument path: ``model/fitting_net[ener]/rcond`` The condition number used to determine the inital energy shift for each type of atoms. - .. raw:: html + .. _`model/fitting_net[ener]/seed`: - seed: | type: ``int`` | ``NoneType``, optional | argument path: ``model/fitting_net[ener]/seed`` Random seed for parameter initialization of the fitting net - .. raw:: html + .. _`model/fitting_net[ener]/atom_ener`: - atom_ener: | type: ``list``, optional, default: ``[]`` | argument path: ``model/fitting_net[ener]/atom_ener`` @@ -809,59 +728,52 @@ model: Specify the atomic energy in vacuum for each type - .. raw:: html + .. _`model/fitting_net[dipole]`: - - When *type* is set to ``dipole``: + When |flag:model/fitting_net/type|_ is set to ``dipole``: - .. raw:: html + .. _`model/fitting_net[dipole]/neuron`: - neuron: | type: ``list``, optional, default: ``[120, 120, 120]`` | argument path: ``model/fitting_net[dipole]/neuron`` The number of neurons in each hidden layers of the fitting net. When two hidden layers are of the same size, a skip connection is built. - .. raw:: html + .. _`model/fitting_net[dipole]/activation_function`: - activation_function: | type: ``str``, optional, default: ``tanh`` | argument path: ``model/fitting_net[dipole]/activation_function`` The activation function in the fitting net. Supported activation functions are "relu", "relu6", "softplus", "sigmoid", "tanh", "gelu". - .. raw:: html + .. _`model/fitting_net[dipole]/resnet_dt`: - resnet_dt: | type: ``bool``, optional, default: ``True`` | argument path: ``model/fitting_net[dipole]/resnet_dt`` Whether to use a "Timestep" in the skip connection - .. raw:: html + .. _`model/fitting_net[dipole]/precision`: - precision: | type: ``str``, optional, default: ``float64`` | argument path: ``model/fitting_net[dipole]/precision`` The precision of the fitting net parameters, supported options are "default", "float16", "float32", "float64". - .. raw:: html + .. _`model/fitting_net[dipole]/sel_type`: - sel_type: | type: ``int`` | ``NoneType`` | ``list``, optional | argument path: ``model/fitting_net[dipole]/sel_type`` The atom types for which the atomic dipole will be provided. If not set, all types will be selected. - .. raw:: html + .. _`model/fitting_net[dipole]/seed`: - seed: | type: ``int`` | ``NoneType``, optional | argument path: ``model/fitting_net[dipole]/seed`` @@ -869,86 +781,76 @@ model: Random seed for parameter initialization of the fitting net - .. raw:: html + .. _`model/fitting_net[polar]`: - - When *type* is set to ``polar``: + When |flag:model/fitting_net/type|_ is set to ``polar``: - .. raw:: html + .. _`model/fitting_net[polar]/neuron`: - neuron: | type: ``list``, optional, default: ``[120, 120, 120]`` | argument path: ``model/fitting_net[polar]/neuron`` The number of neurons in each hidden layers of the fitting net. When two hidden layers are of the same size, a skip connection is built. - .. raw:: html + .. _`model/fitting_net[polar]/activation_function`: - activation_function: | type: ``str``, optional, default: ``tanh`` | argument path: ``model/fitting_net[polar]/activation_function`` The activation function in the fitting net. Supported activation functions are "relu", "relu6", "softplus", "sigmoid", "tanh", "gelu". - .. raw:: html + .. _`model/fitting_net[polar]/resnet_dt`: - resnet_dt: | type: ``bool``, optional, default: ``True`` | argument path: ``model/fitting_net[polar]/resnet_dt`` Whether to use a "Timestep" in the skip connection - .. raw:: html + .. _`model/fitting_net[polar]/precision`: - precision: | type: ``str``, optional, default: ``float64`` | argument path: ``model/fitting_net[polar]/precision`` The precision of the fitting net parameters, supported options are "default", "float16", "float32", "float64". - .. raw:: html + .. _`model/fitting_net[polar]/fit_diag`: - fit_diag: | type: ``bool``, optional, default: ``True`` | argument path: ``model/fitting_net[polar]/fit_diag`` Fit the diagonal part of the rotational invariant polarizability matrix, which will be converted to normal polarizability matrix by contracting with the rotation matrix. - .. raw:: html + .. _`model/fitting_net[polar]/scale`: - scale: | type: ``float`` | ``list``, optional, default: ``1.0`` | argument path: ``model/fitting_net[polar]/scale`` The output of the fitting net (polarizability matrix) will be scaled by ``scale`` - .. raw:: html + .. _`model/fitting_net[polar]/diag_shift`: - diag_shift: | type: ``float`` | ``list``, optional, default: ``0.0`` | argument path: ``model/fitting_net[polar]/diag_shift`` The diagonal part of the polarizability matrix will be shifted by ``diag_shift``. The shift operation is carried out after ``scale``. - .. raw:: html + .. _`model/fitting_net[polar]/sel_type`: - sel_type: | type: ``int`` | ``NoneType`` | ``list``, optional | argument path: ``model/fitting_net[polar]/sel_type`` The atom types for which the atomic polarizability will be provided. If not set, all types will be selected. - .. raw:: html + .. _`model/fitting_net[polar]/seed`: - seed: | type: ``int`` | ``NoneType``, optional | argument path: ``model/fitting_net[polar]/seed`` @@ -956,96 +858,158 @@ model: Random seed for parameter initialization of the fitting net - .. raw:: html + .. _`model/fitting_net[global_polar]`: - - When *type* is set to ``global_polar``: + When |flag:model/fitting_net/type|_ is set to ``global_polar``: - .. raw:: html + .. _`model/fitting_net[global_polar]/neuron`: - neuron: | type: ``list``, optional, default: ``[120, 120, 120]`` | argument path: ``model/fitting_net[global_polar]/neuron`` The number of neurons in each hidden layers of the fitting net. When two hidden layers are of the same size, a skip connection is built. - .. raw:: html + .. _`model/fitting_net[global_polar]/activation_function`: - activation_function: | type: ``str``, optional, default: ``tanh`` | argument path: ``model/fitting_net[global_polar]/activation_function`` The activation function in the fitting net. Supported activation functions are "relu", "relu6", "softplus", "sigmoid", "tanh", "gelu". - .. raw:: html + .. _`model/fitting_net[global_polar]/resnet_dt`: - resnet_dt: | type: ``bool``, optional, default: ``True`` | argument path: ``model/fitting_net[global_polar]/resnet_dt`` Whether to use a "Timestep" in the skip connection - .. raw:: html + .. _`model/fitting_net[global_polar]/precision`: - precision: | type: ``str``, optional, default: ``float64`` | argument path: ``model/fitting_net[global_polar]/precision`` The precision of the fitting net parameters, supported options are "default", "float16", "float32", "float64". - .. raw:: html + .. _`model/fitting_net[global_polar]/fit_diag`: - fit_diag: | type: ``bool``, optional, default: ``True`` | argument path: ``model/fitting_net[global_polar]/fit_diag`` Fit the diagonal part of the rotational invariant polarizability matrix, which will be converted to normal polarizability matrix by contracting with the rotation matrix. - .. raw:: html + .. _`model/fitting_net[global_polar]/scale`: - scale: | type: ``float`` | ``list``, optional, default: ``1.0`` | argument path: ``model/fitting_net[global_polar]/scale`` The output of the fitting net (polarizability matrix) will be scaled by ``scale`` - .. raw:: html + .. _`model/fitting_net[global_polar]/diag_shift`: - diag_shift: | type: ``float`` | ``list``, optional, default: ``0.0`` | argument path: ``model/fitting_net[global_polar]/diag_shift`` The diagonal part of the polarizability matrix will be shifted by ``diag_shift``. The shift operation is carried out after ``scale``. - .. raw:: html + .. _`model/fitting_net[global_polar]/sel_type`: - sel_type: | type: ``int`` | ``NoneType`` | ``list``, optional | argument path: ``model/fitting_net[global_polar]/sel_type`` The atom types for which the atomic polarizability will be provided. If not set, all types will be selected. - .. raw:: html + .. _`model/fitting_net[global_polar]/seed`: - seed: | type: ``int`` | ``NoneType``, optional | argument path: ``model/fitting_net[global_polar]/seed`` Random seed for parameter initialization of the fitting net + .. _`model/modifier`: + + modifier: + | type: ``dict``, optional + | argument path: ``model/modifier`` + + The modifier of model output. + + + Depending on the value of *type*, different sub args are accepted. + + .. _`model/modifier/type`: + + type: + | type: ``str`` (flag key) + | argument path: ``model/modifier/type`` + | possible choices: |code:model/modifier[dipole_charge]|_ + + The type of modifier. See explanation below. + + -`dipole_charge`: Use WFCC to model the electronic structure of the system. Correct the long-range interaction + + .. |code:model/modifier[dipole_charge]| replace:: ``dipole_charge`` + .. _`code:model/modifier[dipole_charge]`: `model/modifier[dipole_charge]`_ + + .. |flag:model/modifier/type| replace:: *type* + .. _`flag:model/modifier/type`: `model/modifier/type`_ + + + .. _`model/modifier[dipole_charge]`: + + When |flag:model/modifier/type|_ is set to ``dipole_charge``: + + .. _`model/modifier[dipole_charge]/model_name`: + + model_name: + | type: ``str`` + | argument path: ``model/modifier[dipole_charge]/model_name`` + + The name of the frozen dipole model file. + + .. _`model/modifier[dipole_charge]/model_charge_map`: + + model_charge_map: + | type: ``list`` + | argument path: ``model/modifier[dipole_charge]/model_charge_map`` + + The charge of the WFCC. The list length should be the same as the `sel_type `_. + + .. _`model/modifier[dipole_charge]/sys_charge_map`: + + sys_charge_map: + | type: ``list`` + | argument path: ``model/modifier[dipole_charge]/sys_charge_map`` + + The charge of real atoms. The list length should be the same as the `type_map `_ + + .. _`model/modifier[dipole_charge]/ewald_beta`: + + ewald_beta: + | type: ``float``, optional, default: ``0.4`` + | argument path: ``model/modifier[dipole_charge]/ewald_beta`` + + The splitting parameter of Ewald sum. Unit is A^-1 -.. raw:: html + .. _`model/modifier[dipole_charge]/ewald_h`: + + ewald_h: + | type: ``float``, optional, default: ``1.0`` + | argument path: ``model/modifier[dipole_charge]/ewald_h`` + + The grid spacing of the FFT grid. Unit is A + + +.. _`loss`: - loss: | type: ``dict``, optional | argument path: ``loss`` @@ -1055,97 +1019,93 @@ loss: Depending on the value of *type*, different sub args are accepted. - .. raw:: html + .. _`loss/type`: - type: | type: ``str`` (flag key), default: ``ener`` | argument path: ``loss/type`` + | possible choices: |code:loss[ener]|_ - The type of the loss. For fitting type `ener`, the loss type should be set to `ener` or left unset. For tensorial fitting types `dipole`, `polar` and `global_polar`, the type should be left unset. + The type of the loss. \. + .. |code:loss[ener]| replace:: ``ener`` + .. _`code:loss[ener]`: `loss[ener]`_ + + .. |flag:loss/type| replace:: *type* + .. _`flag:loss/type`: `loss/type`_ + - .. raw:: html + .. _`loss[ener]`: - - When *type* is set to ``ener``: + When |flag:loss/type|_ is set to ``ener``: - .. raw:: html + .. _`loss[ener]/start_pref_e`: - start_pref_e: | type: ``float`` | ``int``, optional, default: ``0.02`` | argument path: ``loss[ener]/start_pref_e`` The prefactor of energy loss at the start of the training. Should be larger than or equal to 0. If set to none-zero value, the energy label should be provided by file energy.npy in each data system. If both start_pref_energy and limit_pref_energy are set to 0, then the energy will be ignored. - .. raw:: html + .. _`loss[ener]/limit_pref_e`: - limit_pref_e: | type: ``float`` | ``int``, optional, default: ``1.0`` | argument path: ``loss[ener]/limit_pref_e`` The prefactor of energy loss at the limit of the training, Should be larger than or equal to 0. i.e. the training step goes to infinity. - .. raw:: html + .. _`loss[ener]/start_pref_f`: - start_pref_f: | type: ``float`` | ``int``, optional, default: ``1000`` | argument path: ``loss[ener]/start_pref_f`` The prefactor of force loss at the start of the training. Should be larger than or equal to 0. If set to none-zero value, the force label should be provided by file force.npy in each data system. If both start_pref_force and limit_pref_force are set to 0, then the force will be ignored. - .. raw:: html + .. _`loss[ener]/limit_pref_f`: - limit_pref_f: | type: ``float`` | ``int``, optional, default: ``1.0`` | argument path: ``loss[ener]/limit_pref_f`` The prefactor of force loss at the limit of the training, Should be larger than or equal to 0. i.e. the training step goes to infinity. - .. raw:: html + .. _`loss[ener]/start_pref_v`: - start_pref_v: | type: ``float`` | ``int``, optional, default: ``0.0`` | argument path: ``loss[ener]/start_pref_v`` The prefactor of virial loss at the start of the training. Should be larger than or equal to 0. If set to none-zero value, the virial label should be provided by file virial.npy in each data system. If both start_pref_virial and limit_pref_virial are set to 0, then the virial will be ignored. - .. raw:: html + .. _`loss[ener]/limit_pref_v`: - limit_pref_v: | type: ``float`` | ``int``, optional, default: ``0.0`` | argument path: ``loss[ener]/limit_pref_v`` The prefactor of virial loss at the limit of the training, Should be larger than or equal to 0. i.e. the training step goes to infinity. - .. raw:: html + .. _`loss[ener]/start_pref_ae`: - start_pref_ae: | type: ``float`` | ``int``, optional, default: ``0.0`` | argument path: ``loss[ener]/start_pref_ae`` - The prefactor of virial loss at the start of the training. Should be larger than or equal to 0. If set to none-zero value, the virial label should be provided by file virial.npy in each data system. If both start_pref_virial and limit_pref_virial are set to 0, then the virial will be ignored. + The prefactor of atom_ener loss at the start of the training. Should be larger than or equal to 0. If set to none-zero value, the atom_ener label should be provided by file atom_ener.npy in each data system. If both start_pref_atom_ener and limit_pref_atom_ener are set to 0, then the atom_ener will be ignored. - .. raw:: html + .. _`loss[ener]/limit_pref_ae`: - limit_pref_ae: | type: ``float`` | ``int``, optional, default: ``0.0`` | argument path: ``loss[ener]/limit_pref_ae`` - The prefactor of virial loss at the limit of the training, Should be larger than or equal to 0. i.e. the training step goes to infinity. + The prefactor of atom_ener loss at the limit of the training, Should be larger than or equal to 0. i.e. the training step goes to infinity. - .. raw:: html + .. _`loss[ener]/relative_f`: - relative_f: | type: ``float`` | ``NoneType``, optional | argument path: ``loss[ener]/relative_f`` @@ -1153,9 +1113,8 @@ loss: If provided, relative force error will be used in the loss. The difference of force will be normalized by the magnitude of the force in the label with a shift given by `relative_f`, i.e. DF_i / ( || F || + relative_f ) with DF denoting the difference between prediction and label and || F || denoting the L2 norm of the label. -.. raw:: html +.. _`learning_rate`: - learning_rate: | type: ``dict`` | argument path: ``learning_rate`` @@ -1165,42 +1124,44 @@ learning_rate: Depending on the value of *type*, different sub args are accepted. - .. raw:: html + .. _`learning_rate/type`: - type: | type: ``str`` (flag key), default: ``exp`` | argument path: ``learning_rate/type`` + | possible choices: |code:learning_rate[exp]|_ + + The type of the learning rate. - The type of the learning rate. Current type `exp`, the exponentially decaying learning rate is supported. + .. |code:learning_rate[exp]| replace:: ``exp`` + .. _`code:learning_rate[exp]`: `learning_rate[exp]`_ + .. |flag:learning_rate/type| replace:: *type* + .. _`flag:learning_rate/type`: `learning_rate/type`_ - .. raw:: html - - When *type* is set to ``exp``: + .. _`learning_rate[exp]`: - .. raw:: html + When |flag:learning_rate/type|_ is set to ``exp``: + + .. _`learning_rate[exp]/start_lr`: - start_lr: | type: ``float``, optional, default: ``0.001`` | argument path: ``learning_rate[exp]/start_lr`` The learning rate the start of the training. - .. raw:: html + .. _`learning_rate[exp]/stop_lr`: - stop_lr: | type: ``float``, optional, default: ``1e-08`` | argument path: ``learning_rate[exp]/stop_lr`` The desired learning rate at the end of the training. - .. raw:: html + .. _`learning_rate[exp]/decay_steps`: - decay_steps: | type: ``int``, optional, default: ``5000`` | argument path: ``learning_rate[exp]/decay_steps`` @@ -1208,185 +1169,244 @@ learning_rate: The learning rate is decaying every this number of training steps. -.. raw:: html +.. _`training`: - training: | type: ``dict`` | argument path: ``training`` - The training options + The training options. + + .. _`training/training_data`: + + training_data: + | type: ``dict`` + | argument path: ``training/training_data`` + + Configurations of training data. + + .. _`training/training_data/systems`: + + systems: + | type: ``list`` | ``str`` + | argument path: ``training/training_data/systems`` + + The data systems for training. This key can be provided with a list that specifies the systems, or be provided with a string by which the prefix of all systems are given and the list of the systems is automatically generated. + + .. _`training/training_data/set_prefix`: + + set_prefix: + | type: ``str``, optional, default: ``set`` + | argument path: ``training/training_data/set_prefix`` + + The prefix of the sets in the `systems `_. + + .. _`training/training_data/batch_size`: + + batch_size: + | type: ``int`` | ``list`` | ``str``, optional, default: ``auto`` + | argument path: ``training/training_data/batch_size`` + + This key can be + + - list: the length of which is the same as the `systems `_. The batch size of each system is given by the elements of the list. + + - int: all `systems `_ use the same batch size. + + - string "auto": automatically determines the batch size so that the batch_size times the number of atoms in the system is no less than 32. + + - string "auto:N": automatically determines the batch size so that the batch_size times the number of atoms in the system is no less than N. + + .. _`training/training_data/auto_prob`: + + auto_prob: + | type: ``str``, optional, default: ``prob_sys_size``, alias: *auto_prob_style* + | argument path: ``training/training_data/auto_prob`` + + Determine the probability of systems automatically. The method is assigned by this key and can be + + - "prob_uniform" : the probability all the systems are equal, namely 1.0/self.get_nsystems() + + - "prob_sys_size" : the probability of a system is proportional to the number of batches in the system + + - "prob_sys_size;stt_idx:end_idx:weight;stt_idx:end_idx:weight;..." : the list of systems is devided into blocks. A block is specified by `stt_idx:end_idx:weight`, where `stt_idx` is the starting index of the system, `end_idx` is then ending (not including) index of the system, the probabilities of the systems in this block sums up to `weight`, and the relatively probabilities within this block is proportional to the number of batches in the system. + + .. _`training/training_data/sys_probs`: + + sys_probs: + | type: ``NoneType`` | ``list``, optional, default: ``None``, alias: *sys_weights* + | argument path: ``training/training_data/sys_probs`` + + A list of float if specified. Should be of the same length as `systems`, specifying the probability of each system. + + .. _`training/validation_data`: + + validation_data: + | type: ``NoneType`` | ``dict``, optional, default: ``None`` + | argument path: ``training/validation_data`` + + Configurations of validation data. Similar to that of training data, except that a `numb_btch` argument may be configured + + .. _`training/validation_data/systems`: + + systems: + | type: ``list`` | ``str`` + | argument path: ``training/validation_data/systems`` + + The data systems for validation. This key can be provided with a list that specifies the systems, or be provided with a string by which the prefix of all systems are given and the list of the systems is automatically generated. - .. raw:: html + .. _`training/validation_data/set_prefix`: - - systems: - | type: ``list`` | ``str`` - | argument path: ``training/systems`` + set_prefix: + | type: ``str``, optional, default: ``set`` + | argument path: ``training/validation_data/set_prefix`` - The data systems. This key can be provided with a listthat specifies the systems, or be provided with a string by which the prefix of all systems are given and the list of the systems is automatically generated. + The prefix of the sets in the `systems `_. - .. raw:: html + .. _`training/validation_data/batch_size`: - - set_prefix: - | type: ``str``, optional, default: ``set`` - | argument path: ``training/set_prefix`` + batch_size: + | type: ``int`` | ``list`` | ``str``, optional, default: ``auto`` + | argument path: ``training/validation_data/batch_size`` - The prefix of the sets in the `systems <#training/systems>`__. + This key can be - .. raw:: html + - list: the length of which is the same as the `systems `_. The batch size of each system is given by the elements of the list. - - auto_prob: - | type: ``str``, optional, default: ``prob_sys_size`` - | argument path: ``training/auto_prob`` + - int: all `systems `_ use the same batch size. - Determine the probability of systems automatically. The method is assigned by this key and can be + - string "auto": automatically determines the batch size so that the batch_size times the number of atoms in the system is no less than 32. - - "prob_uniform" : the probability all the systems are equal, namely 1.0/self.get_nsystems() + - string "auto:N": automatically determines the batch size so that the batch_size times the number of atoms in the system is no less than N. - - "prob_sys_size" : the probability of a system is proportional to the number of batches in the system + .. _`training/validation_data/auto_prob`: - - "prob_sys_size;stt_idx:end_idx:weight;stt_idx:end_idx:weight;..." : the list of systems is devided into blocks. A block is specified by `stt_idx:end_idx:weight`, where `stt_idx` is the starting index of the system, `end_idx` is then ending (not including) index of the system, the probabilities of the systems in this block sums up to `weight`, and the relatively probabilities within this block is proportional to the number of batches in the system. + auto_prob: + | type: ``str``, optional, default: ``prob_sys_size``, alias: *auto_prob_style* + | argument path: ``training/validation_data/auto_prob`` - .. raw:: html + Determine the probability of systems automatically. The method is assigned by this key and can be - - sys_probs: - | type: ``NoneType`` | ``list``, optional, default: ``None`` - | argument path: ``training/sys_probs`` + - "prob_uniform" : the probability all the systems are equal, namely 1.0/self.get_nsystems() - A list of float, should be of the same length as `train_systems`, specifying the probability of each system. + - "prob_sys_size" : the probability of a system is proportional to the number of batches in the system - .. raw:: html + - "prob_sys_size;stt_idx:end_idx:weight;stt_idx:end_idx:weight;..." : the list of systems is devided into blocks. A block is specified by `stt_idx:end_idx:weight`, where `stt_idx` is the starting index of the system, `end_idx` is then ending (not including) index of the system, the probabilities of the systems in this block sums up to `weight`, and the relatively probabilities within this block is proportional to the number of batches in the system. - - batch_size: - | type: ``int`` | ``list`` | ``str``, optional, default: ``auto`` - | argument path: ``training/batch_size`` + .. _`training/validation_data/sys_probs`: - This key can be + sys_probs: + | type: ``NoneType`` | ``list``, optional, default: ``None``, alias: *sys_weights* + | argument path: ``training/validation_data/sys_probs`` - - list: the length of which is the same as the `systems <#training/systems>`__. The batch size of each system is given by the elements of the list. + A list of float if specified. Should be of the same length as `systems`, specifying the probability of each system. - - int: all `systems <#training/systems>`__ use the same batch size. + .. _`training/validation_data/numb_btch`: - - string "auto": automatically determines the batch size so that the batch_size times the number of atoms in the system is no less than 32. + numb_btch: + | type: ``int``, optional, default: ``1``, alias: *numb_batch* + | argument path: ``training/validation_data/numb_btch`` - - string "auto:N": automatically determines the batch size so that the batch_size times the number of atoms in the system is no less than N. + An integer that specifies the number of systems to be sampled for each validation period. - .. raw:: html + .. _`training/numb_steps`: - numb_steps: - | type: ``int`` + | type: ``int``, alias: *stop_batch* | argument path: ``training/numb_steps`` Number of training batch. Each training uses one batch of data. - .. raw:: html + .. _`training/seed`: - seed: | type: ``int`` | ``NoneType``, optional | argument path: ``training/seed`` The random seed for getting frames from the training data set. - .. raw:: html + .. _`training/disp_file`: - disp_file: | type: ``str``, optional, default: ``lcueve.out`` | argument path: ``training/disp_file`` The file for printing learning curve. - .. raw:: html + .. _`training/disp_freq`: - disp_freq: | type: ``int``, optional, default: ``1000`` | argument path: ``training/disp_freq`` The frequency of printing learning curve. - .. raw:: html + .. _`training/numb_test`: - numb_test: | type: ``int`` | ``list`` | ``str``, optional, default: ``1`` | argument path: ``training/numb_test`` Number of frames used for the test during training. - .. raw:: html + .. _`training/save_freq`: - save_freq: | type: ``int``, optional, default: ``1000`` | argument path: ``training/save_freq`` The frequency of saving check point. - .. raw:: html + .. _`training/save_ckpt`: - save_ckpt: | type: ``str``, optional, default: ``model.ckpt`` | argument path: ``training/save_ckpt`` The file name of saving check point. - .. raw:: html + .. _`training/disp_training`: - disp_training: | type: ``bool``, optional, default: ``True`` | argument path: ``training/disp_training`` Displaying verbose information during training. - .. raw:: html + .. _`training/time_training`: - time_training: | type: ``bool``, optional, default: ``True`` | argument path: ``training/time_training`` Timing durining training. - .. raw:: html + .. _`training/profiling`: - profiling: | type: ``bool``, optional, default: ``False`` | argument path: ``training/profiling`` Profiling during training. - .. raw:: html + .. _`training/profiling_file`: - profiling_file: | type: ``str``, optional, default: ``timeline.json`` | argument path: ``training/profiling_file`` Output file for profiling. - .. raw:: html + .. _`training/tensorboard`: - tensorboard: | type: ``bool``, optional, default: ``False`` | argument path: ``training/tensorboard`` Enable tensorboard - .. raw:: html + .. _`training/tensorboard_log_dir`: - tensorboard_log_dir: | type: ``str``, optional, default: ``log`` | argument path: ``training/tensorboard_log_dir``