~ubuntu-branches/ubuntu/precise/psicode/precise

« back to all changes in this revision

Viewing changes to src/lib/libmints/sobasis.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_sobasis_h_
 
2
#define _psi_src_lib_libmints_sobasis_h_
 
3
 
 
4
/*!
 
5
    \file libmints/sobasis.h
 
6
    \ingroup MINTS
 
7
*/
 
8
 
 
9
#include <vector>
 
10
 
 
11
namespace psi {
 
12
    
 
13
class SOTransformComponent
 
14
{
 
15
protected:
 
16
    /// Coefficient of the AO
 
17
    double coef_;
 
18
    /// AO function number
 
19
    int aofunc_;
 
20
    /// SO function number
 
21
    int sofunc_;
 
22
    /// SO function's irrep
 
23
    int irrep_;
 
24
    /// SO function in irrep
 
25
    int sofuncirrep_;
 
26
    
 
27
public:
 
28
    SOTransformComponent();
 
29
    
 
30
    /// Returns the coefficient of the AO
 
31
    double coef() const { return coef_; }
 
32
    /// Returns the AO function number
 
33
    int aofunc() const  { return aofunc_; }
 
34
    /// Returns the SO function number
 
35
    int sofunc() const  { return sofunc_; }
 
36
    /// Returns the SO function's irrep
 
37
    int irrep() const   { return irrep_; }
 
38
    /// Return the SO function number in its irrep
 
39
    int sofuncirrep() const { return sofuncirrep_; }
 
40
    
 
41
    void init(int aofunc, int sofunc, int sofuncirrep, int irrep, double coef);
 
42
};
 
43
 
 
44
class SOTransformShell
 
45
{
 
46
protected:
 
47
    /// The number of the AO shell from which these functions come.
 
48
    int aoshell_;
 
49
    /// Array of SOTransformComponent objects describing the transform
 
50
    std::vector<SOTransformComponent> funcs_;
 
51
    
 
52
public:
 
53
    SOTransformShell();
 
54
    
 
55
    void add_function(int irrep, double coef, int aofunc, int sofunc, int sofuncirrep);
 
56
    
 
57
    void aoshell(int i) { aoshell_ = i;    }
 
58
    int aoshell() const { return aoshell_; }
 
59
    int nfunc() const   { return funcs_.size();    }
 
60
    SOTransformComponent* func(int i) { return &(funcs_[i]); }
 
61
};
 
62
 
 
63
class SOTransformIter
 
64
{
 
65
private:
 
66
    SOTransformShell *trans_;
 
67
    int i_;
 
68
    
 
69
public:
 
70
    SOTransformIter(SOTransformShell* trans) { trans_ = trans; i_ = 0; }
 
71
    
 
72
    void first() { i_ = 0; }
 
73
    void next()  { i_++;   }
 
74
    bool is_done() { return i_ < trans_->nfunc() ? true : false; }
 
75
    
 
76
    /// Returns the coefficient of component i
 
77
    double coef() const { return trans_->func(i_)->coef(); }
 
78
    /// Returns the AO function number of component i
 
79
    int aofunc() const  { return trans_->func(i_)->aofunc(); }
 
80
    /// Returns the SO function number of component i
 
81
    int sofunc() const  { return trans_->func(i_)->sofunc(); }
 
82
    /// Returns the SO function's irrep of component i
 
83
    int irrep() const   { return trans_->func(i_)->irrep(); }
 
84
    /// Returns the SO function number in its irrep for component i
 
85
    int sofuncirrep() const { return trans_->func(i_)->sofuncirrep(); }
 
86
};
 
87
 
 
88
class SOTransform
 
89
{
 
90
protected:
 
91
    /// The SOTransformShell object for each AO
 
92
    std::vector<SOTransformShell> aoshell_;
 
93
    
 
94
public:
 
95
    SOTransform() {};
 
96
    
 
97
    /// Initialize
 
98
    void init(int nshells);
 
99
    
 
100
    /// Add another term to the transform.
 
101
    void add_transform(int aoshell, int irrep, int sofuncirrep, double coef, int aofunc, int sofunc);
 
102
    
 
103
    /// Returns the number of ao shells
 
104
    int naoshell() const { return aoshell_.size(); }
 
105
    
 
106
    /// Return the i'th ao shell
 
107
    SOTransformShell* aoshell(int i) { return &(aoshell_[i]); }
 
108
};
 
109
 
 
110
}
 
111
 
 
112
#endif