diff --git a/src/force/nep3.cu b/src/force/nep3.cu index fb3e8cc97..e013bf954 100644 --- a/src/force/nep3.cu +++ b/src/force/nep3.cu @@ -394,7 +394,6 @@ void NEP3::construct_table(float* parameters) parameters + (annmb.dim + 2) * annmb.num_neurons1 * (paramb.version == 4 ? paramb.num_types : 1) + 1; construct_table_radial_or_angular( - paramb.version, paramb.num_types, paramb.num_types_sq, paramb.n_max_radial, @@ -405,7 +404,6 @@ void NEP3::construct_table(float* parameters) gn_radial.data(), gnp_radial.data()); construct_table_radial_or_angular( - paramb.version, paramb.num_types, paramb.num_types_sq, paramb.n_max_angular, diff --git a/src/force/nep3_multigpu.cu b/src/force/nep3_multigpu.cu index 493f7238a..7ef00fcda 100644 --- a/src/force/nep3_multigpu.cu +++ b/src/force/nep3_multigpu.cu @@ -354,7 +354,6 @@ NEP3_MULTIGPU::NEP3_MULTIGPU( (paramb.version == 4 ? paramb.num_types : 1) + 1; construct_table_radial_or_angular( - paramb.version, paramb.num_types, paramb.num_types_sq, paramb.n_max_radial, @@ -365,7 +364,6 @@ NEP3_MULTIGPU::NEP3_MULTIGPU( gn_radial.data(), gnp_radial.data()); construct_table_radial_or_angular( - paramb.version, paramb.num_types, paramb.num_types_sq, paramb.n_max_angular, diff --git a/src/utilities/nep_utilities.cuh b/src/utilities/nep_utilities.cuh index 14debd31f..4b5d764fb 100644 --- a/src/utilities/nep_utilities.cuh +++ b/src/utilities/nep_utilities.cuh @@ -853,7 +853,6 @@ __device__ void find_index_and_weight( } static void construct_table_radial_or_angular( - const int version, const int num_types, const int num_types_sq, const int n_max, @@ -873,26 +872,17 @@ static void construct_table_radial_or_angular( int t12 = t1 * num_types + t2; float fn12[MAX_NUM_N]; float fnp12[MAX_NUM_N]; - if (version == 2) { - find_fn_and_fnp(n_max, rcinv, d12, fc12, fcp12, fn12, fnp12); - for (int n = 0; n <= n_max; ++n) { - int index_all = (table_index * num_types_sq + t12) * (n_max + 1) + n; - gn[index_all] = fn12[n] * ((num_types == 1) ? 1.0f : c[n * num_types_sq + t12]); - gnp[index_all] = fnp12[n] * ((num_types == 1) ? 1.0f : c[n * num_types_sq + t12]); - } - } else { - find_fn_and_fnp(basis_size, rcinv, d12, fc12, fcp12, fn12, fnp12); - for (int n = 0; n <= n_max; ++n) { - float gn12 = 0.0f; - float gnp12 = 0.0f; - for (int k = 0; k <= basis_size; ++k) { - gn12 += fn12[k] * c[(n * (basis_size + 1) + k) * num_types_sq + t12]; - gnp12 += fnp12[k] * c[(n * (basis_size + 1) + k) * num_types_sq + t12]; - } - int index_all = (table_index * num_types_sq + t12) * (n_max + 1) + n; - gn[index_all] = gn12; - gnp[index_all] = gnp12; + find_fn_and_fnp(basis_size, rcinv, d12, fc12, fcp12, fn12, fnp12); + for (int n = 0; n <= n_max; ++n) { + float gn12 = 0.0f; + float gnp12 = 0.0f; + for (int k = 0; k <= basis_size; ++k) { + gn12 += fn12[k] * c[(n * (basis_size + 1) + k) * num_types_sq + t12]; + gnp12 += fnp12[k] * c[(n * (basis_size + 1) + k) * num_types_sq + t12]; } + int index_all = (table_index * num_types_sq + t12) * (n_max + 1) + n; + gn[index_all] = gn12; + gnp[index_all] = gnp12; } } }