Psi4
shellrotation.h
Go to the documentation of this file.
1 /*
2  * @BEGIN LICENSE
3  *
4  * Psi4: an open-source quantum chemistry software package
5  *
6  * Copyright (c) 2007-2017 The Psi4 Developers.
7  *
8  * The copyrights for code used from other parties are included in
9  * the corresponding files.
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License along
22  * with this program; if not, write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24  *
25  * @END LICENSE
26  */
27 
28 #ifndef _psi_src_lib_libmints_shellrotation_h_
29 #define _psi_src_lib_libmints_shellrotation_h_
30 
31 namespace psi {
32 
33 class SymmetryOperation;
34 class IntegralFactory;
35 
37 {
38  int n_;
39  int am_;
40  double **r_;
41 
42  void done();
43 
44 public:
46  ShellRotation(int n);
50  ShellRotation(int a, SymmetryOperation&, const IntegralFactory*, int pure=0);
51  virtual ~ShellRotation();
52 
55 
58  void init(int a, SymmetryOperation&, const IntegralFactory*);
61  void init_pure(int a, SymmetryOperation&, const IntegralFactory*);
62 
64  int am() const { return am_; }
66  int dim() const { return n_; }
67 
69  double& operator()(int i, int j) { return r_[i][j]; }
71  double* operator[](int i) { return r_[i]; }
72 
74  ShellRotation operate(const ShellRotation&rot) const;
76  ShellRotation transform(const ShellRotation&rot) const;
77 
79  double trace() const;
80 
82  void print() const;
83 };
84 
85 }
86 
87 #endif // _psi_src_lib_libmints_shellrotation_h_
double & operator()(int i, int j)
Return an element of the transform matrix.
Definition: shellrotation.h:69
double ** r_
Definition: shellrotation.h:40
Definition: shellrotation.h:36
int n_
Definition: shellrotation.h:38
ShellRotation operate(const ShellRotation &rot) const
Returns the result of rot*this.
Definition: shellrotation.cc:244
void init_pure(int a, SymmetryOperation &, const IntegralFactory *)
Definition: shellrotation.cc:177
virtual ~ShellRotation()
Definition: shellrotation.cc:91
Definition: pointgrp.h:105
int am_
Definition: shellrotation.h:39
ShellRotation transform(const ShellRotation &rot) const
Returns the result of rot*this*transpose(rot).
Definition: shellrotation.cc:265
double trace() const
Return the trace of the transformation.
Definition: shellrotation.cc:299
ShellRotation & operator=(const ShellRotation &)
Assign this to another shell rotation.
Definition: shellrotation.cc:96
int am() const
Return the angular momentum.
Definition: shellrotation.h:64
void print() const
Print the object.
Definition: shellrotation.cc:307
Definition: integral.h:385
ShellRotation(int n)
Initialize this ShellRotation to hold a n by n transformation.
Definition: shellrotation.cc:66
void init(int a, SymmetryOperation &, const IntegralFactory *)
Definition: shellrotation.cc:126
double * operator[](int i)
Return a row of the transform matrix.
Definition: shellrotation.h:71
Definition: pointgrp.h:140
int dim() const
Return the number of functions in a shell.
Definition: shellrotation.h:66
void done()
Definition: shellrotation.cc:114