mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-22 20:35:19 +01:00
Fix THE QMCPACK Determinant print
This commit is contained in:
parent
35e15da890
commit
068d9d5542
@ -183,9 +183,6 @@ def get_nb_permutation(str_):
|
||||
|
||||
|
||||
def order_l_l_sym(l_l_sym):
|
||||
|
||||
l_order_mo = [i for i,_ in enumerate(l_l_sym)]
|
||||
|
||||
n = 1
|
||||
for i in range(len(l_l_sym)):
|
||||
if n != 1:
|
||||
@ -195,11 +192,11 @@ def order_l_l_sym(l_l_sym):
|
||||
l = l_l_sym[i]
|
||||
n = get_nb_permutation(l[2])
|
||||
|
||||
l_l_sym[i:i + n], l_order_mo[i:i+n] = zip(*sorted(zip(l_l_sym[i:i + n],l_order_mo[i:i+n]),
|
||||
key=lambda x: x[0][2],
|
||||
cmp=compare_gamess_style))
|
||||
l_l_sym[i:i + n] = sorted(l_l_sym[i:i + n],
|
||||
key=lambda x: x[2],
|
||||
cmp=compare_gamess_style)
|
||||
|
||||
return l_l_sym, l_order_mo
|
||||
return l_l_sym
|
||||
|
||||
|
||||
#==========================
|
||||
@ -208,13 +205,8 @@ def order_l_l_sym(l_l_sym):
|
||||
|
||||
l_sym_without_header = sym_raw.split("\n")[3:-2]
|
||||
l_l_sym_raw = [i.split() for i in l_sym_without_header]
|
||||
print len(l_l_sym_raw)
|
||||
|
||||
l_l_sym_expend_sym = expend_sym_l(l_l_sym_raw)
|
||||
print len(l_l_sym_expend_sym)
|
||||
|
||||
l_l_sym_ordered, l_order_mo = order_l_l_sym(l_l_sym_expend_sym)
|
||||
|
||||
l_l_sym_ordered = order_l_l_sym(l_l_sym_expend_sym)
|
||||
|
||||
#========
|
||||
#MO COEF
|
||||
@ -356,7 +348,6 @@ d_rep={"+":"1","-":"0"}
|
||||
|
||||
det_without_header = det_raw[pos+2::]
|
||||
|
||||
|
||||
for line_raw in det_without_header.split("\n"):
|
||||
line = line_raw
|
||||
|
||||
@ -364,10 +355,8 @@ for line_raw in det_without_header.split("\n"):
|
||||
try:
|
||||
float(line)
|
||||
except ValueError:
|
||||
line_order = [line_raw[i] for i in l_order_mo]
|
||||
line= "".join([d_rep[x] if x in d_rep else x for x in line_raw])
|
||||
|
||||
print line.strip()
|
||||
|
||||
print "END_DET"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user