Skip to content

Commit

Permalink
fix: fix type hint of sel (deepmodeling#3624)
Browse files Browse the repository at this point in the history
The wrong type hint appeared in
f5c67af, very old...

Signed-off-by: Jinzhe Zeng <[email protected]>
(cherry picked from commit d0d5a94)
Signed-off-by: Jinzhe Zeng <[email protected]>
  • Loading branch information
njzjz committed Apr 6, 2024
1 parent 6d38230 commit bf76008
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions deepmd/descriptor/loc_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions deepmd/descriptor/se_a.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,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}`
Expand Down Expand Up @@ -161,7 +161,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,
Expand Down
4 changes: 2 additions & 2 deletions deepmd/descriptor/se_a_ebd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion deepmd/descriptor/se_a_ebd_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions deepmd/descriptor/se_a_ef.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions deepmd/descriptor/se_a_mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion deepmd/descriptor/se_atten.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,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}`
Expand Down
2 changes: 1 addition & 1 deletion deepmd/descriptor/se_atten_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
Expand Down
4 changes: 2 additions & 2 deletions deepmd/descriptor/se_r.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,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
Expand Down Expand Up @@ -85,7 +85,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,
Expand Down
4 changes: 2 additions & 2 deletions deepmd/descriptor/se_t.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions deepmd_utils/model_format/se_e2_a.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class DescrptSeA(NativeOP):
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}`
Expand Down Expand Up @@ -120,7 +120,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,
Expand Down

0 comments on commit bf76008

Please sign in to comment.