2
#include <libdpd/dpd.h>
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;
12
dpd_file2_init(&G, CC_TMP0, L_irr, 1, 0, "CC2 GAI");
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);
23
else if(params.ref == 1) { /** ROHF **/
25
dpd_file2_init(&G, CC_TMP0, L_irr, 1, 0, "GAI");
26
dpd_file2_init(&G, CC_TMP0, L_irr, 4, 3, "Gai");
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);
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);
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);
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);
60
else if(params.ref == 2) { /** UHF **/
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");
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);
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);
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);
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);
91
dpd_file2_close(&Gai);
92
dpd_file2_close(&GAI);