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

Ase calculator #2

Merged
merged 11 commits into from
Jul 26, 2024
Merged

Ase calculator #2

merged 11 commits into from
Jul 26, 2024

Conversation

bananenpampe
Copy link
Collaborator

Adds the first very basic functionality to ShiftML: a chemical shielding ase calculator.
The calculator automatically downloads an exported metatensor model from a zenodo archive and caches it locally.
tests. Explanations are added to the README.

@bananenpampe bananenpampe requested a review from Luthaf July 19, 2024 14:34
@bananenpampe
Copy link
Collaborator Author

Also fixes CI in here

Copy link
Contributor

@Luthaf Luthaf left a comment

Choose a reason for hiding this comment

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

This looks very good! There are a couple of ways you could integrate better with existing module for logging/cache directory management/... but the code is fine and should work fine!

README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
Comment on lines +8 to +9
"ShiftML1.0": "https://tinyurl.com/3xwec68f",
"ShiftML1.1": "https://tinyurl.com/53ymkhvd",
Copy link
Contributor

Choose a reason for hiding this comment

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

so you re-created the exact previous models using the new infrastructure? Should these have a different version (like ShiftML1.0+metatensor) just for clarity or are you sure this will produce the same outputs?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will discuss this with everyone involved - but in principle I agree, that there should be a ShiftML1.0rev or something that makes it clear.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will open an issue to remind me of that.

src/shiftml/ase/calculator.py Outdated Show resolved Hide resolved
"""Regression test for the ShiftML1.0 model."""

frame = bulk("C", "diamond", a=3.566)
model = ShiftML("ShiftML1.0", force_download=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

why force_download=True?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was to make sure that the local tests do not resuse a local potentially old cached file.

tests/test_ase.py Outdated Show resolved Hide resolved
src/shiftml/ase/calculator.py Show resolved Hide resolved
src/shiftml/ase/calculator.py Outdated Show resolved Hide resolved
src/shiftml/ase/calculator.py Outdated Show resolved Hide resolved
-uses logging class
-uses platformdirs for cache path resolution
-asserts correct rascaline.torch version
-checks for correct rascaline.torch
-model files named after model version
-tests for correct assertion in invalid species test
@bananenpampe bananenpampe merged commit aa6dc91 into main Jul 26, 2024
4 checks passed
@bananenpampe bananenpampe deleted the ase-calculator branch July 26, 2024 10:17
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