mirror of
https://github.com/triqs/dft_tools
synced 2024-10-31 11:13:46 +01:00
Update readElkfiles.py
During the Elk conversion process, two files, SYMCRYS.OUT and LATTICE.OUT, need to be read. However, after the Elk calculation is completed, there are some blank lines in these files, which leads to recognition failure of readElkfiles.py. By using line.strip(), non-blank lines can be directly read.
This commit is contained in:
parent
f3a0d611ff
commit
dcb47d6e27
@ -98,6 +98,7 @@ class readElkfiles:
|
||||
if not(os.path.exists(filename)):
|
||||
raise IOError("File %s does not exist." % filename)
|
||||
for line in open(filename, 'r'):
|
||||
if line.strip():
|
||||
for old, new in to_replace.items():
|
||||
line = line.replace(old, new)
|
||||
# removes the substring after '(' character - if it exists
|
||||
|
Loading…
Reference in New Issue
Block a user