~ubuntu-branches/ubuntu/vivid/psicode/vivid

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Michael Banck, Michael Banck, Daniel Leidert
  • Date: 2009-02-23 00:12:02 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090223001202-rutldoy3dimfpesc
Tags: 3.4.0-1
* New upstream release.

[ Michael Banck ]
* debian/patches/01_DESTDIR.dpatch: Refreshed.
* debian/patches/02_FHS.dpatch: Removed, applied upstream.
* debian/patches/03_debian_docdir: Likewise.
* debian/patches/04_man.dpatch: Likewise.
* debian/patches/06_466828_fix_gcc_43_ftbfs.dpatch: Likewise.
* debian/patches/07_464867_move_executables: Fixed and refreshed.
* debian/patches/00list: Adjusted.
* debian/control: Improved description.
* debian/patches-held: Removed.
* debian/rules (install/psi3): Do not ship the ruby bindings for now.

[ Daniel Leidert ]
* debian/rules: Fix txtdir via DEB_MAKE_INSTALL_TARGET.
* debian/patches/01_DESTDIR.dpatch: Refreshed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include <stdio.h>
2
 
#include <math.h>
3
 
#define EXTERN
4
 
#include "globals.h"
5
 
 
6
 
/* This function computes the H-bar singles-doubles block contribution
7
 
   of Wmnie to a Sigma vector stored at Sigma plus 'i' */
8
 
 
9
 
