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

« back to all changes in this revision

Viewing changes to src/bin/cclambda/sort_amps.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 sort_amps(int L_irr)
 
15
{
 
16
  dpdbuf4 L2;
 
17
 
 
18
  if(params.ref == 0) {
 
19
    dpd_buf4_init(&L2, CC_LAMBDA, L_irr, 0, 5, 0, 5, 0, "LIjAb");
 
20
    dpd_buf4_scmcopy(&L2, CC_LAMBDA, "2 LIjAb - LIjBa", 2);
 
21
    dpd_buf4_sort_axpy(&L2, CC_LAMBDA, pqsr, 0, 5, "2 LIjAb - LIjBa", -1);
 
22
    dpd_buf4_close(&L2);
 
23
 
 
24
    dpd_buf4_init(&L2, CC_LAMBDA, L_irr, 0, 5, 0, 5, 0, "LIjAb");
 
25
    dpd_buf4_sort(&L2, CC_LAMBDA, prqs, 10, 10, "LIAjb");
 
26
    dpd_buf4_sort(&L2, CC_LAMBDA, psqr, 10, 10, "LIbjA");
 
27
    dpd_buf4_close(&L2);
 
28
 
 
29
    dpd_buf4_init(&L2, CC_LAMBDA, L_irr, 10, 10, 10, 10, 0, "LIAjb");
 
30
    dpd_buf4_scmcopy(&L2, CC_LAMBDA, "2 LIAjb - LIbjA", 2);
 
31
    dpd_buf4_sort_axpy(&L2, CC_LAMBDA, psrq, 10, 10, "2 LIAjb - LIbjA", -1);
 
32
    dpd_buf4_close(&L2);
 
33
 
 
34
    dpd_buf4_init(&L2, CC_LAMBDA, L_irr, 0, 5, 0, 5, 0, "LIjAb");
 
35
    dpd_buf4_sort(&L2, CC_LAMBDA, qpsr, 0, 5, "LiJaB");
 
36
    dpd_buf4_close(&L2);
 
37
 
 
38
    dpd_buf4_init(&L2, CC_LAMBDA, L_irr, 0, 5, 0, 5, 0, "LiJaB");
 
39
    dpd_buf4_sort(&L2, CC_LAMBDA, prqs, 10, 10, "LiaJB");
 
40
    dpd_buf4_close(&L2);
 
41
 
 
42
    dpd_buf4_init(&L2, CC_LAMBDA, L_irr, 10, 10, 10, 10, 0, "LIAjb");
 
43
    dpd_buf4_sort(&L2, CC_LAMBDA, rqps, 10, 10, "LjAIb");
 
44
    dpd_buf4_close(&L2);
 
45
  }
 
46
  
 
47
  if(params.ref == 1) { /** ROHF **/
 
48
    dpd_buf4_init(&L2, CC_LAMBDA, L_irr, 0, 5, 0, 5, 0, "LIjAb");
 
49
    dpd_buf4_sort(&L2, CC_LAMBDA, prqs, 10, 10, "LIAjb");
 
50
    dpd_buf4_sort(&L2, CC_LAMBDA, psqr, 10, 10, "LIbjA");
 
51
    dpd_buf4_sort(&L2, CC_LAMBDA, qpsr, 0, 5, "LiJaB");
 
52
    dpd_buf4_close(&L2);
 
53
 
 
54
    dpd_buf4_init(&L2, CC_LAMBDA, L_irr, 0, 5, 0, 5, 0, "LiJaB");
 
55
    dpd_buf4_sort(&L2, CC_LAMBDA, prqs, 10, 10, "LiaJB");
 
56
    dpd_buf4_close(&L2);
 
57
 
 
58
    dpd_buf4_init(&L2, CC_LAMBDA, L_irr, 10, 10, 10, 10, 0, "LIAjb");
 
59
    dpd_buf4_sort(&L2, CC_LAMBDA, rqps, 10, 10, "LjAIb");
 
60
    dpd_buf4_close(&L2);
 
61
    
 
62
    /* Build L2IAJB List */
 
63
    dpd_buf4_init(&L2, CC_LAMBDA, L_irr, 0, 5, 2, 7, 0, "LIJAB");
 
64
    dpd_buf4_sort(&L2, CC_LAMBDA, prqs, 10, 10, "LIAJB");
 
65
    dpd_buf4_close(&L2);
 
66
    /* Build L2iajb List */
 
67
    dpd_buf4_init(&L2, CC_LAMBDA, L_irr, 0, 5, 2, 7, 0, "Lijab");
 
68
    dpd_buf4_sort(&L2, CC_LAMBDA, prqs, 10, 10, "Liajb");
 
69
    dpd_buf4_close(&L2);
 
70
  }
 
71
  else if(params.ref == 2) { /** UHF **/
 
72
 
 
73
    dpd_buf4_init(&L2, CC_LAMBDA, L_irr, 22, 28, 22, 28, 0, "LIjAb");
 
74
    dpd_buf4_sort(&L2, CC_LAMBDA, qpsr, 23, 29, "LiJaB");
 
75
    dpd_buf4_close(&L2);
 
76
 
 
77
    dpd_buf4_init(&L2, CC_LAMBDA, L_irr, 0, 5, 2, 7, 0, "LIJAB");
 
78
    dpd_buf4_sort(&L2, CC_LAMBDA, prqs, 20, 20, "LIAJB");
 
79
    dpd_buf4_close(&L2);
 
80
 
 
81
    dpd_buf4_init(&L2, CC_LAMBDA, L_irr, 10, 15, 12, 17, 0, "Lijab");
 
82
    dpd_buf4_sort(&L2, CC_LAMBDA, prqs, 30, 30, "Liajb");
 
83
    dpd_buf4_close(&L2);
 
84
 
 
85
    dpd_buf4_init(&L2, CC_LAMBDA, L_irr, 22, 28, 22, 28, 0, "LIjAb");
 
86
    dpd_buf4_sort(&L2, CC_LAMBDA, prqs, 20, 30, "LIAjb");
 
87
    dpd_buf4_close(&L2);
 
88
 
 
89
    dpd_buf4_init(&L2, CC_LAMBDA, L_irr, 23, 29, 23, 29, 0, "LiJaB");
 
90
    dpd_buf4_sort(&L2, CC_LAMBDA, prqs, 30, 20, "LiaJB");
 
91
    dpd_buf4_close(&L2);
 
92
 
 
93
    dpd_buf4_init(&L2, CC_LAMBDA, L_irr, 20, 30, 20, 30, 0, "LIAjb");
 
94
    dpd_buf4_sort(&L2, CC_LAMBDA, psrq, 24, 27, "LIbjA");
 
95
    dpd_buf4_sort(&L2, CC_LAMBDA, rqps, 27, 24, "LjAIb");
 
96
    dpd_buf4_close(&L2);
 
97
  }
 
98
 
 
99
}
 
100
 
 
101
 
 
102
}} // namespace psi::cclambda