Dear All,

I am trying to call CIwavefunction.ndet() but the returned number is not the correct number of determinants.

For example :

```
#! Li FCI Energy Point
import numpy as np
import matplotlib.pyplot as plt
memory 250 mb
molecule mol {
Li
symmetry c1
}
set reference rohf
set basis cc-pvdz
set opdm True
set PRINT_MOS True
set PRINT_BASIS True
energy, wfn = energy('FCI', return_wfn=True)
ndet = wfn.ndet()
print 'Number of Determinants:',ndet
```

Gives the following output:

— Number of Determinants: 47149231132504 —

rather than the correct number of 1274 determinants.

Is there a method that returns the converged CI vector with the corresponding determinant indices?

Thank you in advance.

Best,

Shachar

When you call Wavefunction in this way they have already cleaned themselves up and erased internal data. This was never meant to work for most users. The following will print out the civector as a NumPy array:

```
import numpy as np
# Set molecule to dimer
molecule mol {
Li
symmetry c1
}
set reference rohf
set basis cc-pvdz
set opdm True
set PRINT_MOS True
set PRINT_BASIS True
set wfn detci
set fci True
set scf_type out_of_core
scf_e, scf_wfn = energy('SCF', return_wfn=True)
```

Build and compute the CIWave:

```
psi4.prepare_options_for_module("DETCI")
ciwfn = CIWavefunction(scf_wfn)
ciwfn.transform_ci_integrals()
ciwfn.diag_h()
print('Number of dets: %d' % ciwfn.ndet())
# Read the CI Vector off disk
dvec = ciwfn.new_civector(1, 53, True, True)
dvec.set_nvec(1)
dvec.init_io_files(True)
dvec.read(0,0)
C0 = np.array(dvec)
print C0
```