void WmnieSD(int i, int C_irr) {
10
 
  dpdfile2 SIA, Sia;
11
 
  dpdbuf4 CMNEF, Cmnef, CMnEf, CmNeF;
12
 
  dpdbuf4 WMNIE, Wmnie, WMnIe, WmNiE;
13
 
  char lbl[32];
14
 
 
15
 
  if (params.eom_ref == 0) { /* RHF */
16
 
    sprintf(lbl, "%s %d", "SIA", i);
17
 
    dpd_file2_init(&SIA, EOM_SIA, C_irr, 0, 1, lbl);
18
 
    sprintf(lbl, "%s %d", "CMnEf", i);
19
 
    dpd_buf4_init(&CMnEf, EOM_CMnEf, C_irr, 0, 5, 0, 5, 0, lbl);
20
 
    dpd_buf4_init(&WMnIe, CC_HBAR, H_IRR, 0, 11, 0, 11, 0, "WMnIe - 2WnMIe (Mn,eI)");
21
 
    /* dpd_buf4_print(&WMnIe,outfile,1);
22
 
       dpd_buf4_print(&CMnEf,outfile,1);
23
 
       fprintf(stdout,"starting Wmnie*CMNEF ->SIA\n");
24
 
       fprintf(outfile,"starting Wmnie*CMNEF ->SIA\n"); */
25
 
    dpd_contract442(&WMnIe, &CMnEf, &SIA, 3, 3, 1.0, 1.0);
26
 
    dpd_buf4_close(&CMnEf);
27
 
    dpd_buf4_close(&WMnIe);
28
 
    dpd_file2_close(&SIA);
29
 
  }
30
 
 
31
 
  else if (params.eom_ref == 1) { /* ROHF */
32
 
    sprintf(lbl, "%s %d", "SIA", i);
33
 
    dpd_file2_init(&SIA, EOM_SIA, C_irr, 0, 1, lbl);
34
 
    sprintf(lbl, "%s %d", "Sia", i);
35
 
    dpd_file2_init(&Sia, EOM_Sia, C_irr, 0, 1, lbl);
36
 
 
37
 
    /* SIA += 0.5 WMNIE * CMNAE + WMnIe * CMnAe */
38
 
    dpd_buf4_init(&WMNIE, CC_HBAR, H_IRR, 2, 11, 2, 11, 0, "WMNIE (M>N,EI)");
39
 
    sprintf(lbl, "%s %d", "CMNEF", i);
40
 
    dpd_buf4_init(&CMNEF, EOM_CMNEF, C_irr, 2, 5, 2, 7, 0, lbl);
41
 
    dpd_contract442(&WMNIE, &CMNEF, &SIA, 3, 3, 1.0, 1.0);
42
 
    dpd_buf4_close(&CMNEF);
43
 
    dpd_buf4_close(&WMNIE);
44
 
 
45
 
    dpd_buf4_init(&WMnIe, CC_HBAR, H_IRR, 0, 11, 0, 11, 0, "WMnIe (Mn,eI)");
46
 
    dpd_buf4_init(&CMnEf, EOM_TMP, C_irr, 0, 5, 0, 5, 0, "CMnfE");
47
 
    dpd_contract442(&WMnIe, &CMnEf, &SIA, 3, 3, -1.0, 1.0);
48
 
    dpd_buf4_close(&CMnEf);
49
 
    dpd_buf4_close(&WMnIe);
50
 
 
51
 
    /* Sia += 0.5 Wmnie * Cmnae + Wmnie * Cmnae */
52
 
    dpd_buf4_init(&Wmnie, CC_HBAR, H_IRR, 2, 11, 2, 11, 0, "Wmnie (m>n,ei)");
53
 
    sprintf(lbl, "%s %d", "Cmnef", i);
54
 
    dpd_buf4_init(&Cmnef, EOM_Cmnef, C_irr, 2, 5, 2, 7, 0, lbl);
55
 
    dpd_contract442(&Wmnie, &Cmnef, &Sia, 3, 3, 1.0, 1.0);
56
 
    dpd_buf4_close(&Cmnef);
57
 
    dpd_buf4_close(&Wmnie);
58
 
 
59
 
    dpd_buf4_init(&WmNiE, CC_HBAR, H_IRR, 0, 11, 0, 11, 0, "WmNiE (mN,Ei)");
60
 
    dpd_buf4_init(&CMnEf, EOM_TMP, C_irr, 0, 5, 0, 5, 0, "CnMEf");
61
 
    dpd_contract442(&WmNiE, &CMnEf, &Sia, 3, 3, -1.0, 1.0);
62
 
    dpd_buf4_close(&CMnEf);
63
 
    dpd_buf4_close(&WmNiE);
64
 
 
65
 
    dpd_file2_close(&SIA);
66
 
    dpd_file2_close(&Sia);
67
 
  }
68
 
 
69
 
  else { /* UHF */
70
 
    sprintf(lbl, "%s %d", "SIA", i);
71
 
    dpd_file2_init(&SIA, EOM_SIA, C_irr, 0, 1, lbl);
72
 
    sprintf(lbl, "%s %d", "Sia", i);
73
 
    dpd_file2_init(&Sia, EOM_Sia, C_irr, 2, 3, lbl);
74
 
 
75
 
    /* SIA += 0.5 WMNIE * CMNAE + WMnIe * CMnAe */
76
 
    dpd_buf4_init(&WMNIE, CC_HBAR, H_IRR, 2, 21, 2, 21, 0, "WMNIE (M>N,EI)");
77
 
    sprintf(lbl, "%s %d", "CMNEF", i);
78
 
    dpd_buf4_init(&CMNEF, EOM_CMNEF, C_irr, 2, 5, 2, 7, 0, lbl);
79
 
    dpd_contract442(&WMNIE, &CMNEF, &SIA, 3, 3, 1.0, 1.0);
80
 
    dpd_buf4_close(&CMNEF);
81
 
    dpd_buf4_close(&WMNIE);
82
 
 
83
 
    dpd_buf4_init(&WMnIe, CC_HBAR, H_IRR, 22, 25, 22, 25, 0, "WMnIe (Mn,eI)");
84
 
    dpd_buf4_init(&CMnEf, EOM_TMP, C_irr, 22, 29, 22, 29, 0, "CMnfE");
85
 
    dpd_contract442(&WMnIe, &CMnEf, &SIA, 3, 3, -1.0, 1.0);
86
 
    dpd_buf4_close(&CMnEf);
87
 
    dpd_buf4_close(&WMnIe);
88
 
 
89
 
    /* Sia += 0.5 Wmnie * Cmnae + Wmnie * Cmnae */
90
 
    dpd_buf4_init(&Wmnie, CC_HBAR, H_IRR, 12, 31, 12, 31, 0, "Wmnie (m>n,ei)");
91
 
    sprintf(lbl, "%s %d", "Cmnef", i);
92
 
    dpd_buf4_init(&Cmnef, EOM_Cmnef, C_irr, 12, 15, 12, 17, 0, lbl);
93
 
    dpd_contract442(&Wmnie, &Cmnef, &Sia, 3, 3, 1.0, 1.0);
94
 
    dpd_buf4_close(&Cmnef);
95
 
    dpd_buf4_close(&Wmnie);
96
 
 
97
 
    dpd_buf4_init(&WmNiE, CC_HBAR, H_IRR, 23, 26, 23, 26, 0, "WmNiE (mN,Ei)");
98
 
    dpd_buf4_init(&CMnEf, EOM_TMP, C_irr, 23, 28, 23, 28, 0, "CnMEf");
99
 
    dpd_contract442(&WmNiE, &CMnEf, &Sia, 3, 3, -1.0, 1.0);
100
 
    dpd_buf4_close(&CMnEf);
101
 
    dpd_buf4_close(&WmNiE);
102
 
 
103
 
    dpd_file2_close(&SIA);
104
 
    dpd_file2_close(&Sia);
105
 
  }
106
 
 
107
 
#ifdef EOM_DEBUG
108
 
  check_sum("WmnieSD",i,C_irr);
109
 
#endif
110
 
  return;
111
 
}
112