11
extern int *correlate(char *ptgroup, int irrep, int *nirreps_ref, int *nirreps);
11
13
void read_chkpt_geom()
15
int i, j, errcod, disp_irrep, *correlation, *clsdpi_ref, *clsdpi, mm;
16
int atom, nirreps_ref, nirreps, h, *openpi, *openpi_ref;
17
int nso, nmo, h_ref, cnt, *cnt_orb_irr, *orbspi, *orbspi_ref, *orbs_off_ref, *so_off;
18
int ref, *sopi, *sopi_ref, *orbs_off;
19
double Z = 0.0, **scf, **scf_col, **scf_ref, escf_ref;
21
char *atom_label, *ptgrp_ref, *save_prefix;
23
/*** read geometry with Zvals from chkpt file */
19
24
chkpt_init(PSIO_OPEN_OLD);
20
25
num_atoms = chkpt_rd_natom();
21
26
num_allatoms = chkpt_rd_nallatom();
23
28
punt("GEOMETRY in the checkpoint file is empty!");
24
29
else if (num_atoms > MAXATOM)
25
30
punt("There are more atoms than allowed!");
27
/* Grab subgroup and get rid of a possible blank */
28
subgroup = chkpt_rd_sym_label();
29
if (subgroup[2] == ' ') subgroup[2] = '\0';
31
31
full_geom = chkpt_rd_fgeom();
32
32
geometry = (double **) malloc(num_atoms*sizeof(double *));
33
33
atom_dummy = chkpt_rd_atom_dummy();
40
40
nuclear_charges = chkpt_rd_zvals();
41
41
full_element = chkpt_rd_felement();
42
/* Grab subgroup and get rid of a possible blank
43
subgroup = chkpt_rd_sym_label();
44
if (subgroup[2] == ' ') subgroup[2] = '\0';
47
/* these are set by optking */
48
disp_irrep = chkpt_rd_disp_irrep();
49
save_prefix = chkpt_rd_prefix();
51
/*** read symmetry info and MOs for undisplaced geometry from
52
root section of checkpoint file ***/
54
chkpt_commit_prefix();
56
ptgrp_ref = chkpt_rd_sym_label();
57
clsdpi_ref = chkpt_rd_clsdpi(); /*closed MOs per irrep*/
58
openpi_ref = chkpt_rd_openpi(); /*open MOs per irrep*/
60
/* Lookup irrep correlation table */
61
correlation = correlate(ptgrp_ref, disp_irrep, &nirreps_ref, &nirreps);
64
fprintf(outfile,"Reference point group is %s.\n", ptgrp_ref);
66
fprintf(outfile,"Irrep of this displacement is %d.\n", disp_irrep);
67
fprintf(outfile,"Irrep correlation:");
68
for (i=0; i<nirreps_ref; ++i)
69
fprintf(outfile," %d",correlation[i]);
70
fprintf(outfile,"\n");
73
/* build orbital information for current point group */
74
clsdpi = init_int_array(nirreps);
75
openpi = init_int_array(nirreps);
76
for (h=0; h < nirreps_ref; ++h) {
77
clsdpi[ correlation[h] ] += clsdpi_ref[h];
78
openpi[ correlation[h] ] += openpi_ref[h];
81
chkpt_set_prefix(save_prefix);
82
chkpt_commit_prefix();
85
/* write orbital information to chkpt file */
86
chkpt_wt_nirreps(nirreps);
87
chkpt_wt_clsdpi(clsdpi);
88
chkpt_wt_openpi(openpi);
91
fprintf(outfile,"clsdpi");
92
for (h=0; h < nirreps; ++h)
93
fprintf(outfile, " %d",clsdpi[h]);
94
fprintf(outfile,"\n");
95
fprintf(outfile,"openpi");
96
for (h=0; h < nirreps; ++h)
97
fprintf(outfile, " %d",openpi[h]);
98
fprintf(outfile,"\n");
99
fprintf(outfile,"orbspi");
100
for (h=0; h < nirreps; ++h)
101
fprintf(outfile, " %d",orbspi[h]);
102
fprintf(outfile,"\n");
107
free(clsdpi); free(clsdpi_ref);
108
free(openpi); free(openpi_ref);
44
110
element = (char **) malloc(sizeof(char *)*num_atoms);
45
111
elemsymb_charges = init_array(num_atoms);
46
112
for(i=0;i<num_atoms;i++) {