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

« back to all changes in this revision

Viewing changes to src/bin/ccenergy/cc2_faeT2.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:
 
1
#include <stdio.h>
 
2
#include <stdlib.h>
 
3
#include <libdpd/dpd.h>
 
4
#define EXTERN
 
5
#include "globals.h"
 
6
 
 
7
void cc2_faeT2(void) {
 
8
 
 
9
  dpdfile2 fme, fME, Fae, FAE, fAE, tIA, tia;
 
10
  dpdbuf4 tIjAb, tIJAB, tijab, t2;
 
11
  dpdbuf4 newtIjAb, newtIJAB, newtijab;
 
12
  dpdbuf4 Zijab;
 
13
 
 
14
  if(params.ref == 0) { /** RHF **/
 
15
    dpd_file2_init(&fAE, CC_OEI, 0, 1, 1, "fAB");
 
16
 
 
17
    dpd_buf4_init(&Zijab, CC_TMP0, 0, 0, 5, 0, 5, 0, "CC2 ZIjAb");
 
18
    dpd_buf4_init(&tIjAb, CC_TAMPS, 0, 0, 5, 0, 5, 0, "tIjAb");
 
19
    dpd_contract424(&tIjAb, &fAE, &Zijab, 3, 1, 0, 1, 0);
 
20
    dpd_buf4_close(&tIjAb);
 
21
    dpd_buf4_init(&newtIjAb, CC_TAMPS, 0, 0, 5, 0, 5, 0, "New tIjAb");
 
22
    dpd_buf4_axpy(&Zijab, &newtIjAb, 1);
 
23
    dpd_buf4_close(&newtIjAb);
 
24
    dpd_buf4_sort_axpy(&Zijab, CC_TAMPS, qpsr, 0, 5, "New tIjAb", 1);
 
25
    dpd_buf4_close(&Zijab);
 
26
 
 
27
    dpd_file2_close(&fAE);
 
28
  }
 
29
  else if(params.ref == 1) { /** ROHF **/
 
30
 
 
31
    dpd_file2_init(&tIA, CC_OEI, 0, 0, 1, "tIA");
 
32
    dpd_file2_init(&fME, CC_OEI, 0, 0, 1, "fIA");
 
33
    dpd_file2_init(&FAE, CC2_HET1, 0, 1, 1, "CC2 FAE");
 
34
    dpd_contract222(&tIA, &fME, &FAE, 1, 1, -1, 0);
 
35
    dpd_file2_close(&FAE);  
 
36
    dpd_file2_close(&fME);  
 
37
    dpd_file2_close(&tIA);
 
38
 
 
39
    dpd_file2_init(&tia, CC_OEI, 0, 0, 1, "tia");
 
40
    dpd_file2_init(&fme, CC_OEI, 0, 0, 1, "fia");
 
41
    dpd_file2_init(&Fae, CC2_HET1, 0, 1, 1, "CC2 Fae");
 
42
    dpd_contract222(&tia, &fme, &Fae, 1, 1, -1, 0);
 
43
    dpd_file2_close(&Fae);
 
44
    dpd_file2_close(&fme);
 
45
    dpd_file2_close(&tia);
 
46
 
 
47
    /** F -> tijab **/
 
48
    dpd_file2_init(&FAE, CC2_HET1, 0, 1, 1, "CC2 FAE");
 
49
    dpd_file2_init(&Fae, CC2_HET1, 0, 1, 1, "CC2 Fae");
 
50
 
 
51
    /*** AA ***/
 
52
    dpd_buf4_init(&tIJAB, CC_TAMPS, 0, 2, 5, 2, 7, 0, "tIJAB");
 
53
    dpd_buf4_init(&t2, CC_TMP0, 0, 2, 5, 2, 5, 0, "T (I>J,AB)");
 
54
    dpd_contract424(&tIJAB, &FAE, &t2, 3, 1, 0, 1, 0);
 
55
    dpd_contract244(&FAE, &tIJAB, &t2, 1, 2, 1, 1, 1);
 
56
    dpd_buf4_init(&newtIJAB, CC_TAMPS, 0, 2, 5, 2, 7, 0, "New tIJAB");
 
57
    dpd_buf4_axpy(&t2, &newtIJAB, 1);
 
58
    dpd_buf4_close(&newtIJAB);
 
59
    dpd_buf4_close(&t2);
 
60
    dpd_buf4_close(&tIJAB);
 
61
 
 
62
    /*** BB ***/
 
63
    dpd_buf4_init(&tijab, CC_TAMPS, 0, 2, 5, 2, 7, 0, "tijab");
 
64
    dpd_buf4_init(&t2, CC_TMP0, 0, 2, 5, 2, 5, 0, "T (I>J,AB)");
 
65
    dpd_contract424(&tijab, &Fae, &t2, 3, 1, 0, 1, 0);
 
66
    dpd_contract244(&Fae, &tijab, &t2, 1, 2, 1, 1, 1);
 
67
    dpd_buf4_init(&newtijab, CC_TAMPS, 0, 2, 5, 2, 7, 0, "New tijab");
 
68
    dpd_buf4_axpy(&t2, &newtijab, 1);
 
69
    dpd_buf4_close(&newtijab);
 
70
    dpd_buf4_close(&t2);
 
71
    dpd_buf4_close(&tijab);
 
72
 
 
73
    /*** AB ***/
 
74
    dpd_buf4_init(&tIjAb, CC_TAMPS, 0, 0, 5, 0, 5, 0, "tIjAb");
 
75
    dpd_buf4_init(&newtIjAb, CC_TAMPS, 0, 0, 5, 0, 5, 0, "New tIjAb");
 
76
    dpd_contract424(&tIjAb, &Fae, &newtIjAb, 3, 1, 0, 1, 1);
 
77
    dpd_contract244(&FAE, &tIjAb, &newtIjAb, 1, 2, 1, 1, 1);
 
78
    dpd_buf4_close(&newtIjAb);
 
79
    dpd_buf4_close(&tIjAb);
 
80
 
 
81
    dpd_file2_close(&FAE);  
 
82
    dpd_file2_close(&Fae);
 
83
  }
 
84
  else if(params.ref == 2) { /** UHF **/
 
85
 
 
86
    dpd_file2_init(&tIA, CC_OEI, 0, 0, 1, "tIA");
 
87
    dpd_file2_init(&fME, CC_OEI, 0, 0, 1, "fIA");
 
88
    dpd_file2_init(&FAE, CC2_HET1, 0, 1, 1, "CC2 FAE");
 
89
    dpd_contract222(&tIA, &fME, &FAE, 1, 1, -1, 0);
 
90
    dpd_file2_close(&FAE);  
 
91
    dpd_file2_close(&fME);  
 
92
    dpd_file2_close(&tIA);
 
93
 
 
94
    dpd_file2_init(&tia, CC_OEI, 0, 2, 3, "tia");
 
95
    dpd_file2_init(&fme, CC_OEI, 0, 2, 3, "fia");
 
96
    dpd_file2_init(&Fae, CC2_HET1, 0, 3, 3, "CC2 Fae");
 
97
    dpd_contract222(&tia, &fme, &Fae, 1, 1, -1, 0);
 
98
    dpd_file2_close(&Fae);
 
99
    dpd_file2_close(&fme);
 
100
    dpd_file2_close(&tia);
 
101
 
 
102
    /** F -> tijab **/
 
103
    dpd_file2_init(&FAE, CC2_HET1, 0, 1, 1, "CC2 FAE");
 
104
    dpd_file2_init(&Fae, CC2_HET1, 0, 3, 3, "CC2 Fae");
 
105
 
 
106
    /*** AA ***/
 
107
    dpd_buf4_init(&tIJAB, CC_TAMPS, 0, 2, 5, 2, 7, 0, "tIJAB");
 
108
    dpd_buf4_init(&t2, CC_TMP0, 0, 2, 5, 2, 5, 0, "T (I>J,AB)");
 
109
    dpd_contract424(&tIJAB, &FAE, &t2, 3, 1, 0, 1, 0);
 
110
    dpd_contract244(&FAE, &tIJAB, &t2, 1, 2, 1, 1, 1);
 
111
    dpd_buf4_close(&tIJAB);
 
112
    dpd_buf4_init(&newtIJAB, CC_TAMPS, 0, 2, 5, 2, 7, 0, "New tIJAB");
 
113
    dpd_buf4_axpy(&t2, &newtIJAB, 1);
 
114
    dpd_buf4_close(&newtIJAB);
 
115
    dpd_buf4_close(&t2);
 
116
 
 
117
    /*** BB ***/
 
118
    dpd_buf4_init(&tijab, CC_TAMPS, 0, 12, 15, 12, 17, 0, "tijab");
 
119
    dpd_buf4_init(&t2, CC_TMP0, 0, 12, 15, 12, 15, 0, "T (i>j,ab)");
 
120
    dpd_contract424(&tijab, &Fae, &t2, 3, 1, 0, 1, 0);
 
121
    dpd_contract244(&Fae, &tijab, &t2, 1, 2, 1, 1, 1);
 
122
    dpd_buf4_close(&tijab);
 
123
    dpd_buf4_init(&newtijab, CC_TAMPS, 0, 12, 15, 12, 17, 0, "New tijab");
 
124
    dpd_buf4_axpy(&t2, &newtijab, 1);
 
125
    dpd_buf4_close(&newtijab);
 
126
    dpd_buf4_close(&t2);
 
127
 
 
128
    /*** AB ***/
 
129
    dpd_buf4_init(&tIjAb, CC_TAMPS, 0, 22, 28, 22, 28, 0, "tIjAb");
 
130
    dpd_buf4_init(&newtIjAb, CC_TAMPS, 0, 22, 28, 22, 28, 0, "New tIjAb");
 
131
    dpd_contract424(&tIjAb, &Fae, &newtIjAb, 3, 1, 0, 1, 1);
 
132
    dpd_contract244(&FAE, &tIjAb, &newtIjAb, 1, 2, 1, 1, 1);
 
133
    dpd_buf4_close(&newtIjAb);
 
134
    dpd_buf4_close(&tIjAb);
 
135
 
 
136
    dpd_file2_close(&FAE);  
 
137
    dpd_file2_close(&Fae);
 
138
  }
 
139
}