Skip to content

Commit 823fa60

Browse files
committed
Fix TITEL bugs when reading VASP6's OUTCAR
1 parent 0ef2e4b commit 823fa60

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dpdata/vasp/outcar.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ def system_info (lines, type_idx_zero = False) :
55
atom_numbs = None
66
nelm = None
77
for ii in lines:
8-
if 'TITEL =' in ii :
8+
if 'TITEL' in ii :
99
# get atom names from POTCAR info, tested only for PAW_PBE ...
1010
_ii=ii.split()[3]
1111
if '_' in _ii:
1212
# for case like : TITEL = PAW_PBE Sn_d 06Sep2000
1313
atom_names.append(_ii.split('_')[0])
1414
else:
1515
atom_names.append(_ii)
16-
elif 'NELM' in ii :
16+
elif 'NELM' in ii and nelm == None:
17+
# will read only first nelm
1718
nelm = int(ii.split()[2][:-1])
18-
break;
1919
elif 'ions per type' in ii :
2020
atom_numbs_ = [int(s) for s in ii.split()[4:]]
2121
if atom_numbs is None :

0 commit comments

Comments
 (0)