Skip to content

Commit

Permalink
Merge pull request brucefan1983#693 from brucefan1983/doc
Browse files Browse the repository at this point in the history
small fixes to doc
  • Loading branch information
brucefan1983 committed Aug 14, 2024
2 parents ec499e0 + 8754666 commit ac309c8
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 22 deletions.
4 changes: 2 additions & 2 deletions doc/nep/input_files/nep_in.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

This file specifies hyperparameters used for training neuroevolution potential (:term:`NEP`) models, the functional form of which is outline :ref:`here <nep_formalism>`.
The :term:`NEP` approach was proposed in [Fan2021]_ (NEP1) and later improved in [Fan2022a]_ (NEP2) and [Fan2022b]_ (NEP3).
Currently, we support NEP2, NEP3 and NEP4 (to be published), which can be chosen by the :ref:`version keyword <kw_version>`.
Currently, we support NEP3 and NEP4 (to be published), which can be chosen by the :ref:`version keyword <kw_version>`.

File format
-----------
Expand Down Expand Up @@ -35,7 +35,7 @@ Keywords
* - Keyword
- Brief description
* - :ref:`version <kw_version>`
- select between NEP2, NEP3, and NEP4
- select between NEP3 and NEP4
* - :ref:`type <kw_type>`
- number of atom types and list of chemical species
* - :ref:`type_weight <kw_type_weight>`
Expand Down
1 change: 0 additions & 1 deletion doc/nep/input_parameters/basis_size.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
:attr:`basis_size`
==================

This keyword is only relevant for NEP3 and NEP4 (see :ref:`version keyword <kw_version>`).
It sets the number of basis functions that are used to build the radial and angular descriptor functions, see Sects. II.B and II.C as well as Eq. (3) in [Fan2022b]_.
The syntax is::

Expand Down
1 change: 0 additions & 1 deletion doc/nep/input_parameters/l_max.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
:attr:`l_max`
=============

This keyword is only relevant for NEP3 and NEP4.
It sets the maximum expansion order for the angular terms, see Sect. II.C of [Fan2022b]_.
The syntax is::

Expand Down
6 changes: 3 additions & 3 deletions doc/nep/input_parameters/use_typewise_cutoff.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
This keyword enables one to use typewise cutoff radii for the radial and angular descriptors of the :term:`NEP` model.
The syntax is::

use_typewise_cutoff
use_typewise_cutoff [<radial_factor> <angular_factor>]

without any parameter.
with two optional (dimensionless) parameters, :attr:`<radial_factor>` and :attr:`<angular_factor>`, which default to 2.5 and 2, respectively.

If this keyword is present, the radial cutoff between two elements is the minimum between the global radial cutoff :math:`r_\mathrm{c}^\mathrm{R}` and 2.5 times of the sum of the covalent radii of the two elements, and the angular cutoff between two elements is the minimum between the global angular cutoff :math:`r_\mathrm{c}^\mathrm{A}` and 2.0 times of the sum of the covalent radii of the two elements.
If this keyword is present, the radial cutoff between two elements is the minimum between the global radial cutoff :math:`r_\mathrm{c}^\mathrm{R}` and :attr:`<radial_factor>` times of the sum of the covalent radii of the two elements, and the angular cutoff between two elements is the minimum between the global angular cutoff :math:`r_\mathrm{c}^\mathrm{A}` and :attr:`<angular_factor>` times of the sum of the covalent radii of the two elements.

By default, this keyword is not in effect.

6 changes: 3 additions & 3 deletions doc/nep/input_parameters/use_typewise_cutoff_zbl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
This keyword enables one to use typewise cutoff radii for the ZBL part of the :term:`NEP` model.
The syntax is::

use_typewise_cutoff_zbl
use_typewise_cutoff_zbl [<factor>]

without any parameter.
with one optional (dimensionless) parameter :attr:`<factor>` that defaults to 0.65.

If this keyword is present, the outer ZBL cutoff between two elements is the minimum between the global outer ZBL cutoff :math:`r_\mathrm{outer}^\mathrm{ZBL}` and 0.6 times of the sum of the covalent radii of the two elements, and the inner ZBL cutoff is half of the outer one.
If this keyword is present, the outer ZBL cutoff between two elements is the minimum between the global outer ZBL cutoff :math:`r_\mathrm{outer}^\mathrm{ZBL}` and :attr:`<factor>` times of the sum of the covalent radii of the two elements, and the inner ZBL cutoff is half of the outer one.

By default, this keyword is not in effect.
2 changes: 1 addition & 1 deletion doc/nep/input_parameters/version.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The syntax is::

version <version_number>

Here, :attr:`<version_number>` must be an integer, which can be 2, 3, or 4, corresponding to NEP2, NEP3, and NEP4, respectively.
Here, :attr:`<version_number>` must be an integer, which can be 3 or 4, corresponding to NEP3 and NEP4, respectively.
The default is 4.

More information about the :term:`NEP` formalism can be found :ref:`here <nep_formalism>`.
17 changes: 7 additions & 10 deletions doc/potentials/nep.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Neuroevolution potential
************************

