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

Add ASE tutorial #43

Merged
merged 66 commits into from
Feb 2, 2024
Merged

Add ASE tutorial #43

merged 66 commits into from
Feb 2, 2024

Conversation

frostedoyster
Copy link
Collaborator

@frostedoyster frostedoyster commented Jan 26, 2024

This PR adds a tutorial for MD in ASE using the SOAP-BPNN


📚 Documentation preview 📚: https://metatensor-models--43.org.readthedocs.build/en/43/

Copy link
Contributor

@PicoCentauri PicoCentauri left a comment

Choose a reason for hiding this comment

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

I think we can stick here to the standard sphinx-gallery config an don't have to overwrite functions for now.

tox.ini Outdated
@@ -87,6 +87,7 @@ deps =
allowlist_externals =
bash
commands =
python docs/src/gallery.py examples/ase
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need this line? Shouldn't the documentation including the gallery build by sphinx?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, correct. The gallery is now building automatically

scripts/setup.py Outdated
Comment on lines 35 to 48
# At the moment, unit handling is incorrect in metatensor.torch.atomistic
# This will fix it:
with open(file, "r") as f:
lines = f.readlines()
for i, line in enumerate(lines):
if "return self._conversions[to_unit] / self._conversions[from_unit]" in line:
lines[i] = line.replace(
"return self._conversions[to_unit] / self._conversions[from_unit]",
"return self._conversions[from_unit] / self._conversions[to_unit]"
)
break

with open(file, "w") as f:
f.writelines(lines)
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we hacking metatensor while installing metatensor models?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, the user has to run this, but it's documented (see export PR)

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know if we really need the custom rewrite that we do in metatensor here as well. I think the standard config should be enough for us?

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 have no clue but I don't have the time to find out

@PicoCentauri
Copy link
Contributor

@frostedoyster I went through the tutorial and made adjustments and added an RDF comparison. Please read it through and make corrections if you like. After your read through and you are happy and have no questions you can rebase and merge.

Base automatically changed from export to main February 2, 2024 12:55
@PicoCentauri PicoCentauri merged commit df96bb0 into main Feb 2, 2024
8 checks passed
@PicoCentauri PicoCentauri deleted the ase-tutorial branch February 2, 2024 15:42
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