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

« back to all changes in this revision

Viewing changes to src/bin/cclambda/cc2_Gai.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 <libdpd/dpd.h>
3
 
#define EXTERN
4
 
#include "globals.h"
5
 
 
6
 
void cc2_Gai_build(int L_irr) {
7
 
  dpdbuf4 tIJAB, tijab, tiJaB, tIjAb, tijAB, tIJab, t2;
8
 
  dpdfile2 G, GAI, Gai, L1, LIA, Lia;
9
 
  dpdbuf4 LIJAB, Lijab, LIjAb, LiJaB;
10
 
 
11
 
    if(params.ref == 0) {
12
 
      dpd_file2_init(&G, CC_TMP0, L_irr, 1, 0, "CC2 GAI");
13
 
 
14
 
      dpd_file2_init(&L1, CC_LAMBDA, L_irr, 0, 1, "LIA");
15
 
      dpd_buf4_init(&t2, CC_TAMPS, 0, 10, 10, 10, 10, 0, "2 tIAjb - tIBja");
16
 
      dpd_contract422(&t2, &L1, &G, 0, 1, 1, 0);
17
 
      dpd_buf4_close(&t2);
18
 
      dpd_file2_close(&L1);
19
 
 
20
 
      dpd_file2_close(&G);
21
 
    }
22
 
 
23
 
    else if(params.ref == 1) { /** ROHF **/
24
 
 
25
 
      dpd_file2_init(&G, CC_TMP0, L_irr, 1, 0, "GAI");
26
 
      dpd_file2_init(&G, CC_TMP0, L_irr, 4, 3, "Gai");
27
 
 
28
 
      /* T2(MJ,AB) * L2(IJ,AB) --> G(M,I) */
29
 
      dpd_buf4_init(&tIJAB, CC_TAMPS, 0, 0, 7, 2, 7, 0, "tIJAB");
30
 
      dpd_buf4_init(&LIJAB, CC_LAMBDA, L_irr, 0, 7, 2, 7, 0, "LIJAB");
31
 
      dpd_contract442(&tIJAB, &LIJAB, &G, 0, 0, 1.0, 0.0);
32
 
      dpd_buf4_close(&tIJAB);
33
 
      dpd_buf4_close(&LIJAB);  
34
 
 
35
 
      /* T2(Mj,Ab) * L2(Ij,Ab) --> G(M,I) */
36
 
      dpd_buf4_init(&tIjAb, CC_TAMPS, 0, 0, 5, 0, 5, 0, "tIjAb");
37
 
      dpd_buf4_init(&LIjAb, CC_LAMBDA, L_irr, 0, 5, 0, 5, 0, "LIjAb");
38
 
      dpd_contract442(&tIjAb, &LIjAb, &G, 0, 0, 1.0, 1.0);
39
 
      dpd_buf4_close(&tIjAb);
40
 
      dpd_buf4_close(&LIjAb);
41
 
 
42
 
      /* T2(mj,ab) * L2(ij,ab) --> G(m,i) */
43
 
      dpd_buf4_init(&tijab, CC_TAMPS, 0, 0, 7, 2, 7, 0, "tijab");
44
 
      dpd_buf4_init(&Lijab, CC_LAMBDA, L_irr, 0, 7, 2, 7, 0, "Lijab");
45
 
      dpd_contract442(&tijab, &Lijab, &G, 0, 0, 1.0, 0.0);
46
 
      dpd_buf4_close(&tijab);
47
 
      dpd_buf4_close(&Lijab); 
48
 
 
49
 
      /* T2(mJ,aB) * L2(iJ,aB) --> G(m,i) */
50
 
      dpd_buf4_init(&tiJaB, CC_TAMPS, 0, 0, 5, 0, 5, 0, "tiJaB");
51
 
      dpd_buf4_init(&LiJaB, CC_LAMBDA, L_irr, 0, 5, 0, 5, 0, "LiJaB");
52
 
      dpd_contract442(&tiJaB, &LiJaB, &G, 0, 0, 1.0, 1.0);
53
 
      dpd_buf4_close(&tiJaB);
54
 
      dpd_buf4_close(&LiJaB);
55
 
 
56
 
      dpd_file2_close(&G);
57
 
      dpd_file2_close(&G);
58
 
    }
59
 
 
60
 
    else if(params.ref == 2) { /** UHF **/
61
 
 
62
 
      dpd_file2_init(&GAI, CC_TMP0, L_irr, 1, 0, "CC2 GAI");
63
 
      dpd_file2_init(&Gai, CC_TMP0, L_irr, 3, 2, "CC2 Gai");
64
 
 
65
 
      /** AA **/
66
 
      dpd_buf4_init(&tIJAB, CC_TAMPS, 0, 20, 20, 20, 20, 0, "tIAJB");
67
 
      dpd_file2_init(&LIA, CC_LAMBDA, L_irr, 0, 1, "LIA");
68
 
      dpd_contract422(&tIJAB, &LIA, &GAI, 0, 1, 1, 0);
69
 
      dpd_file2_close(&LIA);
70
 
      dpd_buf4_close(&tIJAB);
71
 
 
72
 
      dpd_buf4_init(&tIjAb, CC_TAMPS, 0, 20, 30, 20, 30, 0, "tIAjb");
73
 
      dpd_file2_init(&Lia, CC_LAMBDA, L_irr, 2, 3, "Lia");
74
 
      dpd_contract422(&tIjAb, &Lia, &GAI, 0, 1, 1, 1);
75
 
      dpd_file2_close(&Lia);
76
 
      dpd_buf4_close(&tIjAb);
77
 
 
78
 
      /** BB **/
79
 
      dpd_buf4_init(&tijab, CC_TAMPS, 0, 30, 30, 30, 30, 0, "tiajb");
80
 
      dpd_file2_init(&Lia, CC_LAMBDA, L_irr, 2, 3, "Lia");
81
 
      dpd_contract422(&tijab, &Lia, &Gai, 0, 1, 1, 0);
82
 
      dpd_file2_close(&Lia);
83
 
      dpd_buf4_close(&tijab);
84
 
 
85
 
      dpd_buf4_init(&tiJaB, CC_TAMPS, 0, 30, 20, 30, 20, 0, "tiaJB");
86
 
      dpd_file2_init(&LIA, CC_LAMBDA, L_irr, 0, 1, "LIA");
87
 
      dpd_contract422(&tiJaB, &LIA, &Gai, 0, 1, 1, 1);
88
 
      dpd_file2_close(&LIA);
89
 
      dpd_buf4_close(&tiJaB);
90
 
 
91
 
      dpd_file2_close(&Gai);
92
 
      dpd_file2_close(&GAI);
93
 
    }
94
 
 
95
 
  return;
96
 
}
97
 
 
98