forked from deepmodeling/deepmd-kit
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: document the floating-point precision of the model
Signed-off-by: Jinzhe Zeng <[email protected]>
- Loading branch information
Showing
3 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,3 +24,4 @@ Model | |
linear | ||
pairtab | ||
change-bias | ||
precision |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Floating-point precision of the model | ||
|
||
The following options control the precision of the model: | ||
|
||
- The environment variable {envvar}`DP_INTERFACE_PREC` controls the interface precision of the model, the descriptor, and the fitting, the precision of the environmental matrix, and the precision of the normalized parameters for the environmental matrix and the fitting output. | ||
- The training parameter {ref}`model[standard]/fitting_net[ener]/precision <precision>` controls the precision of neural networks in the descriptor and the fitting, and the subsequent operations after the output of neural networks. | ||
- The reduced output (e.g. total energy) is always `float64`. | ||
|
||
Usually, the following two combinations of options are recommended: | ||
|
||
- Setting {envvar}`DP_INTERFACE_PREC` to `high` (default) and all {ref}`model[standard]/fitting_net[ener]/precision <precision>` options to `float64` (default). | ||
- Setting {envvar}`DP_INTERFACE_PREC` to `high` (default) and all {ref}`model[standard]/fitting_net[ener]/precision <precision>` options to `float32`. | ||
|
||
The Python and C++ inference interfaces accept both `float64` and `float32` as the input and output arguments, whatever the floating-point precision of the model interface is. | ||
Usually, the MD programs (such as LAMMPS) only use `float64` in their interfaces. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters