Dipole matrix for AO basis

Recently, I have been trying to obtain the dipole matrices AOs (<φ_AO|r|φ_AO>) from Qchem (v6.0) but failed.
I also tried to analyze one of the scratch files named “63.0”, which is labelled “FILE_MULT_MATRIX” in the /include/fileman.h file.
However, I am confused at the numbers printed there. I ran a test job using EOMCCSD/STO-3G on water (its input is appended below). It seems include the elements of overlap, dipole, and quadrupole matrices but the dimension and the arrangements are puzzling.
How to understand the 63.0 file or is there a simple way to get the AO dipole matrix?
Thank you!

$molecule
0 1
O -0.0000000 -0.0184036 0.0000000
H 0.0000000 0.5383442 -0.7830458
H -0.0000000 0.5383442 0.7830458
$end

$rem
GUI 2
JOBTYPE SP
METHOD BLYP
UNRESTRICTED false
CIS_N_ROOTS 1
CIS_SINGLETS true
CIS_TRIPLETS false
CIS_STATE_DERIV 1
BASIS sto-3g
NTO_PAIRS 4
!XC_GRID 3
!SOLVENT_METHOD pcm
MEM_STATIC 4000
MEM_TOTAL 24000
!CPSCF_NSEG 3
!THRESH 12
MOLDEN_FORMAT true
RPA 2
STATE_ANALYSIS true
$end

Unfortunately it is not completely trivial to read file 63. The reason is because the matrices are not stored in their dense square forms but in the packed shell pair basis where only matrix elements corresponding to a “significant” shell pair (the overlap of its basis functions is larger than a threshold) are kept. It is possible to reconstruct the key that maps between indices of the shell pair basis and the full basis (I think it’s in 803) and do the unpacking, but none of us have code handy which will do that.

Immediate options that come to mind are:

We are working on an improved data export format called qarchive based on HDF5 that the full form of these matrices can be added to. Is that something you would be interested in? If so, are there any other export quantities you’d find useful?

If you’re a developer, we also have a separate internal forum that should be used if we get into more technical details.

Hi ericb,
Thank you very much for your help. I have successfully obtained the AO dipole matrices from the iprint = 300.

For the second solution, perhaps I am not familiar with the background theories, I got some errors such as “Specify one or more frequencies”, or “Cannot do general linear response with anything other than Hartree-Fock or DFT”, despite the fact that the calculations were already on BLYP and HF methods. However, it’s OK for now since the first solution works nicely and the accuracy looks great enough.

It seems that current qarchive.h5 file is a binary file containing a huge array of numbers and it may require efforts to interpret. Due to the problem that I encountered, it would be awesome to have a better format of archive file.

Thank you again for your help!

All common one-electron integrals will be saved to the formatted checkpoint and archive files in the upcoming 6.0.2 release. For fchk, d-function Cartesian components are ordered like (xx, xy, yy, xz, yz, zz; consistent with MO coefficients and densities), and in the archive they are ordered lexicographically (alphabetically, (xx, xy, xz, yy, yz, zz)).