1
#ifndef _psi_src_lib_libmints_wavefunction_h
2
#define _psi_src_lib_libmints_wavefunction_h
5
\file libmints/wavefunction.h
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>
15
#define MAX_IOFF 30000
16
extern int ioff[MAX_IOFF];
19
extern double df[MAX_DF];
22
extern double bc[MAX_BC][MAX_BC];
25
extern double fac[MAX_FAC];
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) ) )
32
//! Simple wavefunction base class.
36
Ref<BasisSet> basisset_;
37
Ref<Molecule> molecule_;
39
// PSI file access variables
41
Ref<psi::Chkpt> chkpt_;
43
MatrixFactory factory_;
46
double energy_threshold_;
47
double density_threshold_;
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();
60
/// Compute energy. Subclasses override this function to compute its energy.
61
virtual double compute_energy();
63
/// Initialize internal variables from checkpoint file.
64
void init_with_chkpt();
66
Ref<Molecule> molecule() { return molecule_; }
68
static void initialize_singletons();