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 19, 2024
1 parent b49d91d commit 46911c1
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 25 deletions.
12 changes: 6 additions & 6 deletions source/api_cc/tests/test_deeppot_dpa_pt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ class TestInferDeepPotDpaPt : public ::testing::Test {
3.51, 2.51, 2.60, 4.27, 3.22, 1.56};
std::vector<int> atype = {0, 0, 0, 0, 0, 0};
std::vector<VALUETYPE> box = {13., 0., 0., 0., 13., 0., 0., 0., 13.};
std::vector<VALUETYPE> expected_e = {
-92.764905689986, -186.094047026640, -186.076093742681, -92.655789598697,
-185.718629663486};
std::vector<VALUETYPE> expected_e = {-92.764905689986, -186.094047026640,
-186.076093742681, -92.655789598697,
-185.718629663486};
std::vector<VALUETYPE> expected_f = {
-6.014285454688, -0.117415862256, 0.909976406194, -0.058755844443,
-0.589966016072, -0.235278171532, 0.483870488636, 0.338301034169,
-6.014285454688, -0.117415862256, 0.909976406194, -0.058755844443,
-0.589966016072, -0.235278171532, 0.483870488636, 0.338301034169,
-0.538259022526, 5.229560416553};
std::vector<VALUETYPE> expected_v = {
-10.354386415497, 0.920140248533, 6.499718669934, -16.258335886103,
-10.354386415497, 0.920140248533, 6.499718669934, -16.258335886103,
0.067297469207, -0.575195264098, 4.392295016061, -0.338241970141,
-0.835516051852, -14.851643816437, 0.033098659297, -1.061263863927,
2.374008409869, -0.016149388418, 0.170055485103, 8.600268264426,
Expand Down
88 changes: 69 additions & 19 deletions source/lmp/tests/test_lammps_dpa_pt.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,26 @@
# this is as the same as python and c++ tests, test_deeppot_a.py
expected_ae = np.array(
[
-92.764905689986, -186.094047026640, -186.076093742681, -92.655789598697,
-185.718629663486
-92.764905689986,
-186.094047026640,
-186.076093742681,
-92.655789598697,
-185.718629663486,
]
)
expected_e = np.sum(expected_ae)
expected_f = np.array(
[
-6.014285454688, -0.117415862256, 0.909976406194, -0.058755844443,
-0.589966016072, -0.235278171532, 0.483870488636, 0.338301034169,
-0.538259022526, 5.229560416553
-6.014285454688,
-0.117415862256,
0.909976406194,
-0.058755844443,
-0.589966016072,
-0.235278171532,
0.483870488636,
0.338301034169,
-0.538259022526,
5.229560416553,
]
).reshape(6, 3)

Expand All @@ -59,20 +69,60 @@

expected_v = -np.array(
[
-10.354386415497, 0.920140248533, 6.499718669934, -16.258335886103,
0.067297469207, -0.575195264098, 4.392295016061, -0.338241970141,
-0.835516051852, -14.851643816437, 0.033098659297, -1.061263863927,
2.374008409869, -0.016149388418, 0.170055485103, 8.600268264426,
-0.027869254689, 0.691937433336, 6.169225730997, 0.244831791298,
0.034831047240, 12.137933736936, 0.115779703815, 0.522653171179,
-10.043154308105, -0.213524051977, -0.159862489647, 27.897569062860,
0.850893105913, -7.167280545513, 6.502654913608, 0.019020688297,
-0.452832699108, -8.392512895479, 0.032993026742, 0.099452385425,
4.585903488998, -0.087008504902, 0.195331013424, -4.461738874082,
-0.410332961015, 0.302227770306, 6.852403864252, 0.649592712208,
-0.468543024604, 5.650128346142, -0.619456389363, 1.329581340420,
1.047976610548, -0.169940826454, 0.360848206024, -1.578382279577,
0.224806207264, -0.471006970793
-10.354386415497,
0.920140248533,
6.499718669934,
-16.258335886103,
0.067297469207,
-0.575195264098,
4.392295016061,
-0.338241970141,
-0.835516051852,
-14.851643816437,
0.033098659297,
-1.061263863927,
2.374008409869,
-0.016149388418,
0.170055485103,
8.600268264426,
-0.027869254689,
0.691937433336,
6.169225730997,
0.244831791298,
0.034831047240,
12.137933736936,
0.115779703815,
0.522653171179,
-10.043154308105,
-0.213524051977,
-0.159862489647,
27.897569062860,
0.850893105913,
-7.167280545513,
6.502654913608,
0.019020688297,
-0.452832699108,
-8.392512895479,
0.032993026742,
0.099452385425,
4.585903488998,
-0.087008504902,
0.195331013424,
-4.461738874082,
-0.410332961015,
0.302227770306,
6.852403864252,
0.649592712208,
-0.468543024604,
5.650128346142,
-0.619456389363,
1.329581340420,
1.047976610548,
-0.169940826454,
0.360848206024,
-1.578382279577,
0.224806207264,
-0.471006970793,
]
).reshape(6, 9)
expected_v2 = -np.array(
Expand Down

0 comments on commit 46911c1

Please sign in to comment.