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

bug in is_isomorphous cell comparison #277

Closed
tjlane opened this issue Nov 4, 2024 · 3 comments
Closed

bug in is_isomorphous cell comparison #277

tjlane opened this issue Nov 4, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@tjlane
Copy link
Collaborator

tjlane commented Nov 4, 2024

The method documentation says:

cell_threshold : float
Acceptable percent difference between unit cell parameters

But the code looks for an absolute change:

if (np.abs((param1 - param2)) / 100.0) > cell_threshold:

By default this will return False if the cells differ by more than 5 Å or 5 degrees in any case.

I'd suggest we change this to make it relative, as the documentation indicates.

@kmdalton kmdalton added the bug Something isn't working label Nov 4, 2024
@kmdalton kmdalton self-assigned this Nov 4, 2024
@kmdalton
Copy link
Member

kmdalton commented Nov 4, 2024

Can confirm. This is a bug. I like your proposal.

@kmdalton
Copy link
Member

kmdalton commented Nov 4, 2024

what's a reasonable default for the cell_threshold? i think 0.5% is in the right ballpark. @tjlane

@kmdalton
Copy link
Member

kmdalton commented Nov 4, 2024

fixed in #279

@kmdalton kmdalton closed this as completed Nov 4, 2024
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

No branches or pull requests

2 participants