Skip to content

Commit

Permalink
remove get_has_efield
Browse files Browse the repository at this point in the history
Signed-off-by: Jinzhe Zeng <[email protected]>
  • Loading branch information
njzjz committed Feb 13, 2024
1 parent 57ff3d1 commit 612bedc
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 32 deletions.
4 changes: 0 additions & 4 deletions deepmd/dpmodel/model/dp_atomic_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,6 @@ def get_sel_type(self) -> List[int]:
"""
return []

Check warning on line 162 in deepmd/dpmodel/model/dp_atomic_model.py

View check run for this annotation

Codecov / codecov/patch

deepmd/dpmodel/model/dp_atomic_model.py#L162

Added line #L162 was not covered by tests

def get_has_efield(self) -> bool:
"""Check if the model has efield."""
return False

def is_aparam_nall(self) -> bool:
"""Check whether the shape of atomic parameters is (nframes, nall, ndim).
Expand Down
4 changes: 0 additions & 4 deletions deepmd/dpmodel/model/linear_atomic_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,6 @@ def get_sel_type(self) -> List[int]:
# join all the selected types
return list(set().union(*[model.get_sel_type() for model in self.models]))

Check warning on line 221 in deepmd/dpmodel/model/linear_atomic_model.py

View check run for this annotation

Codecov / codecov/patch

deepmd/dpmodel/model/linear_atomic_model.py#L221

Added line #L221 was not covered by tests

def get_has_efield(self) -> bool:
"""Check if the model has efield."""
return False

def is_aparam_nall(self) -> bool:
"""Check whether the shape of atomic parameters is (nframes, nall, ndim).
Expand Down
4 changes: 0 additions & 4 deletions deepmd/dpmodel/model/make_base_atomic_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ def get_sel_type(self) -> List[int]:
If returning an empty list, all atom types are selected.
"""

@abstractmethod
def get_has_efield(self) -> bool:
"""Check if the model has efield."""

@abstractmethod
def is_aparam_nall(self) -> bool:
"""Check whether the shape of atomic parameters is (nframes, nall, ndim).
Expand Down
4 changes: 0 additions & 4 deletions deepmd/dpmodel/model/pairtab_atomic_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,6 @@ def get_sel_type(self) -> List[int]:
"""
return []

Check warning on line 331 in deepmd/dpmodel/model/pairtab_atomic_model.py

View check run for this annotation

Codecov / codecov/patch

deepmd/dpmodel/model/pairtab_atomic_model.py#L331

Added line #L331 was not covered by tests

def get_has_efield(self) -> bool:
"""Check if the model has efield."""
return False

def is_aparam_nall(self) -> bool:
"""Check whether the shape of atomic parameters is (nframes, nall, ndim).
Expand Down
2 changes: 1 addition & 1 deletion deepmd/pt/infer/deep_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def get_numb_dos(self) -> int:

def get_has_efield(self):
"""Check if the model has efield."""
return self.dp.model["Default"].get_has_efield()
return False

def get_ntypes_spin(self):
"""Get the number of spin atom types of this model."""
Expand Down
5 changes: 0 additions & 5 deletions deepmd/pt/model/model/dp_atomic_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,6 @@ def get_sel_type(self) -> List[int]:
# TODO: self.fitting_net.get_sel_type()
return []

Check warning on line 227 in deepmd/pt/model/model/dp_atomic_model.py

View check run for this annotation

Codecov / codecov/patch

deepmd/pt/model/model/dp_atomic_model.py#L227

Added line #L227 was not covered by tests

@torch.jit.export
def get_has_efield(self) -> bool:
"""Check if the model has efield."""
return False

@torch.jit.export
def is_aparam_nall(self) -> bool:
"""Check whether the shape of atomic parameters is (nframes, nall, ndim).
Expand Down
5 changes: 0 additions & 5 deletions deepmd/pt/model/model/linear_atomic_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,6 @@ def get_sel_type(self) -> List[int]:
)
).tolist()

@torch.jit.export
def get_has_efield(self) -> bool:
"""Check if the model has efield."""
return False

@torch.jit.export
def is_aparam_nall(self) -> bool:
"""Check whether the shape of atomic parameters is (nframes, nall, ndim).
Expand Down
5 changes: 0 additions & 5 deletions deepmd/pt/model/model/pairtab_atomic_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,6 @@ def get_sel_type(self) -> List[int]:
"""
return []

Check warning on line 359 in deepmd/pt/model/model/pairtab_atomic_model.py

View check run for this annotation

Codecov / codecov/patch

deepmd/pt/model/model/pairtab_atomic_model.py#L359

Added line #L359 was not covered by tests

@torch.jit.export
def get_has_efield(self) -> bool:
"""Check if the model has efield."""
return False

@torch.jit.export
def is_aparam_nall(self) -> bool:
"""Check whether the shape of atomic parameters is (nframes, nall, ndim).
Expand Down

0 comments on commit 612bedc

Please sign in to comment.