2
#include "prototypes.h"
6
int main(int argc, char* argv[]) {
9
char buffer[80]; /* buffer string */
11
/* Setting defaults */
35
/* Initialization and printing intro */
39
/*************************** Main Code *******************************/
41
/* Reading in basic information from checkpoint file */
43
title = chkpt_rd_label();
44
natom = chkpt_rd_natom();
47
nbfso = chkpt_rd_nso();
48
nbfao = chkpt_rd_nao();
49
natri = nbfao * (nbfao+1)/2;
50
nstri = nbfso * (nbfso+1)/2;
51
nshell = chkpt_rd_nshell();
52
nprim = chkpt_rd_nprim();
53
iopen = chkpt_rd_iopen();
54
nirreps = chkpt_rd_nirreps();
55
nsym = chkpt_rd_nsymhf();
56
orbspi = chkpt_rd_orbspi();
57
sopi = chkpt_rd_sopi();
58
clsdpi = chkpt_rd_clsdpi();
59
openpi = chkpt_rd_openpi();
60
irr_labs = chkpt_rd_irr_labs();
61
geom = chkpt_rd_geom();
62
zvals = chkpt_rd_zvals();
63
usotao = chkpt_rd_usotao();
68
if (strcmp(ref,"UHF") != 0) {
69
scf_evec_so = chkpt_rd_scf();
70
scf_evals = chkpt_rd_evals();
71
scf_evec_ao = block_matrix(nbfao,nmo);
72
mmult(usotao,1,scf_evec_so,0,scf_evec_ao,0,nbfao,nbfso,nmo,0);
75
/* parse the grid information */
76
if (ip_exist("GRID",0))
79
/* Computing total charge of the system */
82
for(i=0;i<nirreps;i++)
83
charge -= 2*clsdpi[i] + openpi[i];
87
/* Setting up an offset array */
89
ioff = init_int_array(nbfao);
91
for(i=1;i<nbfao;i++) {
92
ioff[i] = ioff[i-1] + i;
95
/* Computing double factorials df[i] = (i-1)!! */
99
for(i=3; i<MAXFACT*2; i++) {
100
df[i] = (i-1)*df[i-2];
103
/* Printing tasks and parameters */
105
if (print_lvl >= PRINTTASKPARAMLEVEL) {
110
/* Reading in basis set inforamtion */
117
/* RAK and CDS: Determine number of densities to analyze */
120
for (irho=0;irho<nrho;irho++) {
122
if (transdens && irho == 0) continue;
124
fprintf(outfile,"\t** Analyzing ");
126
fprintf(outfile, "transition ");
127
fprintf(outfile, "density number %d **\n", irho+1);
129
chkpt_init(PSIO_OPEN_OLD);
131
/* Obtain a density matrix */
139
/* Obtain natural orbitals */
140
if (read_opdm && wrtnos)
145
/* Mulliken population analysis */
149
/* Compute coordinates of the MP reference point if needed */
151
compute_mp_ref_xyz();
153
/* Moving molecule to the reference center!
154
Attention, ever since coordinates of atoms and of the grid box
155
are stored in this new coordinate system. All coordinates are
156
transformed back at the moment of printing out. */
158
for(i=0;i<natom;i++) {
159
geom[i][0] -= mp_ref_xyz[0];
160
geom[i][1] -= mp_ref_xyz[1];
161
geom[i][2] -= mp_ref_xyz[2];
162
Lm_ref_xyz[0] -= mp_ref_xyz[0];
163
Lm_ref_xyz[1] -= mp_ref_xyz[1];
164
Lm_ref_xyz[2] -= mp_ref_xyz[2];
167
grid_origin[0] -= mp_ref_xyz[0];
168
grid_origin[1] -= mp_ref_xyz[1];
169
grid_origin[2] -= mp_ref_xyz[2];
172
/* Computing one-electron integrals in
173
terms of Cartesian Gaussians,
174
electric first (dipole), second and third
175
moments W.R.T. origin, electrostatic potential,
176
electric field and field gradients,
177
electron and spin density at atomic centers,
178
and various properties over a grid, if neccessary. */
189
grid_origin[0] += mp_ref_xyz[0];
190
grid_origin[1] += mp_ref_xyz[1];
191
grid_origin[2] += mp_ref_xyz[2];
200
if (strcmp(ref,"UHF") != 0) {
201
free_block(scf_evec_so);
202
free_block(scf_evec_ao);
207
free(ex); free(ey); free(ez);
208
free(dexx); free(deyy); free(dezz);
209
free(dexy); free(dexz); free(deyz);
220
/*} end non-UHF routines */
222
exit(PSI_RETURN_SUCCESS);
229
char *prgid = "OEPROP";