Change the reading format for the tl.
epsi-builds/msspec_python3/pipeline/head This commit looks good Details

This commit is contained in:
Sylvain Tricot 2020-11-26 09:52:14 +01:00
parent b8047274ed
commit d7b6ca5b84
5 changed files with 12 additions and 8 deletions

View File

@ -244,6 +244,8 @@ class PhagenIO(object):
nlmax = int(max(nlmax, np.max(lmaxs))) nlmax = int(max(nlmax, np.max(lmaxs)))
fmt1 = '{:>9}' * 4 + '\n' fmt1 = '{:>9}' * 4 + '\n'
fmt2 = '{:12.4f}{:10.4f}' fmt2 = '{:12.4f}{:10.4f}'
fmt3 = '{:18.6E}'
fmt_line = ' {:9.4f} {:9.4f}{:18.6E}{:18.6E}\n'
for _ in lmaxs: for _ in lmaxs:
fd.write(fmt1.format(*_)) fd.write(fmt1.format(*_))
@ -252,10 +254,11 @@ class PhagenIO(object):
fd.write('{}ATOM{:>4}{}\n'.format('-' * 26 + ' ', ia + 1, fd.write('{}ATOM{:>4}{}\n'.format('-' * 26 + ' ', ia + 1,
' ' + '-' * 23)) ' ' + '-' * 23))
for _a, _b, _c, _d in self.tl[ia][ie]: for _a, _b, _c, _d in self.tl[ia][ie]:
fd.write(fmt2.format(_a, _b)) # fd.write(fmt2.format(_a, _b))
fd.write(custom_strfloat(_c)) # fd.write(custom_strfloat(_c))
fd.write(custom_strfloat(_d)) # fd.write(custom_strfloat(_d))
fd.write('\n') #fd.write('\n')
fd.write(fmt_line.format(_a, _b, _c, _d))
self.nlmax = nlmax self.nlmax = nlmax
self.energies = get_energies() self.energies = get_energies()

View File

@ -1299,7 +1299,7 @@ C
C C
3 FORMAT(5(5X,I4)) 3 FORMAT(5(5X,I4))
7 FORMAT(3X,F9.4,1X,F9.4,5X,F12.9,5X,F12.9) 7 FORMAT(3X,F9.4,1X,F9.4,5X,F12.9,5X,F12.9)
9 FORMAT(3X,F9.4,1X,F9.4,5X,E12.6,5X,E12.6) 9 FORMAT(3X,F9.4,1X,F9.4,E18.6,E18.6)
17 FORMAT(12X,'ATOM NUMBER ',I4,10X,'CORRESPONDING TRANSLATIONS ',': 17 FORMAT(12X,'ATOM NUMBER ',I4,10X,'CORRESPONDING TRANSLATIONS ',':
& (',I3,',',I3,',',I3,')') & (',I3,',',I3,',',I3,')')
18 FORMAT(' ',/) 18 FORMAT(' ',/)

View File

@ -1301,7 +1301,7 @@ C
C C
3 FORMAT(5(5X,I4)) 3 FORMAT(5(5X,I4))
7 FORMAT(3X,F9.4,1X,F9.4,5X,F12.9,5X,F12.9) 7 FORMAT(3X,F9.4,1X,F9.4,5X,F12.9,5X,F12.9)
9 FORMAT(3X,F9.4,1X,F9.4,5X,E12.6,5X,E12.6) 9 FORMAT(3X,F9.4,1X,F9.4,E18.6,E18.6)
17 FORMAT(12X,'ATOM NUMBER ',I4,10X,'CORRESPONDING TRANSLATIONS ',': 17 FORMAT(12X,'ATOM NUMBER ',I4,10X,'CORRESPONDING TRANSLATIONS ',':
& (',I3,',',I3,',',I3,')') & (',I3,',',I3,',',I3,')')
18 FORMAT(' ',/) 18 FORMAT(' ',/)

View File

@ -1377,7 +1377,7 @@ C
C C
3 FORMAT(5(5X,I4)) 3 FORMAT(5(5X,I4))
7 FORMAT(3X,F9.4,1X,F9.4,5X,F12.9,5X,F12.9) 7 FORMAT(3X,F9.4,1X,F9.4,5X,F12.9,5X,F12.9)
9 FORMAT(3X,F9.4,1X,F9.4,5X,E12.6,5X,E12.6) 9 FORMAT(3X,F9.4,1X,F9.4,E18.6,E18.6)
17 FORMAT(12X,'ATOM NUMBER ',I4,10X,'CORRESPONDING TRANSLATIONS ', 17 FORMAT(12X,'ATOM NUMBER ',I4,10X,'CORRESPONDING TRANSLATIONS ',
1': (',I3,',',I3,',',I3,')') 1': (',I3,',',I3,',',I3,')')
18 FORMAT(' ',/) 18 FORMAT(' ',/)

View File

@ -1379,7 +1379,8 @@ C
C C
3 FORMAT(5(5X,I4)) 3 FORMAT(5(5X,I4))
7 FORMAT(3X,F9.4,1X,F9.4,5X,F12.9,5X,F12.9) 7 FORMAT(3X,F9.4,1X,F9.4,5X,F12.9,5X,F12.9)
9 FORMAT(3X,F9.4,1X,F9.4,5X,E12.6,5X,E12.6) CST 9 FORMAT(3X,F9.4,1X,F9.4,5X,E12.6,5X,E12.6)
9 FORMAT(3X,F9.4,1X,F9.4,E18.6,5X,E18.6)
17 FORMAT(12X,'ATOM NUMBER ',I4,10X,'CORRESPONDING TRANSLATIONS ',': 17 FORMAT(12X,'ATOM NUMBER ',I4,10X,'CORRESPONDING TRANSLATIONS ',':
&(',I3,',',I3,',',I3,')') &(',I3,',',I3,',',I3,')')
18 FORMAT(' ',/) 18 FORMAT(' ',/)