From 78e46a61dca6ad2adee4bafe58654d3de9b6f55a Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 30 Mar 2024 05:46:30 -0400 Subject: [PATCH] fix: fix type hint of sel (#3624) The wrong type hint appeared in f5c67af0d99e9e5af35695b3b3e89524facfe427, very old... Signed-off-by: Jinzhe Zeng --- deepmd/dpmodel/descriptor/se_e2_a.py | 4 ++-- deepmd/dpmodel/descriptor/se_r.py | 4 ++-- deepmd/tf/descriptor/loc_frame.py | 4 ++-- deepmd/tf/descriptor/se_a.py | 4 ++-- deepmd/tf/descriptor/se_a_ebd.py | 4 ++-- deepmd/tf/descriptor/se_a_ebd_v2.py | 2 +- deepmd/tf/descriptor/se_a_ef.py | 6 +++--- deepmd/tf/descriptor/se_a_mask.py | 4 ++-- deepmd/tf/descriptor/se_atten.py | 2 +- deepmd/tf/descriptor/se_atten_v2.py | 2 +- deepmd/tf/descriptor/se_r.py | 4 ++-- deepmd/tf/descriptor/se_t.py | 4 ++-- 12 files changed, 22 insertions(+), 22 deletions(-) diff --git a/deepmd/dpmodel/descriptor/se_e2_a.py b/deepmd/dpmodel/descriptor/se_e2_a.py index 531aa09f3a..8d926034dd 100644 --- a/deepmd/dpmodel/descriptor/se_e2_a.py +++ b/deepmd/dpmodel/descriptor/se_e2_a.py @@ -95,7 +95,7 @@ class DescrptSeA(NativeOP, BaseDescriptor): The cut-off radius :math:`r_c` rcut_smth From where the environment matrix should be smoothed :math:`r_s` - sel : list[str] + sel : list[int] sel[i] specifies the maxmum number of type i atoms in the cut-off radius neuron : list[int] Number of neurons in each hidden layers of the embedding net :math:`\mathcal{N}` @@ -144,7 +144,7 @@ def __init__( self, rcut: float, rcut_smth: float, - sel: List[str], + sel: List[int], neuron: List[int] = [24, 48, 96], axis_neuron: int = 8, resnet_dt: bool = False, diff --git a/deepmd/dpmodel/descriptor/se_r.py b/deepmd/dpmodel/descriptor/se_r.py index 3128a28493..9c9b4e096e 100644 --- a/deepmd/dpmodel/descriptor/se_r.py +++ b/deepmd/dpmodel/descriptor/se_r.py @@ -55,7 +55,7 @@ class DescrptSeR(NativeOP, BaseDescriptor): The cut-off radius :math:`r_c` rcut_smth From where the environment matrix should be smoothed :math:`r_s` - sel : list[str] + sel : list[int] sel[i] specifies the maxmum number of type i atoms in the cut-off radius neuron : list[int] Number of neurons in each hidden layers of the embedding net :math:`\mathcal{N}` @@ -100,7 +100,7 @@ def __init__( self, rcut: float, rcut_smth: float, - sel: List[str], + sel: List[int], neuron: List[int] = [24, 48, 96], resnet_dt: bool = False, trainable: bool = True, diff --git a/deepmd/tf/descriptor/loc_frame.py b/deepmd/tf/descriptor/loc_frame.py index 185c5062aa..ee414fc0bb 100644 --- a/deepmd/tf/descriptor/loc_frame.py +++ b/deepmd/tf/descriptor/loc_frame.py @@ -35,11 +35,11 @@ class DescrptLocFrame(Descriptor): ---------- rcut The cut-off radius - sel_a : list[str] + sel_a : list[int] The length of the list should be the same as the number of atom types in the system. `sel_a[i]` gives the selected number of type-i neighbors. The full relative coordinates of the neighbors are used by the descriptor. - sel_r : list[str] + sel_r : list[int] The length of the list should be the same as the number of atom types in the system. `sel_r[i]` gives the selected number of type-i neighbors. Only relative distance of the neighbors are used by the descriptor. diff --git a/deepmd/tf/descriptor/se_a.py b/deepmd/tf/descriptor/se_a.py index 8b6ae3539b..7b22b3efd2 100644 --- a/deepmd/tf/descriptor/se_a.py +++ b/deepmd/tf/descriptor/se_a.py @@ -126,7 +126,7 @@ class DescrptSeA(DescrptSe): The cut-off radius :math:`r_c` rcut_smth From where the environment matrix should be smoothed :math:`r_s` - sel : list[str] + sel : list[int] sel[i] specifies the maxmum number of type i atoms in the cut-off radius neuron : list[int] Number of neurons in each hidden layers of the embedding net :math:`\mathcal{N}` @@ -169,7 +169,7 @@ def __init__( self, rcut: float, rcut_smth: float, - sel: List[str], + sel: List[int], neuron: List[int] = [24, 48, 96], axis_neuron: int = 8, resnet_dt: bool = False, diff --git a/deepmd/tf/descriptor/se_a_ebd.py b/deepmd/tf/descriptor/se_a_ebd.py index 92b194b37a..f252bf114c 100644 --- a/deepmd/tf/descriptor/se_a_ebd.py +++ b/deepmd/tf/descriptor/se_a_ebd.py @@ -38,7 +38,7 @@ class DescrptSeAEbd(DescrptSeA): The cut-off radius rcut_smth From where the environment matrix should be smoothed - sel : list[str] + sel : list[int] sel[i] specifies the maxmum number of type i atoms in the cut-off radius neuron : list[int] Number of neurons in each hidden layers of the embedding net @@ -74,7 +74,7 @@ def __init__( self, rcut: float, rcut_smth: float, - sel: List[str], + sel: List[int], neuron: List[int] = [24, 48, 96], axis_neuron: int = 8, resnet_dt: bool = False, diff --git a/deepmd/tf/descriptor/se_a_ebd_v2.py b/deepmd/tf/descriptor/se_a_ebd_v2.py index 54790fbfed..0d2acbc9d5 100644 --- a/deepmd/tf/descriptor/se_a_ebd_v2.py +++ b/deepmd/tf/descriptor/se_a_ebd_v2.py @@ -31,7 +31,7 @@ def __init__( self, rcut: float, rcut_smth: float, - sel: List[str], + sel: List[int], neuron: List[int] = [24, 48, 96], axis_neuron: int = 8, resnet_dt: bool = False, diff --git a/deepmd/tf/descriptor/se_a_ef.py b/deepmd/tf/descriptor/se_a_ef.py index 0c2b78162b..f1201d30fb 100644 --- a/deepmd/tf/descriptor/se_a_ef.py +++ b/deepmd/tf/descriptor/se_a_ef.py @@ -42,7 +42,7 @@ class DescrptSeAEf(DescrptSe): The cut-off radius rcut_smth From where the environment matrix should be smoothed - sel : list[str] + sel : list[int] sel[i] specifies the maxmum number of type i atoms in the cut-off radius neuron : list[int] Number of neurons in each hidden layers of the embedding net @@ -74,7 +74,7 @@ def __init__( self, rcut: float, rcut_smth: float, - sel: List[str], + sel: List[int], neuron: List[int] = [24, 48, 96], axis_neuron: int = 8, resnet_dt: bool = False, @@ -305,7 +305,7 @@ def __init__( op, rcut: float, rcut_smth: float, - sel: List[str], + sel: List[int], neuron: List[int] = [24, 48, 96], axis_neuron: int = 8, resnet_dt: bool = False, diff --git a/deepmd/tf/descriptor/se_a_mask.py b/deepmd/tf/descriptor/se_a_mask.py index ace8a47bbc..d1ae5d7bad 100644 --- a/deepmd/tf/descriptor/se_a_mask.py +++ b/deepmd/tf/descriptor/se_a_mask.py @@ -82,7 +82,7 @@ class DescrptSeAMask(DescrptSeA): Parameters ---------- - sel : list[str] + sel : list[int] sel[i] specifies the maxmum number of type i atoms in the neighbor list. neuron : list[int] Number of neurons in each hidden layers of the embedding net :math:`\mathcal{N}` @@ -117,7 +117,7 @@ class DescrptSeAMask(DescrptSeA): def __init__( self, - sel: List[str], + sel: List[int], neuron: List[int] = [24, 48, 96], axis_neuron: int = 8, resnet_dt: bool = False, diff --git a/deepmd/tf/descriptor/se_atten.py b/deepmd/tf/descriptor/se_atten.py index 8d80c10ba5..51e34e9b08 100644 --- a/deepmd/tf/descriptor/se_atten.py +++ b/deepmd/tf/descriptor/se_atten.py @@ -82,7 +82,7 @@ class DescrptSeAtten(DescrptSeA): The cut-off radius :math:`r_c` rcut_smth From where the environment matrix should be smoothed :math:`r_s` - sel : list[str] + sel : int sel[i] specifies the maxmum number of type i atoms in the cut-off radius neuron : list[int] Number of neurons in each hidden layers of the embedding net :math:`\mathcal{N}` diff --git a/deepmd/tf/descriptor/se_atten_v2.py b/deepmd/tf/descriptor/se_atten_v2.py index 0e1a70262f..784e02d84d 100644 --- a/deepmd/tf/descriptor/se_atten_v2.py +++ b/deepmd/tf/descriptor/se_atten_v2.py @@ -25,7 +25,7 @@ class DescrptSeAttenV2(DescrptSeAtten): The cut-off radius :math:`r_c` rcut_smth From where the environment matrix should be smoothed :math:`r_s` - sel : list[str] + sel : int sel[i] specifies the maxmum number of type i atoms in the cut-off radius neuron : list[int] Number of neurons in each hidden layers of the embedding net :math:`\mathcal{N}` diff --git a/deepmd/tf/descriptor/se_r.py b/deepmd/tf/descriptor/se_r.py index 8ef48c0de2..1443914aab 100644 --- a/deepmd/tf/descriptor/se_r.py +++ b/deepmd/tf/descriptor/se_r.py @@ -63,7 +63,7 @@ class DescrptSeR(DescrptSe): The cut-off radius rcut_smth From where the environment matrix should be smoothed - sel : list[str] + sel : list[int] sel[i] specifies the maxmum number of type i atoms in the cut-off radius neuron : list[int] Number of neurons in each hidden layers of the embedding net @@ -91,7 +91,7 @@ def __init__( self, rcut: float, rcut_smth: float, - sel: List[str], + sel: List[int], neuron: List[int] = [24, 48, 96], resnet_dt: bool = False, trainable: bool = True, diff --git a/deepmd/tf/descriptor/se_t.py b/deepmd/tf/descriptor/se_t.py index c72296daa7..4f6cda6c9c 100644 --- a/deepmd/tf/descriptor/se_t.py +++ b/deepmd/tf/descriptor/se_t.py @@ -56,7 +56,7 @@ class DescrptSeT(DescrptSe): The cut-off radius rcut_smth From where the environment matrix should be smoothed - sel : list[str] + sel : list[int] sel[i] specifies the maxmum number of type i atoms in the cut-off radius neuron : list[int] Number of neurons in each hidden layers of the embedding net @@ -81,7 +81,7 @@ def __init__( self, rcut: float, rcut_smth: float, - sel: List[str], + sel: List[int], neuron: List[int] = [24, 48, 96], resnet_dt: bool = False, trainable: bool = True,