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 file is part of Psi4.
12  *
13  * Psi4 is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU Lesser General Public License as published by
15  * the Free Software Foundation, version 3.
16  *
17  * Psi4 is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public License along
23  * with Psi4; if not, write to the Free Software Foundation, Inc.,
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25  *
26  * @END LICENSE
27  */
28 
29 #ifndef _psi_src_lib_libmints_shellrotation_h_
30 #define _psi_src_lib_libmints_shellrotation_h_
31 
32 namespace psi {
33 
34 class SymmetryOperation;
35 class IntegralFactory;
36 
38 {
39  int n_;
40  int am_;
41  double **r_;
42 
43  void done();
44 
45 public:
47  ShellRotation(int n);
51  ShellRotation(int a, SymmetryOperation&, const IntegralFactory*, int pure=0);
52  virtual ~ShellRotation();
53 
56 
59  void init(int a, SymmetryOperation&, const IntegralFactory*);
62  void init_pure(int a, SymmetryOperation&, const IntegralFactory*);
63 
65  int am() const { return am_; }
67  int dim() const { return n_; }
68 
70  double& operator()(int i, int j) { return r_[i][j]; }
72  double* operator[](int i) { return r_[i]; }
73 
75  ShellRotation operate(const ShellRotation&rot) const;
77  ShellRotation transform(const ShellRotation&rot) const;
78 
80  double trace() const;
81 
83  void print() const;
84 };
85 
86 }
87 
88 #endif // _psi_src_lib_libmints_shellrotation_h_
double & operator()(int i, int j)
Return an element of the transform matrix.
Definition: shellrotation.h:70
double ** r_
Definition: shellrotation.h:41
Definition: shellrotation.h:37
int n_
Definition: shellrotation.h:39
ShellRotation operate(const ShellRotation &rot) const
Returns the result of rot*this.
Definition: shellrotation.cc:245
void init_pure(int a, SymmetryOperation &, const IntegralFactory *)
Definition: shellrotation.cc:178
virtual ~ShellRotation()
Definition: shellrotation.cc:92
Definition: pointgrp.h:106
int am_
Definition: shellrotation.h:40
ShellRotation transform(const ShellRotation &rot) const
Returns the result of rot*this*transpose(rot).
Definition: shellrotation.cc:266
double trace() const
Return the trace of the transformation.
Definition: shellrotation.cc:300
ShellRotation & operator=(const ShellRotation &)
Assign this to another shell rotation.
Definition: shellrotation.cc:97
int am() const
Return the angular momentum.
Definition: shellrotation.h:65
void print() const
Print the object.
Definition: shellrotation.cc:308
Definition: integral.h:384
ShellRotation(int n)
Initialize this ShellRotation to hold a n by n transformation.
Definition: shellrotation.cc:67
void init(int a, SymmetryOperation &, const IntegralFactory *)
Definition: shellrotation.cc:127
double * operator[](int i)
Return a row of the transform matrix.
Definition: shellrotation.h:72
Definition: pointgrp.h:141
int dim() const
Return the number of functions in a shell.
Definition: shellrotation.h:67
void done()
Definition: shellrotation.cc:115