Skip to content

Comments

Enable CUDA usage of vesin in MetatomicCalculator#157

Open
frostedoyster wants to merge 3 commits intomainfrom
vesin-metatomic
Open

Enable CUDA usage of vesin in MetatomicCalculator#157
frostedoyster wants to merge 3 commits intomainfrom
vesin-metatomic

Conversation

@frostedoyster
Copy link
Contributor

@frostedoyster frostedoyster commented Feb 13, 2026

This should also enable the new CUDA neighbor lists from vesin

Contributor (creator of pull-request) checklist

  • Tests updated (for new features and bugfixes)?
  • Documentation updated (for new features)?
  • Issue referenced (for PRs that solve an issue)?

Reviewer checklist

  • CHANGELOG updated with public API or any other important changes?

⚙️ Download Python wheels for this pull-request (you can install these with pip)

📚 Download documentation for this pull-request

@frostedoyster frostedoyster requested a review from Luthaf February 13, 2026 16:18
@frostedoyster frostedoyster changed the title Use vesin-metatomic interface in ASECalculator Use vesin-metatomic interface in MetatomicCalculator Feb 13, 2026
# convert from ase.Atoms to metatomic.torch.System
system = System(types, positions, cell, pbc)
for options in self._model.requested_neighbor_lists():
neighbors = _compute_ase_neighbors(
Copy link
Member

Choose a reason for hiding this comment

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

Can you remove the code for _compute_ase_neighbors?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My bad, should be done now. For now, I'm calling it with [system] as an argument within the loop (same as the old code) but we could also call it when all systems are created (and therefore using systems as the argument)

Copy link
Member

Choose a reason for hiding this comment

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

If you want to also include this change, it works for me!

@frostedoyster frostedoyster requested a review from Luthaf February 13, 2026 16:51
@Luthaf
Copy link
Member

Luthaf commented Feb 16, 2026

Could you do the bump to torch 2.3 in a separate PR?

@Luthaf Luthaf force-pushed the vesin-metatomic branch 3 times, most recently from fdf2aa0 to b11ad93 Compare February 20, 2026 09:04
This will allow to compute neighbor lists on CUDA directly
@frostedoyster frostedoyster changed the title Use vesin-metatomic interface in MetatomicCalculator Enable CUDA usage of vesin in MetatomicCalculator Feb 20, 2026
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