~ubuntu-branches/ubuntu/precise/psicode/precise

« back to all changes in this revision

Viewing changes to src/bin/stable/diag_A_RHF.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 STABLE
 
3
    \brief Enter brief description of file here 
 
4
*/
 
5
#include <cstdio>
 
6
#include <cstdlib>
 
7
#include <libciomr/libciomr.h>
 
8
#include <libdpd/dpd.h>
 
9
#include <libqt/qt.h>
 
10
#include <psifiles.h>
 
11
#include "MOInfo.h"
 
12
#include "Params.h"
 
13
#define EXTERN
 
14
#include "globals.h"
 
15
 
 
16
namespace psi { namespace stable {
 
17
 
 
18
void diag_A_RHF(void)
 
19
{
 
20
  int h, dim, i;
 
21
  double *eps, **v;
 
22
  dpdbuf4 A, B;
 
23
 
 
24
  dpd_buf4_init(&A, PSIF_MO_HESS, 0, 11, 11, 11, 11, 0, "A(AI,BJ)");
 
25
  dpd_buf4_init(&B, PSIF_MO_HESS, 0, 11, 11, 11, 11, 0, "A(AI,BJ) triplet");
 
26
  for(h=0; h < moinfo.nirreps; h++) {
 
27
 
 
28
    dim = A.params->rowtot[h];
 
29
    eps = init_array(dim);
 
30
    v = block_matrix(dim, dim);
 
31
    moinfo.rank[h] = dim;
 
32
 
 
33
    dpd_buf4_mat_irrep_init(&A, h);
 
34
    dpd_buf4_mat_irrep_rd(&A, h);
 
35
    sq_rsp(dim, dim, A.matrix[h], eps, 1, v, 1e-12);
 
36
    dpd_buf4_mat_irrep_close(&A, h);
 
37
 
 
38
    for(i=0; i < MIN0(dim, 5); i++)
 
39
      moinfo.A_evals[h][i] = eps[i];
 
40
 
 
41
    zero_mat(v, dim, dim);
 
42
    zero_arr(eps, dim);
 
43
 
 
44
    dpd_buf4_mat_irrep_init(&B, h);
 
45
    dpd_buf4_mat_irrep_rd(&B, h);
 
46
    sq_rsp(dim, dim, B.matrix[h], eps, 1, v, 1e-12);
 
47
    dpd_buf4_mat_irrep_close(&B, h);
 
48
 
 
49
    for(i=0; i < MIN0(dim, 5); i++)
 
50
      moinfo.A_triplet_evals[h][i] = eps[i];
 
51
 
 
52
    free_block(v);
 
53
    free(eps);
 
54
 
 
55
  }
 
56
  dpd_buf4_close(&B);
 
57
  dpd_buf4_close(&A);
 
58
}
 
59
 
 
60
}} // namespace psi::stable