4
** Return values of one and two-electron integrals
7
** University of California, Berkeley
9
** Based on code from the DETCI program
15
#include <libiwl/iwl.h>
16
#include <libciomr/libciomr.h>
19
#include "globaldefs.h"
24
int i, j, ij, k, l, kl, ijkl;
28
/* allocate memory for one and two electron integrals */
29
nbstri = CalcInfo.nbstri;
30
CalcInfo.onel_ints = init_array(nbstri);
31
CalcInfo.twoel_ints = init_array(nbstri * (nbstri + 1) / 2);
33
/* now read them in */
35
if (Params.use_fzc_h) {
36
if (Params.print_lvl > 3)
37
fprintf(outfile, "\n\tOne-electron integrals (frozen core operator):\n");
38
iwl_rdone(Params.oei_file, PSIF_MO_FZC, CalcInfo.onel_ints, nbstri,
39
Params.oei_erase, (Params.print_lvl>3), outfile);
42
if (Params.print_lvl > 3)
43
fprintf(outfile, "\n\tOne-electron integrals (bare):\n");
44
iwl_rdone(Params.oei_file, PSIF_MO_OEI, CalcInfo.onel_ints, nbstri,
45
Params.oei_erase, (Params.print_lvl>3), outfile);
48
if (Params.print_lvl > 4)
49
fprintf(outfile, "\n\tTwo-electron integrals:\n");
51
iwl_rdtwo(Params.tei_file, CalcInfo.twoel_ints, ioff,
52
CalcInfo.nmo, Params.filter_ints ? CalcInfo.num_fzc_orbs : 0,
53
Params.filter_ints ? CalcInfo.num_fzv_orbs : 0,
54
(Params.print_lvl>4), outfile);
60
double get_onel(int i, int j)
65
return(CalcInfo.onel_ints[ij]);
69
double get_twoel(int i, int j, int k, int l)
77
return(CalcInfo.twoel_ints[ijkl]);
84
** This function gets an irrep block of a full matrix
89
void get_mat_block(double **src, double **dst, int dst_dim, int dst_offset,
95
for (P=0; P<dst_dim; P++) {
96
p = dst2src[P+dst_offset];
97
for (Q=0; Q<dst_dim; Q++) {
98
q = dst2src[Q+dst_offset];
99
dst[P][Q] = src[p][q];