From 6aebe00b44ead48f9c3a53458c7c86e3c8014796 Mon Sep 17 00:00:00 2001 From: hebrewsnabla Date: Thu, 20 Jan 2022 15:49:14 +0800 Subject: [PATCH] fix bug in cidump --- automr/cidump.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/automr/cidump.py b/automr/cidump.py index c3c4014..4e65eb8 100644 --- a/automr/cidump.py +++ b/automr/cidump.py @@ -37,13 +37,18 @@ def dump(mc, thresh=1e-2): for ici, ci in enumerate(civecs): print('***** CI components ROOT %d ******' % ici) ncas = mc.ncas - na, nb = mc.nelecas + #na, nb = mc.nelecas + #print(mc.fcisolver.nelec) + spin = mc.fcisolver.spin + na,nb = fci.addons._unpack_nelec(mc.nelecas, spin) #print(mc.ci) lena, lenb = ci.shape dump_g = {} dump_o = {} for i in range(lena): for j in range(lenb): + #print('ncas %d na %d i %d'%(ncas, na,i)) + #print(fci.cistring.num_strings(ncas, na) ) veca = fci.cistring.addr2str(ncas, na, i) vecb = fci.cistring.addr2str(ncas, nb, j) coeff = ci[i,j]