~ubuntu-branches/ubuntu/quantal/psicode/quantal

« back to all changes in this revision

Viewing changes to src/bin/cclambda/cc2_Gai.cc

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