forked from deepmodeling/deepmd-kit
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: bugs in uts for polar and dipole fit (deepmodeling#3837)
Fix following trivial bugs in dipole and polar fit uts: 1. `box` was not used in `extend_input_and_build_neighbor_list` (which means they were all tested in nopbc mode, if shifted coord is outside the box (sometimes) and normalized explicitly, results are not the same.) Input for fitting also used extended_atype instead of atype. (Only same when nopbc.) 2. Using of `mixed_types` is disordered, mismatched with descriptor or sometimes with nlist. Now only use `mixed_types`==False since the descriptor output is not in mixed types. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Tests** - Improved consistency in parameter handling for various test methods. - Updated `mixed_types` parameter to dynamically use `self.dd0.mixed_types()` across multiple test functions for better flexibility and accuracy. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Han Wang <92130845+wanghan-iapcm@users.noreply.github.com> Co-authored-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
- Loading branch information
1 parent
3a7fbcf
commit 1c18950
Showing
2 changed files
with
61 additions
and
31 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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