support the DOS (electronic density of states) fitting#2449
support the DOS (electronic density of states) fitting#2449wanghan-iapcm merged 46 commits intodeepmodeling:develfrom
Conversation
This reverts commit e3917fc.
add definition for make_compute_fparam & make_ttm_fparam
now we can use `compute temp` or `fix ttm` to update the fparam each MD step
now we can use `compute temp` or `fix ttm` to update the fparam each MD step
…. function name `make_compute_fparam` is changed to `make_fparam_from_compute`
support fitting electronic density of states (DOS)
add `dos` type
add example and basic doc to hands on the deepdos fitting
for more information, see https://pre-commit.ci
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## devel #2449 +/- ##
==========================================
- Coverage 75.19% 74.37% -0.83%
==========================================
Files 223 227 +4
Lines 22691 23378 +687
Branches 1673 1673
==========================================
+ Hits 17063 17387 +324
- Misses 4535 4895 +360
- Partials 1093 1096 +3
... and 3 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
|
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
wanghan-iapcm
left a comment
There was a problem hiding this comment.
- Please add UTs for your contributions. Thanks!
- The data in the example are for the demonstrative purposes. Currently they are too large (~600KB) to be included in the source code. Please reduce the size of the data.
|
thank you for the advice, i will revise the code. Also, i will add unit tests |
remove `ener_min` and `ener_max`, and improve some code
test inference of dos for single frame
for more information, see https://pre-commit.ci
check the output shape and value of `dos` and `atom_dos`
for more information, see https://pre-commit.ci
if atomic is True, the output of `dos` should be the sum of `atom_dos`
for more information, see https://pre-commit.ci
Please note that only 27.76% of the new codes have been tested. |
fix output bug in \fit\dos.py, and add unit test for `DOSFitting`
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
njzjz
left a comment
There was a problem hiding this comment.
@wanghan-iapcm is it ok to merge? Indeed there are still some codes that are not covered.
sry i did not notice your comment. |
here i present the implementation of DeepDOS model [Phys. Rev. B 105, 174109 (2022)] in dpkit-devel branch
generally, i add a new
fitting_type = 'dos'to allow the DP to fit a vector. this vector can be global (dos.raw/npy) or atomic (atom_dos.raw/npy), whose length isnumb_dos.specifically,
fit/dos.py,loss/dos.py,model/dos.pyandinfer/deep_dos.pyis created to allow fitting and inference*/__init__.py,train/trainer.py,utils/argcheck.pyis updatedentrypoint/freeze.py,entrypoint/test.py, relevant functions are added to freeze and test the DeepDOS modeldoc/model/train-fitting-dos.mdexamples/dos/, the input script is provided in theexamples/dos/train/input.json, data sets are provided in theexamples/dos/data/