~ubuntu-branches/ubuntu/karmic/psicode/karmic

« back to all changes in this revision

Viewing changes to src/bin/cceom/FSD.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
 
   to a Sigma vector stored at Sigma plus 'i' */
8
 
 
9
 
void FSD(int i, int C_irr) {
10
 
  dpdfile2 Fme, FME;
11
 
  dpdfile2 SIA, Sia;
12
 
  dpdbuf4 CMNEF, Cmnef, CMnEf, CmNeF;
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
 
    dpd_file2_init(&FME, CC_OEI, H_IRR, 0, 1, "FME");
19
 
    dpd_buf4_init(&CMnEf, EOM_TMP, C_irr, 0, 5, 0, 5, 0, "2CMnEf - CMnfE");
20
 
    dpd_dot24(&FME,&CMnEf,&SIA, 0, 0, 1.0, 1.0);
21
 
    dpd_buf4_close(&CMnEf);
22
 
    dpd_file2_close(&FME);
23
 
    dpd_file2_close(&SIA);
24
 
  }
25
 
 
26
 
  else if (params.eom_ref == 1) { /* ROHF */
27
 
    sprintf(lbl, "%s %d", "SIA", i);
28
 
    dpd_file2_init(&SIA, EOM_SIA, C_irr, 0, 1, lbl);
29
 
    sprintf(lbl, "%s %d", "Sia", i);
30
 
    dpd_file2_init(&Sia, EOM_Sia, C_irr, 0, 1, lbl);
31
 
 
32
 
    /* SIA += FME*CIMAE + Fme*CImAe */
33
 
    dpd_file2_init(&FME, CC_OEI, H_IRR, 0, 1, "FME");
34
 
    sprintf(lbl, "%s %d", "CMNEF", i);
35
 
    dpd_buf4_init(&CMNEF, EOM_CMNEF, C_irr, 0, 5, 2, 7, 0, lbl);
36
 
    dpd_dot24(&FME,&CMNEF,&SIA, 0, 0, 1.0, 1.0);
37
 
    dpd_buf4_close(&CMNEF);
38
 
    dpd_file2_close(&FME);
39
 
 
40
 
    dpd_file2_init(&Fme, CC_OEI, H_IRR, 0, 1, "Fme");
41
 
    sprintf(lbl, "%s %d", "CMnEf", i);
42
 
    dpd_buf4_init(&CMnEf, EOM_CMnEf, C_irr, 0, 5, 0, 5, 0, lbl);
43
 
    dpd_dot24(&Fme,&CMnEf,&SIA, 0, 0, 1.0, 1.0);
44
 
    dpd_buf4_close(&CMnEf);
45
 
    dpd_file2_close(&Fme);
46
 
 
47
 
    /* Sia += Fme*Cimae + FME*CiMaE */
48
 
    dpd_file2_init(&Fme, CC_OEI, H_IRR, 0, 1, "Fme");
49
 
    sprintf(lbl, "%s %d", "Cmnef", i);
50
 
    dpd_buf4_init(&Cmnef, EOM_Cmnef, C_irr, 0, 5, 2, 7, 0, lbl);
51
 
    dpd_dot24(&Fme,&Cmnef,&Sia, 0, 0, 1.0, 1.0);
52
 
    dpd_buf4_close(&Cmnef);
53
 
    dpd_file2_close(&Fme);
54
 
 
55
 
    dpd_file2_init(&FME, CC_OEI, H_IRR, 0, 1, "FME");
56
 
    dpd_buf4_init(&CmNeF, EOM_TMP, C_irr, 0, 5, 0, 5, 0, "CmNeF");
57
 
    dpd_dot24(&FME,&CmNeF,&Sia, 0, 0, 1.0, 1.0);
58
 
    dpd_buf4_close(&CmNeF);
59
 
    dpd_file2_close(&FME);
60
 
 
61
 
    dpd_file2_close(&Sia);
62
 
    dpd_file2_close(&SIA);
63
 
  }
64
 
 
65
 
  else { /* UHF */
66
 
 
67
 
    sprintf(lbl, "%s %d", "SIA", i);
68
 
    dpd_file2_init(&SIA, EOM_SIA, C_irr, 0, 1, lbl);
69
 
    sprintf(lbl, "%s %d", "Sia", i);
70
 
    dpd_file2_init(&Sia, EOM_Sia, C_irr, 2, 3, lbl);
71
 
 
72
 
    /* SIA += FME*CIMAE + Fme*CImAe */
73
 
    dpd_file2_init(&FME, CC_OEI, H_IRR, 0, 1, "FME");
74
 
    sprintf(lbl, "%s %d", "CMNEF", i);
75
 
    dpd_buf4_init(&CMNEF, EOM_CMNEF, C_irr, 0, 5, 2, 7, 0, lbl);
76
 
    dpd_dot24(&FME,&CMNEF,&SIA, 0, 0, 1.0, 1.0);
77
 
    dpd_buf4_close(&CMNEF);
78
 
    dpd_file2_close(&FME);
79
 
 
80
 
    dpd_file2_init(&Fme, CC_OEI, H_IRR, 2, 3, "Fme");
81
 
    sprintf(lbl, "%s %d", "CMnEf", i);
82
 
    dpd_buf4_init(&CMnEf, EOM_CMnEf, C_irr, 22, 28, 22, 28, 0, lbl);
83
 
    dpd_dot24(&Fme,&CMnEf,&SIA, 0, 0, 1.0, 1.0);
84
 
    dpd_buf4_close(&CMnEf);
85
 
    dpd_file2_close(&Fme);
86
 
 
87
 
    /* Sia += Fme*Cimae + FME*CiMaE */
88
 
    dpd_file2_init(&Fme, CC_OEI, H_IRR, 2, 3, "Fme");
89
 
    sprintf(lbl, "%s %d", "Cmnef", i);
90
 
    dpd_buf4_init(&Cmnef, EOM_Cmnef, C_irr, 10, 15, 12, 17, 0, lbl);
91
 
    dpd_dot24(&Fme,&Cmnef,&Sia, 0, 0, 1.0, 1.0);
92
 
    dpd_buf4_close(&Cmnef);
93
 
    dpd_file2_close(&Fme);
94
 
 
95
 
    dpd_file2_init(&FME, CC_OEI, H_IRR, 0, 1, "FME");
96
 
    dpd_buf4_init(&CmNeF, EOM_TMP, C_irr, 23, 29, 23, 29, 0, "CmNeF");
97
 
    dpd_dot24(&FME,&CmNeF,&Sia, 0, 0, 1.0, 1.0);
98
 
    dpd_buf4_close(&CmNeF);
99
 
    dpd_file2_close(&FME);
100
 
 
101
 
    dpd_file2_close(&Sia);
102
 
    dpd_file2_close(&SIA);
103
 
  }
104
 
 
105
 
#ifdef EOM_DEBUG
106
 
  check_sum("FSD    ",i,C_irr);
107
 
#endif
108
 
 
109
 
  return;
110
 
}