Skip to content
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

Adaptive trust levels #495

Merged
merged 4 commits into from
Aug 11, 2021
Merged

Conversation

amcadmus
Copy link
Member

@amcadmus amcadmus commented Aug 11, 2021

Adaptively determines lower trust levels. In the input file one set the following keys to enable the adaptive trust levels.

    "model_devi_adapt_trust_lo":true,
    "model_devi_numb_candi_f":	50,
    "model_devi_numb_candi_v":	50,
    "model_devi_perc_candi_f":	5,
    "model_devi_perc_candi_v":	5,

Note that with model_devi_adapt_trust_lo == true the model_devi_f_trust_lo and model_devi_v_trust_lo will be ignored.

For each system, the dpgen makes two sets:

  1. From the frames with force model deviation lower than model_devi_f_trust_hi, select max(model_devi_numb_candi_f, model_devi_perc_candi_f*n_frames) frames with largest force model deviation.
  2. From the frames with virial model deviation lower than model_devi_v_trust_hi, select max(model_devi_numb_candi_v, model_devi_perc_candi_v*n_frames) frames with largest virial model deviation.

and then unite the two sets as the candidate set. The lowest model deviations of the candidate set are treated as lower trust levels.

The adapted lower trust levels are printed so the convergence of dpgen can be checked as the change of lower levels in iterations.

@amcadmus amcadmus requested a review from njzjz August 11, 2021 00:53
@codecov-commenter
Copy link

codecov-commenter commented Aug 11, 2021

Codecov Report

Merging #495 (2e0c5f0) into devel (9108224) will decrease coverage by 0.09%.
The diff coverage is 34.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##            devel     #495      +/-   ##
==========================================
- Coverage   33.00%   32.91%   -0.10%     
==========================================
  Files          86       86              
  Lines       14567    14629      +62     
==========================================
+ Hits         4808     4815       +7     
- Misses       9759     9814      +55     
Impacted Files Coverage Δ
dpgen/generator/run.py 66.49% <34.25%> (-1.65%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9108224...2e0c5f0. Read the comment docs.

@amcadmus amcadmus merged commit 11ce228 into deepmodeling:devel Aug 11, 2021
@amcadmus amcadmus deleted the adaptive-trust-levels branch August 11, 2021 13:09
Cloudac7 pushed a commit to Cloudac7/dpgen that referenced this pull request Dec 1, 2021
* support adaptive trust level

* update README

* fix bugs in readme

* adaptive lower trust level support percentage of total number of frames

Co-authored-by: Han Wang <wang_han@iapcm.ac.cn>
fp_rest_failed.append([tt, cc, jj])
counter['failed'] += len(idx_rest_failed)

return fp_rest_accurate, fp_candidate, fp_rest_failed, counter
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fp_rest_accurate and fp_rest_failed are unbounded when detailed_report_make_fp is False

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expected to be []s ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any value is fine as they are not used anywhere else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants