-
Notifications
You must be signed in to change notification settings - Fork 525
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
feat: directional nlist #4052
feat: directional nlist #4052
Conversation
WalkthroughWalkthroughThe recent updates significantly enhance neighbor list generation in the codebase. The Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant NeighborList
participant Helper
User->>NeighborList: Call build_neighbor_list()
NeighborList->>Helper: Call _trim_mask_distinguish_nlist()
Helper-->>NeighborList: Return trimmed neighbor list
NeighborList-->>User: Return neighbor list
User->>NeighborList: Call build_directional_neighbor_list()
NeighborList-->>User: Return directional neighbor list
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (1)
Additional comments not posted (2)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## devel #4052 +/- ##
=======================================
Coverage 82.94% 82.95%
=======================================
Files 522 522
Lines 51021 51044 +23
Branches 3028 3028
=======================================
+ Hits 42319 42342 +23
+ Misses 7758 7756 -2
- Partials 944 946 +2 ☔ View full report in Codecov by Sentry. |
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Han Wang <92130845+wanghan-iapcm@users.noreply.github.com>
crashed env on my local computer, the UTs will be fixed later on |
Co-authored-by: Duo <50307526+iProzd@users.noreply.github.com> Signed-off-by: Han Wang <92130845+wanghan-iapcm@users.noreply.github.com>
What is the purpose of introducing a different neighbor list? |
For the development of charge density models. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (1)
deepmd/pt/utils/nlist.py (1)
183-228
: Correct parameter names in the docstring.The parameter names in the docstring do not match the function signature. Update them for clarity and accuracy.
- coord_central : torch.Tensor + coord_cntl : torch.Tensor - atype_central : torch.Tensor + atype_cntl : torch.Tensor - coord_neighbor : torch.Tensor + coord_neig : torch.Tensor - atype_central : torch.Tensor + atype_neig : torch.Tensor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (1)
deepmd/pt/utils/nlist.py (1)
195-205
: Correct parameter names in the docstring.The parameter names in the docstring do not match the function signature. Ensure that the names are consistent to avoid confusion.
- coord_central : torch.Tensor + coord_cntl : torch.Tensor - atype_central : torch.Tensor + atype_cntl : torch.Tensor - coord_neighbor : torch.Tensor + coord_neig : torch.Tensor - atype_central : torch.Tensor + atype_neig : torch.Tensor
this pr implement the directional nlist, with which the central and neighboring atoms are treated as different atoms. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new function for building a directional neighbor list, enhancing detailed neighbor analysis. - **Bug Fixes** - Improved handling of neighbor lists, ensuring proper management of virtual atoms and accurate sizing. - **Tests** - Added new tests for the directional neighbor list functionality and modified existing tests to cover additional scenarios. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Han Wang <92130845+wanghan-iapcm@users.noreply.github.com> Co-authored-by: Han Wang <wang_han@iapcm.ac.cn> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Duo <50307526+iProzd@users.noreply.github.com>
this pr implement the directional nlist, with which the central and neighboring atoms are treated as different atoms.
Summary by CodeRabbit