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

« back to all changes in this revision

Viewing changes to src/bin/psimrcc/manybody.h

  • 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
#ifndef _psi_src_bin_psimrcc_ccmanybody_h
 
2
#define _psi_src_bin_psimrcc_ccmanybody_h
 
3
/***************************************************************************
 
4
 *  PSIMRCC : Copyright (C) 2007 by Francesco Evangelista and Andrew Simmonett
 
5
 *  frank@ccc.uga.edu   andysim@ccc.uga.edu
 
6
 *  A multireference coupled cluster code
 
7
 ***************************************************************************/
 
8
 
 
9
/*********************************************************
 
10
  CCManyBody Class
 
11
  1) Purpose
 
12
    This class is used to do the basic operations that any
 
13
    manybody code requires: compute the Fock matrix, denominators.
 
14
    However, this implementation is specifically designed to
 
15
    handle multireference cases
 
16
  2) Use
 
17
  3) Details
 
18
  4) Uses
 
19
    MOInfo class
 
20
    STL <vector>
 
21
 
 
22
*********************************************************/
 
23
 
 
24
#include <cmath>
 
25
#include <vector>
 
26
#include <string>
 
27
 
 
28
#include <libciomr/libciomr.h>
 
29
#include <libqt/qt.h>
 
30
 
 
31
namespace psi{ namespace psimrcc{
 
32
 
 
33
 
 
34
enum TriplesType          {pt2,ccsd,ccsd_t,ccsdt_1a,ccsdt_1b,ccsdt_2,ccsdt_3,ccsdt};
 
35
enum TriplesCouplingType  {nocoupling,linear,quadratic,cubic};
 
36
 
 
37
 
 
38
/**
 
39
 *      @author Francesco Evangelista <frank@ccc.uga.edu>
 
40
*/
 
41
class CCManyBody{
 
42
public:
 
43
  CCManyBody();
 
44
  virtual ~CCManyBody();
 
45
  void        generate_integrals();
 
46
  void        generate_denominators();
 
47
  void        compute_reference_energy();
 
48
  void        make_fock_matrix();
 
49
  void        make_denominators();
 
50
  void        print_method(const char* text);
 
51
  void        zero_internal_amps();
 
52
  void        zero_t1_internal_amps();
 
53
  void        zero_internal_delta_amps();
 
54
protected:
 
55
  // Effective Hamiltonian and the correpsonding eigenvectors
 
56
  void        print_eigensystem(int ndets, double** Heff,double*& eigenvector);
 
57
  double      diagonalize_Heff(int root,int ndets, double** Heff,double*& eigenvector, bool initial);
 
58
  void        sort_eigensystem(int ndets,double*& real,double*& imaginary,double**& left,double**& right);
 
59
  double      c_H_c(int ndets, double** H,double*& c);
 
60
 
 
61
  double*     zeroth_order_eigenvector;
 
62
  double*     eigenvector;
 
63
  double**    Heff;
 
64
  double**    Heff_mrpt2;
 
65
 
 
66
  // Effective Hamiltonian and the correpsonding eigenvectors
 
67
  double      current_energy;
 
68
  double      delta_energy;
 
69
  double      cas_energy;
 
70
  double      old_energy;
 
71
 
 
72
  double      huge;
 
73
 
 
74
  double      total_time;
 
75
 
 
76
  double      norm_amps;
 
77
  double      delta_t1_amps;
 
78
  double      delta_t2_amps;
 
79
 
 
80
  int         diis_step;
 
81
 
 
82
  TriplesType         triples_type;
 
83
  TriplesCouplingType triples_coupling_type;
 
84
  
 
85
  void generate_triples_denominators();
 
86
  void generate_d3_ijk(double***& d3,bool alpha_i,bool alpha_j,bool alpha_k);
 
87
  void generate_d3_abc(double***& d3,bool alpha_a,bool alpha_b,bool alpha_c);
 
88
  void deallocate_triples_denominators();
 
89
 
 
90
  double***  d3_ooo;
 
91
  double***  d3_ooO;
 
92
  double***  d3_oOO;
 
93
  double***  d3_OOO;
 
94
  double***  d3_vvv;
 
95
  double***  d3_vvV;
 
96
  double***  d3_vVV;
 
97
  double***  d3_VVV;
 
98
};
 
99
 
 
100
}} /* End Namespaces */
 
101
 
 
102
#endif // _psi_src_bin_psimrcc_ccmanybody_h