From e35d1ad1e69cf9189efdffd3d21f41ebbb876fbc Mon Sep 17 00:00:00 2001 From: Duo <50307526+iProzd@users.noreply.github.com> Date: Tue, 27 Feb 2024 15:21:57 +0800 Subject: [PATCH] improve env_protection doc --- deepmd/tf/descriptor/se_a.py | 2 ++ deepmd/utils/argcheck.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/deepmd/tf/descriptor/se_a.py b/deepmd/tf/descriptor/se_a.py index 38e13894df..d0fcc523f3 100644 --- a/deepmd/tf/descriptor/se_a.py +++ b/deepmd/tf/descriptor/se_a.py @@ -189,6 +189,8 @@ def __init__( raise RuntimeError( f"rcut_smth ({rcut_smth:f}) should be no more than rcut ({rcut:f})!" ) + if env_protection != 0.0: + raise NotImplementedError("env_protection != 0.0 is not supported.") self.sel_a = sel self.rcut_r = rcut self.rcut_r_smth = rcut_smth diff --git a/deepmd/utils/argcheck.py b/deepmd/utils/argcheck.py index 14df555ab6..81f6016bbe 100644 --- a/deepmd/utils/argcheck.py +++ b/deepmd/utils/argcheck.py @@ -200,7 +200,7 @@ def descrpt_se_a_args(): doc_trainable = "If the parameters in the embedding net is trainable" doc_seed = "Random seed for parameter initialization" doc_exclude_types = "The excluded pairs of types which have no interaction with each other. For example, `[[0, 1]]` means no interaction between type 0 and type 1." - doc_env_protection = "Protection parameter to prevent division by zero errors during environment matrix calculations." + doc_env_protection = "(Supported backend: PyTorch) Protection parameter to prevent division by zero errors during environment matrix calculations. For example, when using paddings, there may be zero distances of neighbors, which may make division by zero error during environment matrix calculations without protection." doc_set_davg_zero = "Set the normalization average to zero. This option should be set when `atom_ener` in the energy fitting is used" return [