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 TITEL bugs when reading VASP6's OUTCAR #151

Merged
merged 2 commits into from
May 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions dpdata/vasp/outcar.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ def system_info (lines, type_idx_zero = False) :
atom_numbs = None
nelm = None
for ii in lines:
if 'TITEL =' in ii :
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)
elif 'NELM' in ii :
nelm = int(ii.split()[2][:-1])
break;
elif 'NELM' in ii and nelm == None:
# will read only first nelm
nelm = int(ii.split()[2].rstrip(";"))
elif 'ions per type' in ii :
atom_numbs_ = [int(s) for s in ii.split()[4:]]
if atom_numbs is None :
Expand Down