Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't distinguish nlist types in high model interfaces #4386

Merged
merged 2 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading