28
28
int nvector=8; /* Number of error vectors to keep */
30
int row, col, word, p, q;
30
int row, col, word, t1_word, p, q;
32
32
int vector_length=0;
72
72
dpd_file2_mat_close(&T1b);
73
73
dpd_file2_close(&T1b);
75
76
dpd_buf4_init(&T2a, CC_TAMPS, 0, 0, 5, 0, 5, 0, "New tIjAb");
77
for(h=0; h < nirreps; h++) {
78
dpd_buf4_mat_irrep_init(&T2a, h);
79
dpd_buf4_mat_irrep_rd(&T2a, h);
80
for(row=0; row < T2a.params->rowtot[h]; row++)
81
for(col=0; col < T2a.params->coltot[h]; col++)
82
error[0][word++] = T2a.matrix[h][row][col];
83
dpd_buf4_mat_irrep_close(&T2a, h);
76
88
dpd_buf4_init(&T2b, CC_TAMPS, 0, 0, 5, 0, 5, 0, "tIjAb");
77
89
for(h=0; h < nirreps; h++) {
78
dpd_buf4_mat_irrep_init(&T2a, h);
79
dpd_buf4_mat_irrep_rd(&T2a, h);
80
90
dpd_buf4_mat_irrep_init(&T2b, h);
81
91
dpd_buf4_mat_irrep_rd(&T2b, h);
82
for(row=0; row < T2a.params->rowtot[h]; row++)
83
for(col=0; col < T2a.params->coltot[h]; col++)
84
error[0][word++] = T2a.matrix[h][row][col] - T2b.matrix[h][row][col];
85
dpd_buf4_mat_irrep_close(&T2a, h);
92
for(row=0; row < T2b.params->rowtot[h]; row++)
93
for(col=0; col < T2b.params->coltot[h]; col++)
94
error[0][word++] -= T2b.matrix[h][row][col];
86
95
dpd_buf4_mat_irrep_close(&T2b, h);
89
97
dpd_buf4_close(&T2b);
91
99
start = psio_get_address(PSIO_ZERO, diis_cycle*vector_length*sizeof(double));