Skip to content

bug_fix | read "nelm" | compatible with vasp6 format change#239

Merged
wanghan-iapcm merged 9 commits into
deepmodeling:develfrom
Vibsteamer:patch-3
Feb 10, 2022
Merged

bug_fix | read "nelm" | compatible with vasp6 format change#239
wanghan-iapcm merged 9 commits into
deepmodeling:develfrom
Vibsteamer:patch-3

Conversation

@Vibsteamer

Copy link
Copy Markdown
Contributor

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".

wanghan-iapcm and others added 6 commits November 15, 2021 07:45
Merge recent development on devel into 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"
Comment thread dpdata/vasp/outcar.py Outdated
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"):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would suggest to use "NELM =" in ii, to prevent other lines with NELM appears before NELM = in future versions

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You may need to use regular expression.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You may need to use regular expression.

support

@amcadmus amcadmus Feb 9, 2022

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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-commenter

codecov-commenter commented Jan 21, 2022

Copy link
Copy Markdown

Codecov Report

Merging #239 (ccdd31e) into devel (a2d13e6) will decrease coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
dpdata/vasp/outcar.py 96.29% <100.00%> (+0.03%) ⬆️
dpdata/cp2k/output.py 97.35% <0.00%> (-0.36%) ⬇️
dpdata/plugins/ase.py 65.45% <0.00%> (ø)
dpdata/plugins/xyz.py 100.00% <0.00%> (ø)
dpdata/xyz/xyz.py 100.00% <0.00%> (ø)
dpdata/rdkit/sanitize.py 43.77% <0.00%> (+0.06%) ⬆️

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 a2d13e6...ccdd31e. Read the comment docs.

Comment thread dpdata/vasp/outcar.py Outdated
Vibsteamer and others added 2 commits February 9, 2022 15:58
Co-authored-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Co-authored-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
@Vibsteamer

Copy link
Copy Markdown
Contributor Author

Not sure whether the regular expression here violates the consistence in the coding style or standard, if there was supposed to be one.
Other lines are still processed without "re".

version_match error for numpy @ check of "Python package workflow run":

  Installing build dependencies: started
  Installing build dependencies: finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: /usr/share/miniconda/envs/my-rdkit-env/bin/python /usr/share/miniconda/envs/my-rdkit-env/lib/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-3a5vw0ui/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'numpy>=1.20.1' 'setuptools>=43.0.0'
       cwd: None
  Complete output (2 lines):
  ERROR: Could not find a version that satisfies the requirement numpy>=1.20.1 (from versions: 1.3.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.10.0.post2, 1.10.1, 1.10.2, 1.10.4, 1.11.0, 1.11.1, 1.11.2, 1.11.3, 1.12.0, 1.12.1, 1.13.0rc1, 1.13.0rc2, 1.13.0, 1.13.1, 1.13.3, 1.14.0rc1, 1.14.0, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.14.5, 1.14.6, 1.15.0rc1, 1.15.0rc2, 1.15.0, 1.15.1, 1.15.2, 1.15.3, 1.15.4, 1.16.0rc1, 1.16.0rc2, 1.16.0, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.16.6, 1.17.0rc1, 1.17.0rc2, 1.17.0, 1.17.1, 1.17.2, 1.17.3, 1.17.4, 1.17.5, 1.18.0rc1, 1.18.0, 1.18.1, 1.18.2, 1.18.3, 1.18.4, 1.18.5, 1.19.0rc1, 1.19.0rc2, 1.19.0, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.19.5)
  ERROR: No matching distribution found for numpy>=1.20.1
  ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/share/miniconda/envs/my-rdkit-env/bin/python /usr/share/miniconda/envs/my-rdkit-env/lib/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-3a5vw0ui/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'numpy>=1.20.1' 'setuptools>=43.0.0' Check the logs for full command output.
Error: Process completed with exit code 1.

@wanghan-iapcm

Copy link
Copy Markdown
Contributor

Not sure whether the regular expression here violates the consistence in the coding style or standard, if there was supposed to be one. Other lines are still processed without "re".

version_match error for numpy @ check of "Python package workflow run":

  Installing build dependencies: started
  Installing build dependencies: finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: /usr/share/miniconda/envs/my-rdkit-env/bin/python /usr/share/miniconda/envs/my-rdkit-env/lib/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-3a5vw0ui/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'numpy>=1.20.1' 'setuptools>=43.0.0'
       cwd: None
  Complete output (2 lines):
  ERROR: Could not find a version that satisfies the requirement numpy>=1.20.1 (from versions: 1.3.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.10.0.post2, 1.10.1, 1.10.2, 1.10.4, 1.11.0, 1.11.1, 1.11.2, 1.11.3, 1.12.0, 1.12.1, 1.13.0rc1, 1.13.0rc2, 1.13.0, 1.13.1, 1.13.3, 1.14.0rc1, 1.14.0, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.14.5, 1.14.6, 1.15.0rc1, 1.15.0rc2, 1.15.0, 1.15.1, 1.15.2, 1.15.3, 1.15.4, 1.16.0rc1, 1.16.0rc2, 1.16.0, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.16.6, 1.17.0rc1, 1.17.0rc2, 1.17.0, 1.17.1, 1.17.2, 1.17.3, 1.17.4, 1.17.5, 1.18.0rc1, 1.18.0, 1.18.1, 1.18.2, 1.18.3, 1.18.4, 1.18.5, 1.19.0rc1, 1.19.0rc2, 1.19.0, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.19.5)
  ERROR: No matching distribution found for numpy>=1.20.1
  ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/share/miniconda/envs/my-rdkit-env/bin/python /usr/share/miniconda/envs/my-rdkit-env/lib/python3.6/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-3a5vw0ui/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'numpy>=1.20.1' 'setuptools>=43.0.0' Check the logs for full command output.
Error: Process completed with exit code 1.

I do not understand why it is introduce. @njzjz any idea?

@njzjz

njzjz commented Feb 10, 2022

Copy link
Copy Markdown
Member

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?

@wanghan-iapcm

Copy link
Copy Markdown
Contributor

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

@njzjz

njzjz commented Feb 10, 2022

Copy link
Copy Markdown
Member

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?

run: source $CONDA/bin/activate my-rdkit-env && pip install .[amber,ase,pymatgen] coverage codecov

I think what you mean is dpgen

@wanghan-iapcm

Copy link
Copy Markdown
Contributor

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?

run: source $CONDA/bin/activate my-rdkit-env && pip install .[amber,ase,pymatgen] coverage codecov

I think what you mean is dpgen

You are right I took dpgen. Could you please update our test? I suggest we do not support python 3.6 any longer.

@wanghan-iapcm wanghan-iapcm merged commit c08c74c into deepmodeling:devel Feb 10, 2022
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.

5 participants