~ubuntu-branches/ubuntu/karmic/psicode/karmic

« back to all changes in this revision

Viewing changes to src/bin/detci/sem.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 DETCI
 
3
    \brief Enter brief description of file here 
 
4
*/
1
5
/*
2
6
** Simultaneous Expansion Method Iterator
3
7
**
9
13
 
10
14
/* #define DEBUG */ 
11
15
 
 
16
#include <cstdio>
 
17
#include <cstdlib>
 
18
#include <cmath>
 
19
#include <psifiles.h>
 
20
#include <libciomr/libciomr.h>
 
21
#include <libqt/qt.h>
 
22
#include <libqt/slaterdset.h>
 
23
#include <physconst.h>
 
24
#include "structs.h"
 
25
#include "ci_tol.h"
 
26
#define EXTERN
 
27
#include "globals.h"
 
28
#include "civect.h"
 
29
 
 
30
namespace psi { namespace detci {
 
31
 
 
32
extern int H0block_calc(double E);
 
33
extern void H0block_xy(double *x, double *y, double E);
 
34
extern void print_vec(unsigned int nprint, int *Iacode, int *Ibcode,
 
35
   int *Iaidx, int *Ibidx, double *coeff,
 
36
   struct olsen_graph *AlphaG, struct olsen_graph *BetaG,
 
37
   struct stringwr **alplist, struct stringwr **betlist,
 
38
   FILE *outfile);
 
39
extern void parse_import_vector(SlaterDetSet *sdset, int *i_alplist, 
 
40
   int *i_alpidx, int *i_betlist, int *i_betidx, int *i_blknums);
 
41
 
 
42
extern void H0block_coupling_calc(double E, struct stringwr **alplist,
 
43
   struct stringwr **betlist);
 
44
 
12
45
#define MALPHA_TOLERANCE 1E-15
13
46
 
14
 
#include <math.h>
15
 
 
16
 
extern "C" {
17
 
   #include <stdlib.h>
18
 
   #include <stdio.h>
19
 
   #include <psifiles.h>
20
 
   #include <libciomr/libciomr.h>
21
 
   #include <libqt/qt.h>
22
 
   #include <libqt/slaterdset.h>
23
 
   #include <physconst.h>
24
 
   #include "structs.h"
25
 
   #include "ci_tol.h"
26
 
   #define EXTERN
27
 
   #include "globals.h"
28
 
 
29
 
   extern int H0block_calc(double E);
30
 
   extern void H0block_xy(double *x, double *y, double E);
31
 
   extern void print_vec(unsigned int nprint, int *Iacode, int *Ibcode,
32
 
      int *Iaidx, int *Ibidx, double *coeff,
33
 
      struct olsen_graph *AlphaG, struct olsen_graph *BetaG,
34
 
      struct stringwr **alplist, struct stringwr **betlist,
35
 
      FILE *outfile);
36
 
   extern void parse_import_vector(SlaterDetSet *sdset, int *i_alplist, 
37
 
      int *i_alpidx, int *i_betlist, int *i_betidx, int *i_blknums);
38
 
   
39
 
}
40
 
 
41
 
extern void H0block_coupling_calc(double E, struct stringwr **alplist,
42
 
      struct stringwr **betlist);
43
 
#include "civect.h"
44
 
 
45
47
void sem_iter(CIvect &Hd, struct stringwr **alplist, struct stringwr
46
48
      **betlist, double *evals, double conv_e, 
47
49
      double conv_rms, double enuc, double efzc, 
1076
1078
               Dvec.civ_xpeay(tval, Cvec, i, j);
1077
1079
               }
1078
1080
 
1079
 
            fprintf(outfile, "\nROOT %d ECI = %17.13lf", i+1, 
 
1081
            fprintf(outfile, "\n* ROOT %d CI total energy = %17.13lf", i+1, 
1080
1082
               evals[i] + enuc + efzc);
1081
1083
 
1082
1084
            if (nroots > 1) {
1349
1351
   free(buffer1);
1350
1352
   free(buffer2);
1351
1353
}
 
1354
 
 
1355
}} // namespace psi::detci
 
1356