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

« back to all changes in this revision

Viewing changes to src/lib/libmints/wavefunction.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_lib_libmints_wavefunction_h
 
2
#define _psi_src_lib_libmints_wavefunction_h
 
3
 
 
4
/*!
 
5
    \file libmints/wavefunction.h
 
6
    \ingroup MINTS
 
7
*/
 
8
 
 
9
#include <libmints/factory.h>
 
10
#include <libmints/ref.h>
 
11
#include <libmints/molecule.h>
 
12
#include <libmints/basisset.h>
 
13
#include <libpsio/psio.hpp>
 
14
 
 
15
#define MAX_IOFF 30000
 
16
extern int ioff[MAX_IOFF];
 
17
 
 
18
#define MAX_DF 500
 
19
extern double df[MAX_DF];
 
20
 
 
21
#define MAX_BC 20
 
22
extern double bc[MAX_BC][MAX_BC];
 
23
 
 
24
#define MAX_FAC 50
 
25
extern double fac[MAX_FAC];
 
26
 
 
27
#define INDEX2(i, j) ( i >= j ? ioff[i] + j : ioff[j] + i )
 
28
#define INDEX4(i, j, k, l) ( INDEX2( INDEX2(i, j), INDEX2(k, l) ) )
 
29
 
 
30
namespace psi {
 
31
 
 
32
//! Simple wavefunction base class.
 
33
class Wavefunction {
 
34
protected:
 
35
    
 
36
    Ref<BasisSet> basisset_;
 
37
    Ref<Molecule> molecule_;
 
38
 
 
39
    // PSI file access variables
 
40
    Ref<psi::PSIO> psio_;
 
41
    Ref<psi::Chkpt> chkpt_;
 
42
    
 
43
    MatrixFactory factory_;
 
44
    long int memory_;
 
45
    unsigned int debug_;
 
46
    double energy_threshold_;
 
47
    double density_threshold_;
 
48
    
 
49
private:
 
50
    Wavefunction() {}
 
51
    void common_init();
 
52
    
 
53
public:
 
54
    /// Set the PSIO object. Note: Wavefunction assumes ownership of the object. DO NOT DELETE!
 
55
    Wavefunction(psi::PSIO *psio, psi::Chkpt *chkpt = 0);
 
56
    /// Set the PSIO object. Note: Wavefunction assumes shared ownership of the object.
 
57
    Wavefunction(Ref<psi::PSIO>& psio, Ref<psi::Chkpt>& chkpt);
 
58
    virtual ~Wavefunction();
 
59
    
 
60
    /// Compute energy. Subclasses override this function to compute its energy.
 
61
    virtual double compute_energy();
 
62
 
 
63
    /// Initialize internal variables from checkpoint file.
 
64
    void init_with_chkpt();
 
65
    
 
66
    Ref<Molecule> molecule() { return molecule_; }
 
67
    
 
68
    static void initialize_singletons();
 
69
};
 
70
 
 
71
}
 
72
 
 
73
#endif