-
Notifications
You must be signed in to change notification settings - Fork 158
fix #359: read atom names from POTCAR if not present in OUTCAR #443
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
base: master
Are you sure you want to change the base?
Changes from all commits
c396348
29ea10b
457e481
68580d6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,12 +12,16 @@ def system_info(lines, type_idx_zero=False): | |
| ii_word_list = ii.split() | ||
| if "TITEL" in ii: | ||
| # get atom names from POTCAR info, tested only for PAW_PBE ... | ||
| _ii = ii.split()[3] | ||
| if "_" in _ii: | ||
| # for case like : TITEL = PAW_PBE Sn_d 06Sep2000 | ||
| atom_names.append(_ii.split("_")[0]) | ||
| else: | ||
| atom_names.append(_ii) | ||
| # for case like : TITEL = PAW_PBE Sn_d 06Sep2000 | ||
| atom_name = ii.split()[3].split("_")[0] | ||
| if atom_name not in atom_names: | ||
| atom_names.append(atom_name) | ||
| elif "POTCAR" in ii: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. my outcar reads Then the same atom name will be added three times.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The new commit don't allow duplicated atom names
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
| # get atom names from POTCAR info, tested only for PAW_PBE ... | ||
| # for case like : POTCAR: PAW_PBE Ti_sv 26Sep2005 | ||
| atom_name = ii.split()[2].split("_")[0] | ||
| if atom_name not in atom_names: | ||
| atom_names.append(atom_name) | ||
| # a stricker check for "NELM"; compatible with distingct formats in different versions(6 and older, newers_expect-to-work) of vasp | ||
| elif nelm is None: | ||
| m = re.search(r"NELM\s*=\s*(\d+)", 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.
[P1] Preserve POTCAR record structure instead of globally deduplicating names
OUTCAR may print POTCAR records in repeated halves such as A B A B. Global membership deduplication collapses this to A B without verifying the repeated structure; with four ions-per-type entries the result has two names, four counts, and atom types 0 through 3. Current master instead preserves order and removes the second half only after validating that both halves match. This implementation should not be merged.