Hello to all Psi4 users and authors,
I am rather new to Psi4, and I like the interface! I am trying to use it to calculate electronic density matrices (transition and for individual states) and electronic dipole moment matrices (transition and for individual states) for a CASSCF calculation. I intend to use these for comparison with a custom code that I am modifying, which calculates the same quantities.
The input I am using is as follows:
molecule hehp1 {
H 0.0 0.0 0.386
He 0.0 0.0 0.386
1 1
symmetry c1
}
set {
scf_type out_of_core
basis STO3G
reference rhf
print 5
frozen_docc [0]
active [2]
frozen_uocc [0]
mcscf_type ao
num_roots R
opdm true
tdm true
dipmom true
}
cas_e, wfn = energy("casscf", return_wfn=True)
#fci_e, wfn = energy("fci", return_wfn=True)
opdm_a = wfn.get_opdm(N, M, "A", True)
dm = opdm_a.to_array()
#print('density matrix(S', N, ', S', M, '):\n', dm)
My values for R
, N
, M
are 3
, (b/w 0
and 2
), and (b/w 0
and 2
), respectively.
I have a few questions about this calculation:

The above works for
N=0
and any value ofM
up to(R1)
. A GitHub issue thread tells me it should work for other values ofN
up to(R1)
as well, but it doesn’t. Why does it not work for the above input, and is there a solution to get it to work? For more information, running the above input gives me the following error (even with thefci
method):
Traceback (most recent call last):
File "/path/to/psi4conda/bin/psi4", line 287, in <module>
exec(content)
File "<string>", line 39, in <module>
Fatal Error: CIWavefunction::get_opdm: Requested OPDM was not formed!
Error occurred in file: /path/to/scratch/psilocaluser/condabuilds/psi4multiout_1557940846948/work/psi4/src/psi4/detci/ciwave.cc on line: 359

How do I access the dipole moment matrices (transition as well as individual state ones, between and of all the
R
states), so I can print them out/save in numpy data files? 
Is there a way to print these matrices in the AO basis?

How do I access the CI vectors of all the
R
roots (also to print out/save as numpy data files)?
Thank you for your patience with this post, and any help is greatly appreciated!
Karnamohit
P.S.: Here is a list of some of the topic threads and manual pages I consulted before I decided to create this topic (for help in any future searches):

manual pages: properties,
detci
module, sample inputs (GitHub),CIWavefunction
class, CI method, general input,Wavefunction
class, Psithon functions,psi4
executable 
topic threads: extracting oneparticle density matrices, accessing density matrices, CI transition dipole moments, transition dipole moments b/w excited states, extracting CI vectors and # determinants (full CI)