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

Update commensurability warning #37

Merged
merged 6 commits into from
Oct 27, 2023
Merged

Conversation

kavanase
Copy link
Member

As discussed @zhubonan;

I think the check for the commensurability of the primitive and supercell in easyunfold is too strict. For instance, if one is doing easyunfold calculations for a SQS supercell which has been relaxed, and so has slightly different cell parameters, then this will print a warning saying the primitive and supercell are not commensurate which can be confusing for users. I know if the volumes are very different then this could impact the quantitative accuracy of the Brillouin Zone spacing, but I think this is likely a relatively minor effect in most use cases and we should have a certain tolerance for this (greater than the np.allclose default of 0.001%). Example of what I mean here:

image (21)

A relative tolerance of a couple percent should be fine? You likely know more about at what level of mismatch this would become significant enough to warn the user. Could have a two-level warning where if the match is close but not very good, it warns saying there will be some quantitative innaccuracies, or if very large mismatch then more severe warning

Copy link
Contributor

@zhubonan zhubonan left a comment

Choose a reason for hiding this comment

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

Good to go! Thanks

easyunfold/cli.py Show resolved Hide resolved
@kavanase kavanase merged commit bb6fb44 into main Oct 27, 2023
4 of 10 checks passed
@kavanase kavanase deleted the pr-commensurability-handling branch October 27, 2023 15:13
@zhubonan
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants