diff --git a/deepmd/dpmodel/__init__.py b/deepmd/dpmodel/__init__.py new file mode 100644 index 0000000000..5a83bb7bd4 --- /dev/null +++ b/deepmd/dpmodel/__init__.py @@ -0,0 +1,34 @@ +# SPDX-License-Identifier: LGPL-3.0-or-later +from .common import ( + DEFAULT_PRECISION, + PRECISION_DICT, + NativeOP, +) +from .model import ( + DPAtomicModel, + DPModel, +) +from .output_def import ( + FittingOutputDef, + ModelOutputDef, + OutputVariableDef, + fitting_check_output, + get_deriv_name, + get_reduce_name, + model_check_output, +) + +__all__ = [ + "DPModel", + "DPAtomicModel", + "PRECISION_DICT", + "DEFAULT_PRECISION", + "NativeOP", + "ModelOutputDef", + "FittingOutputDef", + "OutputVariableDef", + "model_check_output", + "fitting_check_output", + "get_reduce_name", + "get_deriv_name", +] diff --git a/deepmd/model_format/common.py b/deepmd/dpmodel/common.py similarity index 92% rename from deepmd/model_format/common.py rename to deepmd/dpmodel/common.py index 88478f7736..1e35bd4d49 100644 --- a/deepmd/model_format/common.py +++ b/deepmd/dpmodel/common.py @@ -1,6 +1,7 @@ # SPDX-License-Identifier: LGPL-3.0-or-later from abc import ( ABC, + abstractmethod, ) import numpy as np @@ -21,9 +22,10 @@ class NativeOP(ABC): """The unit operation of a native model.""" + @abstractmethod def call(self, *args, **kwargs): """Forward pass in NumPy implementation.""" - raise NotImplementedError + pass def __call__(self, *args, **kwargs): """Forward pass in NumPy implementation.""" diff --git a/deepmd/dpmodel/descriptor/__init__.py b/deepmd/dpmodel/descriptor/__init__.py new file mode 100644 index 0000000000..fdac48ed41 --- /dev/null +++ b/deepmd/dpmodel/descriptor/__init__.py @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: LGPL-3.0-or-later +from .se_e2_a import ( + DescrptSeA, +) + +__all__ = [ + "DescrptSeA", +] diff --git a/deepmd/model_format/se_e2_a.py b/deepmd/dpmodel/descriptor/se_e2_a.py similarity index 99% rename from deepmd/model_format/se_e2_a.py rename to deepmd/dpmodel/descriptor/se_e2_a.py index 9e61f2b115..82d3c66d54 100644 --- a/deepmd/model_format/se_e2_a.py +++ b/deepmd/dpmodel/descriptor/se_e2_a.py @@ -13,15 +13,13 @@ Optional, ) -from .common import ( +from deepmd.dpmodel import ( DEFAULT_PRECISION, NativeOP, ) -from .env_mat import ( - EnvMat, -) -from .network import ( +from deepmd.dpmodel.utils import ( EmbeddingNet, + EnvMat, NetworkCollection, ) diff --git a/deepmd/dpmodel/fitting/__init__.py b/deepmd/dpmodel/fitting/__init__.py new file mode 100644 index 0000000000..50a4e88e1c --- /dev/null +++ b/deepmd/dpmodel/fitting/__init__.py @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: LGPL-3.0-or-later +from .fitting import ( + InvarFitting, +) + +__all__ = [ + "InvarFitting", +] diff --git a/deepmd/model_format/fitting.py b/deepmd/dpmodel/fitting/fitting.py similarity index 99% rename from deepmd/model_format/fitting.py rename to deepmd/dpmodel/fitting/fitting.py index 815f945816..399ea3ccff 100644 --- a/deepmd/model_format/fitting.py +++ b/deepmd/dpmodel/fitting/fitting.py @@ -8,19 +8,19 @@ import numpy as np -from .common import ( +from deepmd.dpmodel import ( DEFAULT_PRECISION, NativeOP, ) -from .network import ( - FittingNet, - NetworkCollection, -) -from .output_def import ( +from deepmd.dpmodel.output_def import ( FittingOutputDef, OutputVariableDef, fitting_check_output, ) +from deepmd.dpmodel.utils import ( + FittingNet, + NetworkCollection, +) @fitting_check_output diff --git a/deepmd/dpmodel/model/__init__.py b/deepmd/dpmodel/model/__init__.py new file mode 100644 index 0000000000..c21b29f13e --- /dev/null +++ b/deepmd/dpmodel/model/__init__.py @@ -0,0 +1,16 @@ +# SPDX-License-Identifier: LGPL-3.0-or-later +from .dp_atomic_model import ( + DPAtomicModel, +) +from .dp_model import ( + DPModel, +) +from .make_atomic_model import ( + make_base_atomic_model, +) + +__all__ = [ + "DPModel", + "DPAtomicModel", + "make_base_atomic_model", +] diff --git a/deepmd/model_format/base_atomic_model.py b/deepmd/dpmodel/model/base_atomic_model.py similarity index 81% rename from deepmd/model_format/base_atomic_model.py rename to deepmd/dpmodel/model/base_atomic_model.py index 27fb557887..64471e14c0 100644 --- a/deepmd/model_format/base_atomic_model.py +++ b/deepmd/dpmodel/model/base_atomic_model.py @@ -1,7 +1,7 @@ # SPDX-License-Identifier: LGPL-3.0-or-later import numpy as np -from .atomic_model import ( +from .make_atomic_model import ( make_base_atomic_model, ) diff --git a/deepmd/model_format/dp_atomic_model.py b/deepmd/dpmodel/model/dp_atomic_model.py similarity index 93% rename from deepmd/model_format/dp_atomic_model.py rename to deepmd/dpmodel/model/dp_atomic_model.py index dd9a09cd97..a52af1c9d6 100644 --- a/deepmd/model_format/dp_atomic_model.py +++ b/deepmd/dpmodel/model/dp_atomic_model.py @@ -9,14 +9,19 @@ import numpy as np -from .base_atomic_model import ( - BaseAtomicModel, +from deepmd.dpmodel.descriptor import ( # noqa # TODO: should import all descriptors! + DescrptSeA, ) -from .fitting import InvarFitting # noqa # TODO: should import all fittings! -from .output_def import ( +from deepmd.dpmodel.fitting import ( # noqa # TODO: should import all fittings! + InvarFitting, +) +from deepmd.dpmodel.output_def import ( FittingOutputDef, ) -from .se_e2_a import DescrptSeA # noqa # TODO: should import all descriptors! + +from .base_atomic_model import ( + BaseAtomicModel, +) class DPAtomicModel(BaseAtomicModel): diff --git a/deepmd/model_format/dp_model.py b/deepmd/dpmodel/model/dp_model.py similarity index 100% rename from deepmd/model_format/dp_model.py rename to deepmd/dpmodel/model/dp_model.py diff --git a/deepmd/model_format/atomic_model.py b/deepmd/dpmodel/model/make_atomic_model.py similarity index 96% rename from deepmd/model_format/atomic_model.py rename to deepmd/dpmodel/model/make_atomic_model.py index f1245d8bd4..306084398b 100644 --- a/deepmd/model_format/atomic_model.py +++ b/deepmd/dpmodel/model/make_atomic_model.py @@ -10,7 +10,7 @@ Optional, ) -from .output_def import ( +from deepmd.dpmodel.output_def import ( FittingOutputDef, ) diff --git a/deepmd/model_format/make_model.py b/deepmd/dpmodel/model/make_model.py similarity index 99% rename from deepmd/model_format/make_model.py rename to deepmd/dpmodel/model/make_model.py index 4e0996995c..825845002d 100644 --- a/deepmd/model_format/make_model.py +++ b/deepmd/dpmodel/model/make_model.py @@ -6,17 +6,16 @@ import numpy as np -from .nlist import ( +from deepmd.dpmodel.output_def import ( + ModelOutputDef, +) +from deepmd.dpmodel.utils import ( build_neighbor_list, extend_coord_with_ghosts, nlist_distinguish_types, -) -from .output_def import ( - ModelOutputDef, -) -from .region import ( normalize_coord, ) + from .transform_output import ( communicate_extended_output, fit_output_to_model_output, diff --git a/deepmd/model_format/transform_output.py b/deepmd/dpmodel/model/transform_output.py similarity index 98% rename from deepmd/model_format/transform_output.py rename to deepmd/dpmodel/model/transform_output.py index c59480eb0d..3c7917d847 100644 --- a/deepmd/model_format/transform_output.py +++ b/deepmd/dpmodel/model/transform_output.py @@ -5,7 +5,7 @@ import numpy as np -from .output_def import ( +from deepmd.dpmodel.output_def import ( FittingOutputDef, ModelOutputDef, get_deriv_name, diff --git a/deepmd/model_format/output_def.py b/deepmd/dpmodel/output_def.py similarity index 100% rename from deepmd/model_format/output_def.py rename to deepmd/dpmodel/output_def.py diff --git a/deepmd/dpmodel/utils/__init__.py b/deepmd/dpmodel/utils/__init__.py new file mode 100644 index 0000000000..d3c31ae246 --- /dev/null +++ b/deepmd/dpmodel/utils/__init__.py @@ -0,0 +1,56 @@ +# SPDX-License-Identifier: LGPL-3.0-or-later +from .env_mat import ( + EnvMat, +) +from .network import ( + EmbeddingNet, + FittingNet, + NativeLayer, + NativeNet, + NetworkCollection, + load_dp_model, + make_embedding_network, + make_fitting_network, + make_multilayer_network, + save_dp_model, + traverse_model_dict, +) +from .nlist import ( + build_multiple_neighbor_list, + build_neighbor_list, + extend_coord_with_ghosts, + get_multiple_nlist_key, + nlist_distinguish_types, +) +from .region import ( + inter2phys, + normalize_coord, + phys2inter, + to_face_distance, +) + +__all__ = [ + "EnvMat", + "make_multilayer_network", + "make_embedding_network", + "make_fitting_network", + "EmbeddingNet", + "FittingNet", + "NativeLayer", + "NativeNet", + "NetworkCollection", + "load_dp_model", + "save_dp_model", + "traverse_model_dict", + "PRECISION_DICT", + "DEFAULT_PRECISION", + "build_neighbor_list", + "nlist_distinguish_types", + "get_multiple_nlist_key", + "build_multiple_neighbor_list", + "extend_coord_with_ghosts", + "normalize_coord", + "inter2phys", + "phys2inter", + "to_face_distance", +] diff --git a/deepmd/model_format/env_mat.py b/deepmd/dpmodel/utils/env_mat.py similarity index 99% rename from deepmd/model_format/env_mat.py rename to deepmd/dpmodel/utils/env_mat.py index 7822bd7d0c..739b06208c 100644 --- a/deepmd/model_format/env_mat.py +++ b/deepmd/dpmodel/utils/env_mat.py @@ -6,7 +6,7 @@ import numpy as np -from .common import ( +from deepmd.dpmodel import ( NativeOP, ) diff --git a/deepmd/model_format/network.py b/deepmd/dpmodel/utils/network.py similarity index 99% rename from deepmd/model_format/network.py rename to deepmd/dpmodel/utils/network.py index f2056c0b95..17b3043612 100644 --- a/deepmd/model_format/network.py +++ b/deepmd/dpmodel/utils/network.py @@ -22,7 +22,7 @@ except ImportError: __version__ = "unknown" -from .common import ( +from deepmd.dpmodel import ( DEFAULT_PRECISION, PRECISION_DICT, NativeOP, diff --git a/deepmd/model_format/nlist.py b/deepmd/dpmodel/utils/nlist.py similarity index 100% rename from deepmd/model_format/nlist.py rename to deepmd/dpmodel/utils/nlist.py diff --git a/deepmd/model_format/region.py b/deepmd/dpmodel/utils/region.py similarity index 100% rename from deepmd/model_format/region.py rename to deepmd/dpmodel/utils/region.py diff --git a/deepmd/model_format/__init__.py b/deepmd/model_format/__init__.py deleted file mode 100644 index 38873469e8..0000000000 --- a/deepmd/model_format/__init__.py +++ /dev/null @@ -1,72 +0,0 @@ -# SPDX-License-Identifier: LGPL-3.0-or-later -from .common import ( - DEFAULT_PRECISION, - PRECISION_DICT, - NativeOP, -) -from .dp_atomic_model import ( - DPAtomicModel, -) -from .dp_model import ( - DPModel, -) -from .env_mat import ( - EnvMat, -) -from .fitting import ( - InvarFitting, -) -from .network import ( - EmbeddingNet, - FittingNet, - NativeLayer, - NativeNet, - NetworkCollection, - load_dp_model, - make_embedding_network, - make_fitting_network, - make_multilayer_network, - save_dp_model, - traverse_model_dict, -) -from .output_def import ( - FittingOutputDef, - ModelOutputDef, - OutputVariableDef, - fitting_check_output, - get_deriv_name, - get_reduce_name, - model_check_output, -) -from .se_e2_a import ( - DescrptSeA, -) - -__all__ = [ - "DPModel", - "DPAtomicModel", - "InvarFitting", - "DescrptSeA", - "EnvMat", - "make_multilayer_network", - "make_embedding_network", - "make_fitting_network", - "EmbeddingNet", - "FittingNet", - "NativeLayer", - "NativeNet", - "NetworkCollection", - "NativeOP", - "load_dp_model", - "save_dp_model", - "traverse_model_dict", - "PRECISION_DICT", - "DEFAULT_PRECISION", - "ModelOutputDef", - "FittingOutputDef", - "OutputVariableDef", - "model_check_output", - "fitting_check_output", - "get_reduce_name", - "get_deriv_name", -] diff --git a/deepmd/pt/model/descriptor/se_a.py b/deepmd/pt/model/descriptor/se_a.py index 28ce4a80a7..f2e6a30722 100644 --- a/deepmd/pt/model/descriptor/se_a.py +++ b/deepmd/pt/model/descriptor/se_a.py @@ -28,7 +28,7 @@ except ImportError: from torch.jit import Final -from deepmd.model_format import EnvMat as DPEnvMat +from deepmd.dpmodel.utils import EnvMat as DPEnvMat from deepmd.pt.model.network.mlp import ( EmbeddingNet, NetworkCollection, diff --git a/deepmd/pt/model/model/atomic_model.py b/deepmd/pt/model/model/atomic_model.py index 562f817568..db87324b3f 100644 --- a/deepmd/pt/model/model/atomic_model.py +++ b/deepmd/pt/model/model/atomic_model.py @@ -6,7 +6,7 @@ import torch -from deepmd.model_format.atomic_model import ( +from deepmd.dpmodel.model import ( make_base_atomic_model, ) diff --git a/deepmd/pt/model/model/dp_atomic_model.py b/deepmd/pt/model/model/dp_atomic_model.py index 8461d3b7cb..02a3fdb20d 100644 --- a/deepmd/pt/model/model/dp_atomic_model.py +++ b/deepmd/pt/model/model/dp_atomic_model.py @@ -9,7 +9,7 @@ import torch -from deepmd.model_format import ( +from deepmd.dpmodel import ( FittingOutputDef, ) from deepmd.pt.model.descriptor.se_a import ( # noqa # TODO: should import all descriptors!!! diff --git a/deepmd/pt/model/model/make_model.py b/deepmd/pt/model/model/make_model.py index 8b8e63214e..dc4f6d24ae 100644 --- a/deepmd/pt/model/model/make_model.py +++ b/deepmd/pt/model/model/make_model.py @@ -6,7 +6,7 @@ import torch -from deepmd.model_format import ( +from deepmd.dpmodel import ( ModelOutputDef, ) from deepmd.pt.model.model.transform_output import ( diff --git a/deepmd/pt/model/model/pair_tab.py b/deepmd/pt/model/model/pair_tab.py index 4701f26e04..7d341de041 100644 --- a/deepmd/pt/model/model/pair_tab.py +++ b/deepmd/pt/model/model/pair_tab.py @@ -11,7 +11,7 @@ nn, ) -from deepmd.model_format import ( +from deepmd.dpmodel import ( FittingOutputDef, OutputVariableDef, ) diff --git a/deepmd/pt/model/model/transform_output.py b/deepmd/pt/model/model/transform_output.py index 0df2746871..d942ed3ae8 100644 --- a/deepmd/pt/model/model/transform_output.py +++ b/deepmd/pt/model/model/transform_output.py @@ -7,7 +7,7 @@ import torch -from deepmd.model_format import ( +from deepmd.dpmodel import ( FittingOutputDef, ModelOutputDef, OutputVariableDef, diff --git a/deepmd/pt/model/network/mlp.py b/deepmd/pt/model/network/mlp.py index d76abd82f9..251150f945 100644 --- a/deepmd/pt/model/network/mlp.py +++ b/deepmd/pt/model/network/mlp.py @@ -15,11 +15,11 @@ device = env.DEVICE -from deepmd.model_format import ( +from deepmd.dpmodel.utils import ( NativeLayer, ) -from deepmd.model_format import NetworkCollection as DPNetworkCollection -from deepmd.model_format import ( +from deepmd.dpmodel.utils import NetworkCollection as DPNetworkCollection +from deepmd.dpmodel.utils import ( make_embedding_network, make_fitting_network, make_multilayer_network, diff --git a/deepmd/pt/model/task/denoise.py b/deepmd/pt/model/task/denoise.py index 7e6b6dcdb6..cae6e45b0e 100644 --- a/deepmd/pt/model/task/denoise.py +++ b/deepmd/pt/model/task/denoise.py @@ -5,7 +5,7 @@ import torch -from deepmd.model_format import ( +from deepmd.dpmodel import ( FittingOutputDef, OutputVariableDef, fitting_check_output, diff --git a/deepmd/pt/model/task/ener.py b/deepmd/pt/model/task/ener.py index d83fe90dbe..7dce789603 100644 --- a/deepmd/pt/model/task/ener.py +++ b/deepmd/pt/model/task/ener.py @@ -10,7 +10,7 @@ import numpy as np import torch -from deepmd.model_format import ( +from deepmd.dpmodel import ( FittingOutputDef, OutputVariableDef, fitting_check_output, diff --git a/deepmd/pt/model/task/task.py b/deepmd/pt/model/task/task.py index b2dc03e4bd..f4ad875cdc 100644 --- a/deepmd/pt/model/task/task.py +++ b/deepmd/pt/model/task/task.py @@ -6,7 +6,7 @@ import torch -from deepmd.model_format import ( +from deepmd.dpmodel import ( FittingOutputDef, ) diff --git a/deepmd/pt/utils/utils.py b/deepmd/pt/utils/utils.py index e83e12f608..2b96925a51 100644 --- a/deepmd/pt/utils/utils.py +++ b/deepmd/pt/utils/utils.py @@ -8,7 +8,7 @@ import torch import torch.nn.functional as F -from deepmd.model_format.common import PRECISION_DICT as NP_PRECISION_DICT +from deepmd.dpmodel.common import PRECISION_DICT as NP_PRECISION_DICT from .env import ( DEVICE, diff --git a/source/tests/common/test_model_format_utils.py b/source/tests/common/test_model_format_utils.py index 59423fb8da..22b6b24aa3 100644 --- a/source/tests/common/test_model_format_utils.py +++ b/source/tests/common/test_model_format_utils.py @@ -8,28 +8,30 @@ import numpy as np -from deepmd.model_format import ( +from deepmd.dpmodel.descriptor import ( DescrptSeA, +) +from deepmd.dpmodel.fitting import ( + InvarFitting, +) +from deepmd.dpmodel.model import ( DPAtomicModel, DPModel, +) +from deepmd.dpmodel.utils import ( EmbeddingNet, EnvMat, FittingNet, - InvarFitting, NativeLayer, NativeNet, NetworkCollection, - load_dp_model, - save_dp_model, -) -from deepmd.model_format.nlist import ( build_multiple_neighbor_list, build_neighbor_list, extend_coord_with_ghosts, get_multiple_nlist_key, -) -from deepmd.model_format.region import ( inter2phys, + load_dp_model, + save_dp_model, to_face_distance, ) @@ -297,7 +299,7 @@ def setUp(self) -> None: }, ], } - self.filename = "test_dp_model_format.dp" + self.filename = "test_dp_dpmodel.dp" def test_save_load_model(self): save_dp_model(self.filename, deepcopy(self.model_dict)) diff --git a/source/tests/common/test_output_def.py b/source/tests/common/test_output_def.py index 4316fa5982..d0cf822247 100644 --- a/source/tests/common/test_output_def.py +++ b/source/tests/common/test_output_def.py @@ -6,7 +6,7 @@ import numpy as np -from deepmd.model_format import ( +from deepmd.dpmodel import ( FittingOutputDef, ModelOutputDef, NativeOP, @@ -14,7 +14,7 @@ fitting_check_output, model_check_output, ) -from deepmd.model_format.output_def import ( +from deepmd.dpmodel.output_def import ( check_var, ) diff --git a/source/tests/pt/test_dp_atomic_model.py b/source/tests/pt/test_dp_atomic_model.py index a8b20f829d..2960cb97cc 100644 --- a/source/tests/pt/test_dp_atomic_model.py +++ b/source/tests/pt/test_dp_atomic_model.py @@ -4,9 +4,9 @@ import numpy as np import torch -from deepmd.model_format import DescrptSeA as DPDescrptSeA -from deepmd.model_format import DPAtomicModel as DPDPAtomicModel -from deepmd.model_format import InvarFitting as DPInvarFitting +from deepmd.dpmodel import DPAtomicModel as DPDPAtomicModel +from deepmd.dpmodel.descriptor import DescrptSeA as DPDescrptSeA +from deepmd.dpmodel.fitting import InvarFitting as DPInvarFitting from deepmd.pt.model.descriptor.se_a import ( DescrptSeA, ) diff --git a/source/tests/pt/test_dp_mode.py b/source/tests/pt/test_dp_mode.py index d9d5b0ba0d..79f65d26d6 100644 --- a/source/tests/pt/test_dp_mode.py +++ b/source/tests/pt/test_dp_mode.py @@ -4,9 +4,9 @@ import numpy as np import torch -from deepmd.model_format import DescrptSeA as DPDescrptSeA -from deepmd.model_format import DPModel as DPDPModel -from deepmd.model_format import InvarFitting as DPInvarFitting +from deepmd.dpmodel import DPModel as DPDPModel +from deepmd.dpmodel.descriptor import DescrptSeA as DPDescrptSeA +from deepmd.dpmodel.fitting import InvarFitting as DPInvarFitting from deepmd.pt.model.descriptor.se_a import ( DescrptSeA, ) diff --git a/source/tests/pt/test_ener_fitting.py b/source/tests/pt/test_ener_fitting.py index eece8447df..cbddf34dd6 100644 --- a/source/tests/pt/test_ener_fitting.py +++ b/source/tests/pt/test_ener_fitting.py @@ -5,7 +5,7 @@ import numpy as np import torch -from deepmd.model_format import InvarFitting as DPInvarFitting +from deepmd.dpmodel.fitting import InvarFitting as DPInvarFitting from deepmd.pt.model.descriptor.se_a import ( DescrptSeA, ) diff --git a/source/tests/pt/test_env_mat.py b/source/tests/pt/test_env_mat.py index d9f8d59b1c..b9f0ff1981 100644 --- a/source/tests/pt/test_env_mat.py +++ b/source/tests/pt/test_env_mat.py @@ -5,7 +5,7 @@ import torch try: - from deepmd.model_format import ( + from deepmd.dpmodel import ( EnvMat, ) diff --git a/source/tests/pt/test_mlp.py b/source/tests/pt/test_mlp.py index 26f0041bf9..3a78b8294d 100644 --- a/source/tests/pt/test_mlp.py +++ b/source/tests/pt/test_mlp.py @@ -42,7 +42,7 @@ try: - from deepmd.model_format import ( + from deepmd.dpmodel import ( NativeLayer, NativeNet, ) @@ -54,7 +54,7 @@ support_native_net = False try: - from deepmd.model_format import EmbeddingNet as DPEmbeddingNet + from deepmd.dpmodel import EmbeddingNet as DPEmbeddingNet support_embedding_net = True except ModuleNotFoundError: @@ -63,7 +63,7 @@ support_embedding_net = False try: - from deepmd.model_format import FittingNet as DPFittingNet + from deepmd.dpmodel import FittingNet as DPFittingNet support_fitting_net = True except ModuleNotFoundError: diff --git a/source/tests/pt/test_se_e2_a.py b/source/tests/pt/test_se_e2_a.py index 0da80ea1ea..ec49725929 100644 --- a/source/tests/pt/test_se_e2_a.py +++ b/source/tests/pt/test_se_e2_a.py @@ -6,8 +6,8 @@ import torch try: - # from deepmd.model_format import PRECISION_DICT as DP_PRECISION_DICT - from deepmd.model_format import DescrptSeA as DPDescrptSeA + # from deepmd.dpmodel import PRECISION_DICT as DP_PRECISION_DICT + from deepmd.dpmodel import DescrptSeA as DPDescrptSeA support_se_e2_a = True except ModuleNotFoundError: