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

« back to all changes in this revision

Viewing changes to src/lib/libmints/twobody.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_twobody_h
 
2
#define _psi_src_lib_libmints_twobody_h
 
3
 
 
4
/*!
 
5
    \file libmints/twobody.h
 
6
    \ingroup MINTS
 
7
*/
 
8
 
 
9
#include <libmints/ref.h>
 
10
#include <libmints/matrix.h>
 
11
 
 
12
namespace psi {
 
13
    
 
14
class IntegralFactory;
 
15
class BasisSet;
 
16
class GaussianShell;
 
17
 
 
18
//! Two body integral base class.
 
19
class TwoBodyInt
 
20
{
 
21
protected:
 
22
    IntegralFactory *integral_;
 
23
    Ref<BasisSet> bs1_;
 
24
    Ref<BasisSet> bs2_;
 
25
    Ref<BasisSet> bs3_;
 
26
    Ref<BasisSet> bs4_;
 
27
    
 
28
    /// Buffer to hold the final integrals.
 
29
    double *target_;
 
30
    /// Buffer to hold the transformation intermediates.
 
31
    double *tformbuf_;
 
32
    /// Buffer to hold the initially computed integrals.
 
33
    double *source_;
 
34
    /// Maximum number of unique quartets needed to compute a set of SO's
 
35
    int max_unique_quartets_;
 
36
    /// Number of atoms.
 
37
    int natom_;
 
38
    /// Derivative level.
 
39
    int deriv_;
 
40
    
 
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);
 
49
    
 
50
    TwoBodyInt(IntegralFactory *integral,
 
51
               const Ref<BasisSet>& bs1,
 
52
               const Ref<BasisSet>& bs2,
 
53
               const Ref<BasisSet>& bs3,
 
54
               const Ref<BasisSet>& bs4,
 
55
               int deriv = 0);
 
56
               
 
57
public:
 
58
    virtual ~TwoBodyInt();
 
59
    
 
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();
 
70
 
 
71
    /// Buffer where the integrals are placed
 
72
    const double *buffer() const { return target_; };
 
73
    
 
74
    /// Compute the integrals
 
75
    virtual void compute_shell(int, int, int, int) = 0;
 
76
    
 
77
    /// Integral object that created me.
 
78
    IntegralFactory *integral() const { return integral_; }
 
79
    
 
80
    /// Normalize Cartesian functions based on angular momentum
 
81
    void normalize_am(Ref<GaussianShell> &, Ref<GaussianShell> &, Ref<GaussianShell> &, Ref<GaussianShell> &, int nchunk=1);
 
82
        
 
83
    /// Return true if the clone member can be called. By default returns false.
 
84
    virtual bool cloneable();
 
85
    
 
86
    /// Returns a clone of this object. By default throws an exception
 
87
    virtual Ref<TwoBodyInt> clone();
 
88
    
 
89
    /// Results go back to buffer_
 
90
    void pure_transform(int, int, int, int, int ichunk=0);
 
91
};
 
92
 
 
93
}
 
94
 
 
95
#endif