Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix typewise bug #736

Merged
merged 1 commit into from
Sep 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/main_nep/dataset.cu
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ static __global__ void gpu_find_neighbor_number(
const int* Na,
const int* Na_sum,
const bool use_typewise_cutoff,
const float typewise_cutoff_radial_factor,
const float typewise_cutoff_angular_factor,
const int* g_type,
const int* g_atomic_numbers,
const float g_rc_radial,
Expand Down Expand Up @@ -237,8 +239,8 @@ static __global__ void gpu_find_neighbor_number(
if (use_typewise_cutoff) {
int z1 = g_atomic_numbers[t1];
int z2 = g_atomic_numbers[t2];
rc_radial = min((COVALENT_RADIUS[z1] + COVALENT_RADIUS[z2]) * 2.5f, rc_radial);
rc_angular = min((COVALENT_RADIUS[z1] + COVALENT_RADIUS[z2]) * 2.0f, rc_angular);
rc_radial = min((COVALENT_RADIUS[z1] + COVALENT_RADIUS[z2]) * typewise_cutoff_radial_factor, rc_radial);
rc_angular = min((COVALENT_RADIUS[z1] + COVALENT_RADIUS[z2]) * typewise_cutoff_angular_factor, rc_angular);
}
if (distance_square < rc_radial * rc_radial) {
count_radial++;
Expand Down Expand Up @@ -274,6 +276,8 @@ void Dataset::find_neighbor(Parameters& para)
Na.data(),
Na_sum.data(),
para.use_typewise_cutoff,
para.typewise_cutoff_radial_factor,
para.typewise_cutoff_angular_factor,
type.data(),
atomic_numbers.data(),
para.rc_radial,
Expand Down
Loading