diff --git a/deepmd/dpmodel/atomic_model/__init__.py b/deepmd/dpmodel/atomic_model/__init__.py index 7475b0b07f..4d882d5e4b 100644 --- a/deepmd/dpmodel/atomic_model/__init__.py +++ b/deepmd/dpmodel/atomic_model/__init__.py @@ -53,9 +53,9 @@ "DPDipoleAtomicModel", "DPEnergyAtomicModel", "DPPolarAtomicModel", + "DPPropertyAtomicModel", "DPZBLLinearEnergyAtomicModel", "LinearEnergyAtomicModel", "PairTabAtomicModel", "make_base_atomic_model", - "DPPropertyAtomicModel", ] diff --git a/deepmd/dpmodel/atomic_model/property_atomic_model.py b/deepmd/dpmodel/atomic_model/property_atomic_model.py index 88c42d7d07..fddc16ab7f 100644 --- a/deepmd/dpmodel/atomic_model/property_atomic_model.py +++ b/deepmd/dpmodel/atomic_model/property_atomic_model.py @@ -1,5 +1,6 @@ # SPDX-License-Identifier: LGPL-3.0-or-later import numpy as np + from deepmd.dpmodel.fitting.property_fitting import ( PropertyFittingNet, ) diff --git a/deepmd/entrypoints/test.py b/deepmd/entrypoints/test.py index 8d1f9783ab..105b28c709 100644 --- a/deepmd/entrypoints/test.py +++ b/deepmd/entrypoints/test.py @@ -784,7 +784,7 @@ def test_property( assert isinstance(property_name, list) assert isinstance(property_dim, list) assert sum(property_dim) == dp.task_dim - for (name, dim) in zip(property_name, property_dim): + for name, dim in zip(property_name, property_dim): data.add(name, dim, atomic=False, must=True, high_prec=True) if has_atom_property: data.add(f"atom_{name}", dim, atomic=True, must=False, high_prec=True) @@ -840,7 +840,7 @@ def test_property( concat_property = [] concat_aproperty = [] - for (name, dim) in zip(property_name, property_dim): + for name, dim in zip(property_name, property_dim): test_data[name] = test_data[name].reshape([numb_test, dim]) test_data[f"atom_{name}"] = test_data[f"atom_{name}"].reshape( [numb_test, natoms * dim] diff --git a/deepmd/pt/model/model/property_model.py b/deepmd/pt/model/model/property_model.py index bc4cebffaa..945b7c96ba 100644 --- a/deepmd/pt/model/model/property_model.py +++ b/deepmd/pt/model/model/property_model.py @@ -1,7 +1,7 @@ # SPDX-License-Identifier: LGPL-3.0-or-later from typing import ( Optional, - Union + Union, ) import torch