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

Split torch.Tensor and metatensor bindings #4

Merged
merged 10 commits into from
Dec 6, 2023
Merged

Conversation

PicoCentauri
Copy link
Contributor

@PicoCentauri PicoCentauri commented Dec 4, 2023

As we discussed the last time: I split the MeshPotential into one class that returns a list of torch Tensors and now lives in calculators. Also there is another one (with the same name) that lives in metatensor. Let me know is you agree on this structure?

I also refactored the docs a bit and moved the FourierSpaceConvolution and MeshInterpolator and System class into a lib folder.

TODOs

  • Add tests for Tensors calculator
  • Add Madelung example for Tensors calculator

Copy link
Contributor

@kvhuguenin kvhuguenin left a comment

Choose a reason for hiding this comment

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

I liked most of the changes. Since meshlode.lib.System is (for now) one of the user-facing functions, I have now tried to homogenize the UI a little by importing directly from meshlode import System. Apart from one potential bug that I comment on below, the code looks fine to me.

Copy link
Contributor

Choose a reason for hiding this comment

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

When I run this file, I see that the sign of the obtained energies is different for the torch and metatensor versions. This should probably be consistent.

@PicoCentauri PicoCentauri force-pushed the metatensor branch 2 times, most recently from e75bc19 to 3b7ed81 Compare December 6, 2023 08:22
@PicoCentauri PicoCentauri merged commit 49e9497 into main Dec 6, 2023
4 checks passed
@PicoCentauri PicoCentauri deleted the metatensor branch December 8, 2023 07:27
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