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

fix #359: read atom names from POTCAR if not present in OUTCAR #443

Open
wants to merge 4 commits into
base: devel
Choose a base branch
from

Conversation

hoba87
Copy link

@hoba87 hoba87 commented Mar 30, 2023

No description provided.

@codecov
Copy link

codecov bot commented Mar 30, 2023

Codecov Report

Patch coverage: 80.00% and project coverage change: -0.01 ⚠️

Comparison is base (c02097b) 82.53% compared to head (29ea10b) 82.52%.

❗ Current head 29ea10b differs from pull request most recent head 68580d6. Consider uploading reports for the commit 68580d6 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##            devel     #443      +/-   ##
==========================================
- Coverage   82.53%   82.52%   -0.01%     
==========================================
  Files          68       68              
  Lines        6205     6210       +5     
==========================================
+ Hits         5121     5125       +4     
- Misses       1084     1085       +1     
Impacted Files Coverage Δ
dpdata/vasp/outcar.py 95.58% <80.00%> (-0.60%) ⬇️

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.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -18,6 +18,14 @@ def system_info(lines, type_idx_zero=False):
atom_names.append(_ii.split("_")[0])
else:
atom_names.append(_ii)
elif "POTCAR" in ii:
Copy link
Contributor

Choose a reason for hiding this comment

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

my outcar reads

 INCAR:
 POTCAR:    PAW_PBE Mg 13Apr2007                  
 POTCAR:    PAW_PBE Mg 13Apr2007                  
   VRHFIN =Mg: s2p0                                                             
   LEXCH  = PE                                                                  
   EATOM  =    23.0369 eV,    1.6932 Ry                                         
                                                                                
   TITEL  = PAW_PBE Mg 13Apr2007                                                
   LULTRA =        F    use ultrasoft PP ?                                      
   IUNSCR =        1    unscreen: 0-lin 1-nonlin 2-no                           

Then the same atom name will be added three times.

Copy link
Author

Choose a reason for hiding this comment

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

The new commit don't allow duplicated atom names

Copy link
Contributor

Choose a reason for hiding this comment

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

The dpdata is expected to abstract atom names in an order that is exact the same as how the potcars are concatenated.
Your implementation does not work for the cases like "A" "B" "A" "B"

@@ -18,6 +18,14 @@ def system_info(lines, type_idx_zero=False):
atom_names.append(_ii.split("_")[0])
else:
atom_names.append(_ii)
elif "POTCAR" in ii:
Copy link
Contributor

Choose a reason for hiding this comment

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

The dpdata is expected to abstract atom names in an order that is exact the same as how the potcars are concatenated.
Your implementation does not work for the cases like "A" "B" "A" "B"

@hoba87
Copy link
Author

hoba87 commented Apr 13, 2023

Why does it not work for "A" "B" "A" "B", just skipping the second "A" "B"?

@wanghan-iapcm
Copy link
Contributor

Why does it not work for "A" "B" "A" "B", just skipping the second "A" "B"?

The expected atom names is "A" "B" "A" "B". Your PR changes the behavior of dpdata.

@hoba87
Copy link
Author

hoba87 commented Apr 17, 2023

Ok, do I understand you right, there exist cases with different pseudopotentials for the same atom type? If that is the case, I have no idea how to cover that.
Then I will keep my changes seperatly and you can close the pull request.

@wanghan-iapcm
Copy link
Contributor

Ok, do I understand you right, there exist cases with different pseudopotentials for the same atom type? If that is the case, I have no idea how to cover that. Then I will keep my changes seperatly and you can close the pull request.

The same pseudopotential file for difference sections of atoms. One is allowed to generate POTCAR by e.g.

cat POTCAR_A POTCAR_B POTCAR_A POTCAR_B > POTCAR

and write four sections of atoms having types A B A B in POSCAR.

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.

2 participants