Skip to content

Commit fd6fa77

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent ecfb7a8 commit fd6fa77

3 files changed

Lines changed: 8 additions & 9 deletions

File tree

source/api_cc/src/DeepSpinPTExpt.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -932,10 +932,9 @@ void DeepSpinPTExpt::compute(ENERGYVTYPE& ener,
932932
// Model-level pair exclusion belongs to the graph BUILD (decision #18/A4),
933933
// exactly as on the non-spin route: the exported lower consumes a
934934
// pre-excluded edge_mask and never re-applies it.
935-
graph_pack.edge_mask =
936-
deepmd::applyPairExclusion(edge_tensors.edge_index,
937-
edge_tensors.edge_mask, node_atype,
938-
pair_exclude_table_, ntypes);
935+
graph_pack.edge_mask = deepmd::applyPairExclusion(
936+
edge_tensors.edge_index, edge_tensors.edge_mask, node_atype,
937+
pair_exclude_table_, ntypes);
939938
canonicalizeGraphPayload(graph_pack, nloc);
940939
flat_outputs = run_model_graph(
941940
node_atype, n_node_tensor, n_node_tensor, graph_pack.edge_index,

source/api_cc/tests/test_deepspin_dpa4_pairexcl_ptexpt.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ TYPED_TEST(TestInferDeepSpinDpa4PairExclPtExpt, cpu_lmp_nlist) {
188188
// model-level exclusion, so equal predictions would mean the exclusion never
189189
// reached the graph build and both comparisons above would pass for the wrong
190190
// reason.
191-
TYPED_TEST(TestInferDeepSpinDpa4PairExclPtExpt, excluded_differs_from_baseline) {
191+
TYPED_TEST(TestInferDeepSpinDpa4PairExclPtExpt,
192+
excluded_differs_from_baseline) {
192193
using VALUETYPE = TypeParam;
193194
const std::vector<VALUETYPE>& coord = this->coord;
194195
const std::vector<VALUETYPE>& spin = this->spin;
@@ -209,7 +210,8 @@ TYPED_TEST(TestInferDeepSpinDpa4PairExclPtExpt, excluded_differs_from_baseline)
209210
"the exclusion seam is vacuous";
210211
double max_df = 0.;
211212
for (int ii = 0; ii < natoms * 3; ++ii) {
212-
max_df = std::max(max_df, static_cast<double>(fabs(f_excl[ii] - f_base[ii])));
213+
max_df =
214+
std::max(max_df, static_cast<double>(fabs(f_excl[ii] - f_base[ii])));
213215
}
214216
EXPECT_GT(max_df, 1e-6)
215217
<< "excluding every Ni-O pair left the forces unchanged";

source/tests/pt_expt/model/test_dpa4_native_spin.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,9 +1249,7 @@ def _generic_model(pair_exclude_types: list | None, jitter_seed: int = 11):
12491249
``descriptor.exclude_types`` empty; the DPA4 alias would mirror the
12501250
pairs into it (see ``test_dpa4_alias_mirrors_into_descriptor``).
12511251
"""
1252-
from deepmd.dpmodel.model.model import (
1253-
get_model as dp_get_model,
1254-
)
1252+
from deepmd.dpmodel.model.model import get_model as dp_get_model
12551253
from deepmd.pt_expt.model.model import (
12561254
BaseModel,
12571255
)

0 commit comments

Comments
 (0)