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 */
115
/* Obtain a density matrix */
122
/*if (strcmp(ref,"UHF") != 0) { */
125
/* Obtain natural orbitals */
126
if (read_opdm && wrtnos)
131
/* Mulliken population analysis */
135
/* Compute coordinates of the MP reference point if needed */
137
compute_mp_ref_xyz();
139
/* Moving molecule to the reference center!
140
Attention, ever since coordinates of atoms and of the grid box
141
are stored in this new coordinate system. All coordinates are
142
transformed back at the moment of printing out. */
144
for(i=0;i<natom;i++) {
145
geom[i][0] -= mp_ref_xyz[0];
146
geom[i][1] -= mp_ref_xyz[1];
147
geom[i][2] -= mp_ref_xyz[2];
148
Lm_ref_xyz[0] -= mp_ref_xyz[0];
149
Lm_ref_xyz[1] -= mp_ref_xyz[1];
150
Lm_ref_xyz[2] -= mp_ref_xyz[2];
153
grid_origin[0] -= mp_ref_xyz[0];
154
grid_origin[1] -= mp_ref_xyz[1];
155
grid_origin[2] -= mp_ref_xyz[2];
158
/* Computing one-electron integrals in
159
terms of Cartesian Gaussians,
160
electric first (dipole), second and third
161
moments W.R.T. origin, electrostatic potential,
162
electric field and field gradients,
163
electron and spin density at atomic centers,
164
and various properties over a grid, if neccessary. */
175
grid_origin[0] += mp_ref_xyz[0];
176
grid_origin[1] += mp_ref_xyz[1];
177
grid_origin[2] += mp_ref_xyz[2];
185
if (strcmp(ref,"UHF") != 0) {
186
free_block(scf_evec_so);
187
free_block(scf_evec_ao);
192
free(ex); free(ey); free(ez);
193
free(dexx); free(deyy); free(dezz);
194
free(dexy); free(dexz); free(deyz);
205
/*} end non-UHF routines */
207
exit(PSI_RETURN_SUCCESS);
214
char *prgid = "OEPROP";