Skip to content

Conversation

@j-c-c
Copy link
Collaborator

@j-c-c j-c-c commented May 15, 2024

There was a small bug in part of the J-sync algorithm used for Cn symmetric molecules. In particular, there was an error in this line

new_vec[ik] += s_ij_jk * vec[ij] + s_ik_jk * vec[jk]

where the first term should be s_ij_ik. The existing test did not catch this bug as the algorithm was still producing correct results since this one term was part of a larger accumulation of terms of which we only take the sign.

To expose the bug in the new test we use a problem size of n=3, the smallest size for the algorithm to run since it loops over triplets of images. In this case the test fails with the bug still in place.

@j-c-c j-c-c added the bug Something isn't working label May 15, 2024
@j-c-c j-c-c self-assigned this May 15, 2024
Copy link
Collaborator

@garrettwrong garrettwrong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thank you for putting this together.

@j-c-c j-c-c marked this pull request as ready for review May 16, 2024 12:23
@j-c-c j-c-c requested a review from janden as a code owner May 16, 2024 12:23
Copy link
Collaborator

@janden janden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@j-c-c j-c-c merged commit 9559338 into develop May 16, 2024
@j-c-c j-c-c deleted the J_sync_test branch May 16, 2024 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants