~ubuntu-branches/ubuntu/intrepid/psicode/intrepid

« back to all changes in this revision

Viewing changes to src/bin/cceom/form_diagonal.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Banck
  • Date: 2008-06-07 16:49:57 UTC
  • mfrom: (2.1.2 hardy)
  • Revision ID: james.westby@ubuntu.com-20080607164957-8pifvb133yjlkagn
Tags: 3.3.0-3
* debian/rules (DEB_MAKE_CHECK_TARGET): Do not abort test suite on
  failures.
* debian/rules (DEB_CONFIGURE_EXTRA_FLAGS): Set ${bindir} to /usr/lib/psi.
* debian/rules (install/psi3): Move psi3 file to /usr/bin.
* debian/patches/07_464867_move_executables.dpatch: New patch, add
  /usr/lib/psi to the $PATH, so that the moved executables are found.
  (closes: #464867)
* debian/patches/00list: Adjusted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
  nirreps = moinfo.nirreps;
18
18
  openpi = moinfo.openpi;
19
19
 
20
 
  if ((params.eom_ref == 0) || (params.eom_ref == 1)) { /* RHF or ROHF */
 
20
  if(params.eom_ref == 0) { /** RHF **/
 
21
    occpi = moinfo.occpi;
 
22
    virtpi = moinfo.virtpi;
 
23
    occ_off = moinfo.occ_off;
 
24
    vir_off = moinfo.vir_off;
 
25
    occ_sym = moinfo.occ_sym;
 
26
    vir_sym = moinfo.vir_sym;
 
27
 
 
28
    dpd_file2_init(&FAE, CC_OEI, H_IRR, 1, 1, "FAE");
 
29
    dpd_file2_init(&FMI, CC_OEI, H_IRR, 0, 0, "FMI");
 
30
    dpd_file2_mat_init(&FAE);
 
31
    dpd_file2_mat_init(&FMI);
 
32
    dpd_file2_mat_rd(&FAE);
 
33
    dpd_file2_mat_rd(&FMI);
 
34
 
 
35
    dpd_file2_init(&DIA, EOM_D, C_irr, 0, 1, "DIA");
 
36
    dpd_file2_mat_init(&DIA);
 
37
    for(h=0; h < nirreps; h++) {
 
38
      for(i=0; i < occpi[h]; i++)
 
39
        for(a=0; a < virtpi[h^C_irr]; a++)
 
40
          DIA.matrix[h][i][a] = FAE.matrix[h^C_irr][a][a] - FMI.matrix[h][i][i];
 
41
    }
 
42
    dpd_file2_mat_wrt(&DIA);
 
43
    dpd_file2_close(&DIA);
 
44
 
 
45
    dpd_buf4_init(&DIjAb, EOM_D, C_irr, 0, 5, 0, 5, 0, "DIjAb");
 
46
    for(h=0; h < nirreps; h++) {
 
47
      dpd_buf4_mat_irrep_init(&DIjAb, h);
 
48
      for(ij=0; ij < DIjAb.params->rowtot[h]; ij++) {
 
49
        i = DIjAb.params->roworb[h][ij][0];
 
50
        j = DIjAb.params->roworb[h][ij][1];
 
51
        isym = DIjAb.params->psym[i];
 
52
        jsym = DIjAb.params->qsym[j];
 
53
        I = i - occ_off[isym];
 
54
        J = j - occ_off[jsym];
 
55
        for(ab=0; ab < DIjAb.params->coltot[h^C_irr]; ab++) {
 
56
          a = DIjAb.params->colorb[h^C_irr][ab][0];
 
57
          b = DIjAb.params->colorb[h^C_irr][ab][1];
 
58
          asym = DIjAb.params->rsym[a];
 
59
          bsym = DIjAb.params->ssym[b];
 
60
          A = a - vir_off[asym];
 
61
          B = b - vir_off[bsym];
 
62
          DIjAb.matrix[h][ij][ab] = FAE.matrix[asym][A][A] + FAE.matrix[bsym][B][B]
 
63
            - FMI.matrix[isym][I][I] - FMI.matrix[jsym][J][J];
 
64
        }
 
65
      }
 
66
      dpd_buf4_mat_irrep_wrt(&DIjAb, h);
 
67
      dpd_buf4_mat_irrep_close(&DIjAb, h);
 
68
    }
 
69
    dpd_buf4_close(&DIjAb);
 
70
 
 
71
    dpd_file2_mat_close(&FMI);
 
72
    dpd_file2_mat_close(&FAE);
 
73
    dpd_file2_close(&FMI);
 
74
    dpd_file2_close(&FAE);
 
75
  }
 
76
  else if (params.eom_ref == 1) { /* ROHF */
21
77
    occpi = moinfo.occpi;
22
78
    virtpi = moinfo.virtpi;
23
79
    occ_off = moinfo.occ_off;
148
204
    }
149
205
    dpd_buf4_close(&DIjAb);
150
206
 
 
207
    dpd_file2_mat_close(&FMI);
 
208
    dpd_file2_mat_close(&Fmi);
 
209
    dpd_file2_mat_close(&FAE);
 
210
    dpd_file2_mat_close(&Fae);
151
211
    dpd_file2_close(&FMI);
152
212
    dpd_file2_close(&Fmi);
153
213
    dpd_file2_close(&Fae);