bug_fix | read "nelm" | compatible with vasp6 format change#239
Conversation
Merge recent development on devel into master
Merge bug fixings to master
merge bug fixings to master
VASP6 writes NELMIN(minimum number of electronic steps) ahead of NELM(max num), dpdata reads the first line contains "NEIM", then will take the value of NELMIN as that of NELM, inducing "false" in scf_convergence_check this revise includes this such cases by request a stronger check that the line should not be initiated by "NELMIN" or "NELMDL"
| elif 'NELM' in ii and nelm == None: | ||
| #find the line contains NELM but not initiated by other vasp_keys like NELMIN and NELMDL ... | ||
| #...format adjustmnet in vasp 6 request this check ; compatible with the older version | ||
| elif 'NELM' in ii and nelm == None and (ii.split()[0] != "NELMIN") and (ii.split()[0] != "NELMDL"): |
There was a problem hiding this comment.
I would suggest to use "NELM =" in ii, to prevent other lines with NELM appears before NELM = in future versions
There was a problem hiding this comment.
the number of spaces between "NELM" and "=" might not be safe (currently maybe 2 or 3 not sure)
revise into a stricter check
expecting the following format :
"anywhere_in_the_line"+"NELM"+"any_number_of_spaces"+"="+"value(data-type-check_omitted_don't-believe-it's-needed-here)"+"whatever_else"
There was a problem hiding this comment.
You may need to use regular expression.
There was a problem hiding this comment.
You may need to use regular expression.
support
There was a problem hiding this comment.
You may need to use regular expression.
@njzjz Could you please suggest the change with regex ?
adding a stricter check for whether the line is actually assigning value for "NELM". expecting the assignment follows the format : ``` "anywhere_in_the_line"+"NELM"+"any_number_of_spaces"+"="+"value(data-type-check_omitted_don't-believe-it's-needed-here)"+"whatever_else" ```
Codecov Report
@@ Coverage Diff @@
## devel #239 +/- ##
==========================================
- Coverage 82.04% 81.99% -0.05%
==========================================
Files 58 59 +1
Lines 5034 5121 +87
==========================================
+ Hits 4130 4199 +69
- Misses 904 922 +18
Continue to review full report at Codecov.
|
Co-authored-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Co-authored-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
|
Not sure whether the regular expression here violates the consistence in the coding style or standard, if there was supposed to be one. version_match error for numpy @ check of "Python package workflow run": |
I do not understand why it is introduce. @njzjz any idea? |
Numpy 1.20 drops support for Python 3.6. It's unclear to me which package needs numpy>=1.20.1, maybe pymatgen? |
Our UT uses pymatgen versions 2019.1.13, 2019.7.30, so the restriction should not be introduced by them |
I don't see any version constraint? dpdata/.github/workflows/test.yml Line 26 in 3edbc24 I think what you mean is dpgen |
You are right I took |
VASP6 writes NELMIN(minimum number of electronic steps) ahead of NELM(max num),
dpdata reads the first line contains "NEIM", then will take the value of NELMIN as that of NELM, inducing "false" in scf_convergence_check
this revise includes this such cases by request a stronger check that the line should not be initiated by "NELMIN" or "NELMDL".