The neuroevolution potential (:term:`NEP`) approach was proposed in [Fan2021]_ (NEP1) and later improved in [Fan2022a]_ (NEP2) and [Fan2022b]_ (NEP3).
Currently, :program:`GPUMD` supports NEP2, NEP3 and NEP4 (to be published).
All versions have comparable accuracy for single-component systems.
For multi-component systems, NEP2 has the lowest accuracy, and NEP4 has the highest, if all the other hyperparameters are the same.
Currently, :program:`GPUMD` supports NEP3 and NEP4 (to be published).
Both versions have comparable accuracy for single-component systems.
For multi-component systems, NEP4 usually has higher accuracy, if all the other hyperparameters are the same.

:program:`GPUMD` not only allows one to carry out simulations using :term:`NEP` models via the :ref:`gpumd executable <gpumd_executable>` but even the construction of such models via the :ref:`nep executable <nep_executable>`.

Expand Down Expand Up @@ -67,7 +67,7 @@ and :math:`Y_{lm}(\theta_{ij},\phi_{ij})` are the spherical harmonics as a funct
For expressions of the 4-body and 5-body descriptor components, we refer to [Fan2022b]_.

The radial functions :math:`g_n(r_{ij})` appear in both the radial and the angular descriptor components.
For NEP3 [Fan2022b]_, in the radial descriptor components,
In the radial descriptor components,

.. math::
Expand All @@ -93,7 +93,6 @@ and
0, & r_{ij} > r_\mathrm{c}^\mathrm{R}.
\end{cases}
For NEP2, the trainable parameters :math:`c^{ij}_{nk}` reduce to :math:`c^{ij}_{n}\delta_{nk}`.
In the angular descriptor components, :math:`g_n(r_{ij})` have similar forms but with :math:`N_\mathrm{bas}^\mathrm{R}` changed to :math:`N_\mathrm{bas}^\mathrm{A}` and with :math:`r_\mathrm{c}^\mathrm{R}` changed to :math:`r_\mathrm{c}^\mathrm{A}`.

Model dimensions
Expand All @@ -117,13 +116,11 @@ Model dimensions
* - 5-body angular descriptor components
- :math:`(n_\mathrm{max}^\mathrm{A}+1)` or zero (if not used)
* - descriptor components
- :math:`N_\mathrm{des}` is the sum of the above numbers
- :math:`N_\mathrm{des}` is the sum of the above numbers of descriptor components
* - trainable parameters :math:`c_{nk}^{ij}` in the descriptor
- :math:`N_\mathrm{typ}^2 [(n_\mathrm{max}^\mathrm{R}+1)+(n_\mathrm{max}^\mathrm{A}+1)]` (NEP2)
* -
- :math:`N_\mathrm{typ}^2 [(n_\mathrm{max}^\mathrm{R}+1)(N_\mathrm{bas}^\mathrm{R}+1)+(n_\mathrm{max}^\mathrm{A}+1)(N_\mathrm{bas}^\mathrm{A}+1)]` (NEP3, NEP4)
- :math:`N_\mathrm{typ}^2 [(n_\mathrm{max}^\mathrm{R}+1)(N_\mathrm{bas}^\mathrm{R}+1)+(n_\mathrm{max}^\mathrm{A}+1)(N_\mathrm{bas}^\mathrm{A}+1)]`
* - trainable :term:`NN` parameters
- :math:`N_\mathrm{nn} = (N_\mathrm{des} +2) N_\mathrm{neu}+1` (NEP2, NEP3)
- :math:`N_\mathrm{nn} = (N_\mathrm{des} +2) N_\mathrm{neu}+1` (NEP3)
* -
- :math:`N_\mathrm{nn} = (N_\mathrm{des} +2) N_\mathrm{neu} N_\mathrm{typ}+1` (NEP4)

Expand Down
2 changes: 1 addition & 1 deletion examples/11_NEP_potential_PbTe/tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"- The ``train.xyz``/``test.xyz`` file should be prepared according to the [documentation](https://gpumd.org/nep/input_files/).\n",
"- For the example in this tutorial, we have already prepared the ``train.xyz`` and ``test.xyz`` files in the current folder, which contain 25 and 300 structures, respectively.\n",
"- In this example, there are only energy and force training data. In general, one can also have virial training data.\n",
"- We used the VASP code to calculate the training data, but ``nep`` does not care about this. You can generate the data in ``train.xyz``/``test.xyz`` using any method that works for you. For example, before doing new DFT calculations, you can first check if there are training data publicly available and then try to convert them into the format as required by ``train.xyz``/``test.xyz``. There are quite a few tools (https://github.com/brucefan1983/GPUMD/tree/master/tools/nep_related) available for this purpose."
"- We used the VASP code to calculate the training data, but ``nep`` does not care about this. You can generate the data in ``train.xyz``/``test.xyz`` using any method that works for you. For example, before doing new DFT calculations, you can first check if there are training data publicly available and then try to convert them into the format as required by ``train.xyz``/``test.xyz``. There are quite a few tools (https://github.com/brucefan1983/GPUMD/tree/master/tools) available for this purpose."
]
},
{
Expand Down

0 comments on commit ac309c8

Please sign in to comment.