1
#ifndef _psi_src_lib_libmints_twobody_h
2
#define _psi_src_lib_libmints_twobody_h
5
\file libmints/twobody.h
9
#include <libmints/ref.h>
10
#include <libmints/matrix.h>
14
class IntegralFactory;
18
//! Two body integral base class.
22
IntegralFactory *integral_;
28
/// Buffer to hold the final integrals.
30
/// Buffer to hold the transformation intermediates.
32
/// Buffer to hold the initially computed integrals.
34
/// Maximum number of unique quartets needed to compute a set of SO's
35
int max_unique_quartets_;
41
void permute_target(double *s, double *t, int sh1, int sh2, int sh3, int sh4, bool p12, bool p34, bool p13p24);
42
void permute_1234_to_1243(double *s, double *t, int nbf1, int nbf2, int nbf3, int nbf4);
43
void permute_1234_to_2134(double *s, double *t, int nbf1, int nbf2, int nbf3, int nbf4);
44
void permute_1234_to_2143(double *s, double *t, int nbf1, int nbf2, int nbf3, int nbf4);
45
void permute_1234_to_3412(double *s, double *t, int nbf1, int nbf2, int nbf3, int nbf4);
46
void permute_1234_to_4312(double *s, double *t, int nbf1, int nbf2, int nbf3, int nbf4);
47
void permute_1234_to_3421(double *s, double *t, int nbf1, int nbf2, int nbf3, int nbf4);
48
void permute_1234_to_4321(double *s, double *t, int nbf1, int nbf2, int nbf3, int nbf4);
50
TwoBodyInt(IntegralFactory *integral,
51
const Ref<BasisSet>& bs1,
52
const Ref<BasisSet>& bs2,
53
const Ref<BasisSet>& bs3,
54
const Ref<BasisSet>& bs4,
58
virtual ~TwoBodyInt();
60
/// Basis set on center one
61
Ref<BasisSet> basis();
62
/// Basis set on center one
63
Ref<BasisSet> basis1();
64
/// Basis set on center two
65
Ref<BasisSet> basis2();
66
/// Basis set on center three
67
Ref<BasisSet> basis3();
68
/// Basis set on center four
69
Ref<BasisSet> basis4();
71
/// Buffer where the integrals are placed
72
const double *buffer() const { return target_; };
74
/// Compute the integrals
75
virtual void compute_shell(int, int, int, int) = 0;
77
/// Integral object that created me.
78
IntegralFactory *integral() const { return integral_; }
80
/// Normalize Cartesian functions based on angular momentum
81
void normalize_am(Ref<GaussianShell> &, Ref<GaussianShell> &, Ref<GaussianShell> &, Ref<GaussianShell> &, int nchunk=1);
83
/// Return true if the clone member can be called. By default returns false.
84
virtual bool cloneable();
86
/// Returns a clone of this object. By default throws an exception
87
virtual Ref<TwoBodyInt> clone();
89
/// Results go back to buffer_
90
void pure_transform(int, int, int, int, int ichunk=0);