Skip to content

Commit

Permalink
more check for Lmax
Browse files Browse the repository at this point in the history
  • Loading branch information
brucefan1983 committed Sep 12, 2024
1 parent 96377b1 commit 9876e5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/force/nep3.cu
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ static __global__ void find_partial_force_angular(
g_gn_angular[index_left_all] * weight_left + g_gn_angular[index_right_all] * weight_right;
float gnp12 = g_gnp_angular[index_left_all] * weight_left +
g_gnp_angular[index_right_all] * weight_right;
accumulate_f12(paramb.L_max, paramb.num_L, n, paramb.n_max_angular + 1, d12, r12, gn12, gnp12, Fp, sum_fxyz, f12);
accumulate_f12(paramb.L_max, paramb.num_L, n, paramb.n_max_angular + 1, d12, r12, gn12, gnp12, Fp, sum_fxyz, f12);
}
#else
float fc12, fcp12;
Expand Down
3 changes: 3 additions & 0 deletions src/main_nep/parameters.cu
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,9 @@ void Parameters::parse_l_max(const char** param, int num_param)
if (!is_valid_int(param[1], &L_max)) {
PRINT_INPUT_ERROR("l_max for 3-body descriptors should be an integer.\n");
}
if (L_max < 0) {
PRINT_INPUT_ERROR("l_max for 3-body descriptors should >= 0.");
}
if (L_max > 4) {
PRINT_INPUT_ERROR("l_max for 3-body descriptors should <= 4.");
}
Expand Down

0 comments on commit 9876e5d

Please sign in to comment.