Skip to content

Commit

Permalink
fix: don't distinguish nlist types in high model interfaces
Browse files Browse the repository at this point in the history
It will be distinguished in the low interfaces anyway.

Signed-off-by: Jinzhe Zeng <[email protected]>
  • Loading branch information
njzjz committed Nov 20, 2024
1 parent 6039e0b commit b9f640b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion deepmd/dpmodel/model/make_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ def model_call_from_call_lower(
nloc,
rcut,
sel,
distinguish_types=not mixed_types,
# types will be distinguished in the lower interface,
# so it doesn't need to be distinguished here
distinguish_types=False,
)
extended_coord = extended_coord.reshape(nframes, -1, 3)
model_predict_lower = call_lower(
Expand Down
4 changes: 3 additions & 1 deletion deepmd/jax/jax2tf/make_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ def model_call_from_call_lower(
nloc,
rcut,
sel,
distinguish_types=not mixed_types,
# types will be distinguished in the lower interface,
# so it doesn't need to be distinguished here
distinguish_types=False,
)
extended_coord = extended_coord.reshape(nframes, -1, 3)
model_predict_lower = call_lower(
Expand Down
4 changes: 3 additions & 1 deletion deepmd/pt/model/model/make_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ def forward_common(
atype,
self.get_rcut(),
self.get_sel(),
mixed_types=self.mixed_types(),
# types will be distinguished in the lower interface,
# so it doesn't need to be distinguished here
mixed_types=False,
box=bb,
)
model_predict_lower = self.forward_common_lower(
Expand Down

0 comments on commit b9f640b

Please sign in to comment.