Support DPSpin for AtomicModel#3301
Merged
njzjz merged 69 commits intodeepmodeling:develfrom Mar 7, 2024
Merged
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## devel #3301 +/- ##
==========================================
+ Coverage 76.97% 77.04% +0.06%
==========================================
Files 423 394 -29
Lines 35950 31948 -4002
Branches 1620 909 -711
==========================================
- Hits 27674 24613 -3061
+ Misses 7408 6807 -601
+ Partials 868 528 -340 ☔ View full report in Codecov by Sentry. |
njzjz
reviewed
Feb 20, 2024
Signed-off-by: Duo <50307526+iProzd@users.noreply.github.com>
iProzd
commented
Feb 22, 2024
njzjz
reviewed
Feb 22, 2024
wanghan-iapcm
requested changes
Feb 23, 2024
| pref_e = self.limit_pref_e + (self.start_pref_e - self.limit_pref_e) * coef | ||
| pref_fr = self.limit_pref_fr + (self.start_pref_fr - self.limit_pref_fr) * coef | ||
| pref_fm = self.limit_pref_fm + (self.start_pref_fm - self.limit_pref_fm) * coef | ||
| pref_v = self.limit_pref_v + (self.start_pref_v - self.limit_pref_v) * coef |
Check notice
Code scanning / CodeQL
Unused local variable
njzjz
reviewed
Mar 6, 2024
Signed-off-by: Duo <50307526+iProzd@users.noreply.github.com>
for more information, see https://pre-commit.ci
|
|
||
| class SpinTest(unittest.TestCase): | ||
| def setUp(self): | ||
| type_map_1 = ["H", "O"] |
Check notice
Code scanning / CodeQL
Unused local variable
| self.use_spin_1 = [False, False] | ||
| self.virtual_scale_1 = [0.1, 0.1] | ||
|
|
||
| type_map_2 = ["B", "Ni", "O"] |
Check notice
Code scanning / CodeQL
Unused local variable
| self.use_spin_2 = [False, True, False] | ||
| self.virtual_scale_2 = [0.1, 0.1, 0.1] | ||
|
|
||
| type_map_3 = ["H", "O", "B", "Ni", "O"] |
Check notice
Code scanning / CodeQL
Unused local variable
wanghan-iapcm
approved these changes
Mar 7, 2024
Collaborator
|
LGTM |
njzjz
approved these changes
Mar 7, 2024
Closed
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.
This PR support DPSpin for AtomicModel:
Spinbase class to handle spin-related information.SpinModelimplementation in pt, which can generally take any backbone model, with input and output process for output likeenergy,dipoleand etc.SpinEnergyModelimplementation inherited fromSpinModelforenergycalclulation.Input improvement, now DPSpin model can take real
spinas input withvitual_scale, which can support much more flexible input. (Also with dataset support forspininput.)EnergySpinLossclass to processenergy,force_real,force_mag,virial.Add
protectionfor environment calculations.TODO:
forward_lowerforSpinModel.data_statwith generalexclude_typesfor descriptors and fittings.SpinModelmodels.Will fix in next PRs: