Skip to content
This repository was archived by the owner on Jan 14, 2023. It is now read-only.

Commit

Permalink
tidied up printing of electron propagator
Browse files Browse the repository at this point in the history
  • Loading branch information
pwborthwick authored Jan 14, 2023
1 parent fedd51d commit 01bed7b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions source/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,9 +695,11 @@ def postSCF(data, type):
+ "%.6f" % data[0][i,2] + '</td></tr>')
f.write('\n\t</table>')

if type == 'ep':
if type in ['ep', 'eps', 'ep3']:
delimiter(f)
f.write('\n\t<table><caption>electron propogator - Koopman\'s theorem</caption>')

if type == 'ep':
f.write('\n\t\t<tr><th>HOMO - n</th><th>Koopman (eV)</th><th>EP2 (eV)</th></tr>')
f.write('\n\t\t<tr><td colspan=\'3\'><b>ep2 spatial</b></td></tr>')
koopman = data[2] * data[3]
Expand All @@ -707,6 +709,7 @@ def postSCF(data, type):
f.write('\n\t\t\t<tr><td>' + "% 4d" % (kpOrbital - data[4] + 1) + '</td><td>' + "%.4f" % koopman[kpOrbital] + \
'</td><td>' + "%.4f" % data[1][orbital] + '</td></tr>')
if type == 'eps':
f.write('\n\t\t<tr><th>HOMO - n</th><th>Koopman (eV)</th><th>EP2 (eV)</th></tr>')
f.write('\n\t<tr><td colspan=\'3\'><b>ep2 spin</b></td></tr>')
koopman = zeros(len(data[0]))
for i in range(0, len(data[0])):
Expand All @@ -715,6 +718,7 @@ def postSCF(data, type):
f.write('\n\t\t\t<tr><td>' + "% 4d" % (len(data[0])-orbital-1) + '</td><td>' + "%.4f" % koopman[orbital] + \
'</td><td>' + "%.4f" % data[0][orbital] + '</td></tr>')
if type == 'ep3':
f.write('\n\t\t<tr><th>HOMO - n</th><th>Koopman (eV)</th><th>EP3 (eV)</th></tr>')
f.write('\n\t<tr><td colspan=\'3\'><b>ep3 spin</b></td></tr>')
koopman = zeros(len(data[0]))
for i in range(0, len(data[0])):
Expand All @@ -723,7 +727,9 @@ def postSCF(data, type):
f.write('\n\t\t\t<tr><td>' + "% 4d" % (len(data[0])-orbital-1) + '</td><td>' + "%.4f" % koopman[orbital] + \
'</td><td>' + "%.4f" % data[0][orbital] + '</td></tr>')
f.write('\n\t</table>')

if type in ['ep', 'eps', 'ep3']:
f.write('\n\t</table><br>')

if type == 'gfa':
if data[0] == -1:
delimiter(f)
Expand Down Expand Up @@ -1048,4 +1054,4 @@ def plotMO(C, orbital, plane, z, extent, grid, atoms, bases, options = [True, 60
py.show()
except:
print('no density')


0 comments on commit 01bed7b

Please sign in to comment.