qsimulate-open / bagel

Brilliantly Advanced General Electronic-structure Library
GNU General Public License v3.0
98 stars 43 forks source link

CASSCF/CASPT2 relaxed density matrices #101

Closed cuanto closed 7 years ago

cuanto commented 7 years ago

Hi,

Some time ago I asked about the CASPT2 relaxed density matrix, about the posibility to use it in my code. I did not had time until now to at least study about density fitting, c++ is still a pending task.

Is the CASSCF/CASPT2 density matrix stored as Qij, where Q is the auxbasis index and i,j the standard indexes ? In that case I think that I can recover the usual 4 index density matrix as is done with the two electron integrals, contracting the Q index, for example using numpy (I am learning python)

rdm2_full = numpy.einsum('Qij,Qkl->ijkl',rdm2_partial,rdm2_partial)

is that correct ? Modifiying my program is quite difficult as in some step I rewrite the 4-index 2-RDM in a 2-index format, so I can diagonalice it, which prevent some of the quite demanding scaling in the integration, this coupled whith a bipolar expansion of the r_{12} operator to avoid singularities in the numerical integration. In the 3-index format I will need to do a SVD an I have no quite clear some other parts, to adapt it.

If I am corret concerning how to recover the full 2-RDM, can you help me to print the CASSCF and the CASPT2 density matrices ? In that case I will also need the canonical orbitals in molden format, canonicalized within each subspace, ie the general fock matrix is diagonal in core subblock and virtual block.

It would be very nice if this can be done !!! :-)

Thanks in advance.

Best regards, Jose Luis

shiozaki commented 7 years ago

Not a bug, and therefore, I am closing this issue.

What you describe requires a little bit of coding, and I don't think that we have time to do that for you.