-
Notifications
You must be signed in to change notification settings - Fork 135
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
base: devel
Are you sure you want to change the base?
Conversation
Codecov ReportPatch coverage:
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
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. |
@@ -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: |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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"
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. |
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. |
The same pseudopotential file for difference sections of atoms. One is allowed to generate POTCAR by e.g.
and write four sections of atoms having types A B A B in POSCAR. |
No description provided.