Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 10, 2024
1 parent 774f2ce commit 2aff780
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion deepmd/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def add_data_requirement(
# standardize key
if "atomic_" in key:
key = key.replace("atomic_", "atom_")

Check warning on line 128 in deepmd/common.py

View check run for this annotation

Codecov / codecov/patch

deepmd/common.py#L127-L128

Added lines #L127 - L128 were not covered by tests

data_requirement[key] = {
"ndof": ndof,
"atomic": atomic,
Expand Down
2 changes: 1 addition & 1 deletion deepmd/utils/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def add(
# standardize key
if "atomic_" in key:
key = key.replace("atomic_", "atom_")

Check warning on line 182 in deepmd/utils/data.py

View check run for this annotation

Codecov / codecov/patch

deepmd/utils/data.py#L181-L182

Added lines #L181 - L182 were not covered by tests

self.data_dict[key] = {
"ndof": ndof,
"atomic": atomic,
Expand Down
6 changes: 3 additions & 3 deletions source/tests/pt/model/test_polar_stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def test_atomic_consistency(self):

def test_global_consistency(self):
self.sampled[0]["find_atom_polarizability"] = -1
self.sampled[0]["polarizability"] = self.sampled[0][
"atom_polarizability"
].sum(dim=1)
self.sampled[0]["polarizability"] = self.sampled[0]["atom_polarizability"].sum(
dim=1
)
self.all_stat["find_atom_polarizability"] = [-1]
self.all_stat["polarizability"] = [
self.all_stat["atom_polarizability"][0].sum(axis=1)
Expand Down

0 comments on commit 2aff780

Please sign in to comment.