Merged
Conversation
…ystem_indices directly which does not work since we operate on the pre-determined set of interacting pairs (and their distances), not the atoms directly. Also, preliminary implementation of zbl as a postprocessing option.
Codecov ReportAttention: Patch coverage is
🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
modelforge/potential/processing.py:711
- Creating radius_i (and similarly radius_j) via torch.tensor from a list comprehension might cause a device mismatch when the input data is on a GPU. Consider constructing these tensors using methods that preserve the device and datatype from the input data.
radius_i = torch.tensor([
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…potential # Conflicts: # modelforge/potential/processing.py
Contributor
There was a problem hiding this comment.
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
modelforge/potential/processing.py:713
- Consider specifying the device for the radii tensor (e.g., device=atomic_numbers.device) to avoid potential device mismatch errors when running on GPU.
radius_i = torch.tensor([self.radii[int(n)] for n in atomic_number_i], dtype=torch.float32)
Contributor
There was a problem hiding this comment.
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
modelforge/potential/potential.py:191
- The registration key 'zbl_potential' is used while the ZBLPotential.forward method returns its output under the key 'zbl_energy'. Consider aligning these names for consistency in the API.
if "zbl_potential" in properties_to_process:
MarshallYan
approved these changes
Apr 8, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Summary
This adds the ZBL potential has a post processing operation. This is implemented similar to the electrostatics, in that it will appear in the output of the potential as a separate key "zbl_energy"; summing this with the per_system_energy will therefore prevent significant overlap of particles during a simulation.
Note this also fixes bugs in the Coulombic potential and adds tests for it.
Key changes
Notable points that this PR has either accomplished or will accomplish.
Note, to better implement the Coulombic interactions, I need to reimplement the multiple cutoff neighbor lists; that will be better in a separate PR to keep this focused.
Associated Issue(s)
Pull Request Checklist