iOpenShell » Q-Chem specific questions » Two-electron integrals

Two-electron integrals

Page: 1

Author Post
Member
Registered: Aug 2011
Posts: 4
Hi all,

I have been having a world of trouble figuring out how to extract the two-electron integrals out of a HF QCHEM calculation. I've tried getting the integrals in all sorts of ways without any success, and I figured that there has to be an easy way to do it.

Could someone please help me figure out how to pluck out the two-electron integrals? Thanks greatly!
Member
Registered: Aug 2011
Posts: 4
Am I missing something obvious? Does my question make sense?

Thanks greatly.
Member
Registered: Dec 2009
Posts: 13
I don't know the AOINTS job number (65?) for sure, but if you can find that, you can call that subroutine in a dummy function and print it out manually.
MBG
Member
Registered: Nov 2007
Posts: 110
Location: Q-Chem Inc.
Do you want MO integrals or AO integrals?
Member
Registered: Aug 2011
Posts: 4
I'm looking for either, but the MO integrals would be the most ideal.
Member
Registered: Nov 2007
Posts: 110
Location: Q-Chem Inc.
1. MO integrals

Please try the following job

$molecule
0 1
O
H1 O OH
H2 O OH H1 HOH

OH = 0.947
HOH = 105.5
$end

$rem
EXCHANGE HF
BASIS 3-21G*
SCF_CONVERGENCE 8
IPRINT 200
CORRELATION 105
SAVE_MO_INTEGRALS 2
$end

MO integrals should be printed in the output file. If the scratch directory is saved, binary file 22.0 keeps all significant integrals, another binary file 809.0 keeps the indices. The first entry in file 809.0 is double precision, and tells us how many integrals we saved in 22.0, the next four entries are integers and correspond to the p, q, r, s index for the first MO integral (p, q for the first electron and r, s for the second electron), .... If I remember correctly, we obtain un-anti-symmetrized MO integrals in restricted cases and anti-symmetrized ones in unrestricted cases.

2. AO integrals

Please try

$rem
EXCHANGE HF
BASIS 3-21G*
SCF_CONVERGENCE 8
SCF_GUESS CORE
MAXSCF 2
SAVE_AO_INTEGRALS 1
USE_NEW_PATH2 FALSE
SYMMETRY FALSE
PURECART 22222
$end

and all NBas*NBas*NBas*NBas integrals are kept in file 21.0. Note that it only works for a) purecart=22222 (6d10f15g) and b) with symmetry off.

We can also keep only significant integrals with "save_ao_integrals 2", where file 21.0 keeps the AO integrals and 801.0 keeps the number of significant integrals and then the indices.

I also built the Hartree-Fock exchange matrix directly from these stored AO integrals and, in the output file, this matrix should be shown to match the normal one.

I added both "save_mo_integrals" and "save_ao_integrals" keywords in Q-Chem. Please let me know how well it works for you.
« Last edit by yihan on Wed Nov 30, 2011 4:08 am. »
Member
Registered: Feb 2017
Posts: 1
I am still unable to read the MO integrals from the binary file 809.0. I have written a Fortran 90 code to try to read these files and I am not able to read the integrals. The code I used is below.

implicit none
double precision :: xnum_int
double precision :: xint2e

open(unit=10,file = "809.0",form='unformatted',action='read')
read(10) xnum_int
write(*,*) xnum_int
close(10)

open(unit=20,file = "22.0",form='unformatted',action='read')
read(20) xint2e
write(*,*) xint2e
close(10)

end

When I run the code I get this:

5.3630150764768835E-315
At line 9 of file prog_003.F90 (unit = 10, file = '809.0')
Fortran runtime error: End of file

My question is, in what format are you printing the 2-electron MO integrals in file "809.0" and how can I read them. Perhaps the format changed since 2011?Also, which file contains the 1-electron MO integrals?

Thanks!

Page: 1

iOpenShell » Q-Chem specific questions » Two-electron integrals