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

ChemEnvSiteFingerprint.from_preset() removal of not-implemented CEs #948

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

kaueltzen
Copy link
Contributor

@kaueltzen kaueltzen commented Sep 30, 2024

Summary

Resolves #945.

  • Solution 2 was implemented (removal of 5 CEs that are not implemented in the LocalGeometryFinder)
  • Two tests that would have failed previously were added:
    • Creation of ChemEnvSiteFingerprint for Ni3Al for a site with CN=12 that would have failed due to non-implemented S:12 CE
    • A test that asserts that all CE types of ChemEnvSiteFingerprint.from_preset() are implemented geometries in the LocalGeometryFinder. This should ensure that future changes in the preset ce_types or in pymatgen (although probably no "deactivation" of existing CEs) will be detected by the failing test, if problematic.

Tagging @ml-evs for review (thank you!)

Tagging @davidwaroquiers in case you have something to add on issue #945 or this PR (e.g., is the deactivate attribute of CEs in ChemEnv going to be changed in future pymatgen versions?).

@ml-evs ml-evs self-requested a review October 2, 2024 18:18
@ml-evs
Copy link
Collaborator

ml-evs commented Oct 2, 2024

Thanks for this @kaueltzen, as a start, could you fix the linting errors please? You can do this locally with pre-commit (I note that this repo does not have useful instructions for it...):

# from your matminer virtualenv
pip install pre-commit
pre-commit install
pre-commit run --all-files

Copy link
Collaborator

@ml-evs ml-evs left a comment

Choose a reason for hiding this comment

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

As I mentioned, I don't know enough about chemenv or this part of the code to give a proper review, but I can at least confirm that the test you added fails without your changes, and if this fixes a problem for you and @JaGeo then lets merge!

Thanks @kaueltzen!

@ml-evs ml-evs merged commit dcbaf06 into hackingmaterials:main Oct 11, 2024
3 of 4 checks passed
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.

ChemEnvSiteFingerprint.from_preset() bug for coordination environments with deactivate=True or points=None
2 participants