Skip to content

Commit

Permalink
chore:use forward_common_atomic
Browse files Browse the repository at this point in the history
  • Loading branch information
anyangml committed Apr 7, 2024
1 parent 89fe042 commit 90b8d56
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions deepmd/pt/model/atomic_model/linear_atomic_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,19 +190,16 @@ def forward_atomic(

for i, model in enumerate(self.models):
mapping = self.mapping_list[i]
raw_ret = model.forward_atomic(
# apply bias to each individual model
ener_list.append(
model.forward_common_atomic(
extended_coord,
mapping[extended_atype],
nlists_[i],
mapping,
fparam,
aparam,
)
# apply bias to each individual model
ener_list.append(
model.apply_out_stat(raw_ret, mapping[extended_atype][:, :nloc])[
"energy"
]
)["energy"]
)
weights = self._compute_weight(extended_coord, extended_atype, nlists_)

Expand Down

0 comments on commit 90b8d56

Please sign in to comment.