Psi4
corrtab.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 //
29 // corrtab.h
30 //
31 // Additional modifications made by Justin Turney <jturney@ccqc.uga.edu>
32 // for use in PSI4.
33 //
34 // Copyright (C) 1997 Limit Point Systems, Inc.
35 //
36 // Author: Curtis Janssen <cljanss@limitpt.com>
37 // Maintainer: LPS
38 //
39 // This file is part of the SC Toolkit.
40 //
41 // The SC Toolkit is free software; you can redistribute it and/or modify
42 // it under the terms of the GNU Library General Public License as published by
43 // the Free Software Foundation; either version 2, or (at your option)
44 // any later version.
45 //
46 // The SC Toolkit is distributed in the hope that it will be useful,
47 // but WITHOUT ANY WARRANTY; without even the implied warranty of
48 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
49 // GNU Library General Public License for more details.
50 //
51 // You should have received a copy of the GNU General Public License along
52 // with this program; if not, write to the Free Software Foundation, Inc.,
53 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
54 //
55 // The U.S. Government is granted a limited license as per AL 91-7.
56 //
57 
58 #ifndef _math_symmetry_corrtab_h
59 #define _math_symmetry_corrtab_h
60 
61 #include <iostream>
62 
63 #include "psi4/libmints/pointgrp.h"
64 
65 namespace psi {
66 
67 // //////////////////////////////////////////////////////////////////
68 
73  private:
74  std::shared_ptr<PointGroup> group_;
75  std::shared_ptr<PointGroup> subgroup_;
76 
77  int n_;
78  int subn_;
79  int *ngamma_;
80  int **gamma_;
81 
82  void clear();
83  public:
85 
87  CorrelationTable(const std::shared_ptr<PointGroup>& group,
88  const std::shared_ptr<PointGroup>& subgroup);
89 
91 
93  std::shared_ptr<PointGroup> group() const { return group_; }
95  std::shared_ptr<PointGroup> subgroup() const { return subgroup_; }
96 
100  int initialize_table(const std::shared_ptr<PointGroup>& group,
101  const std::shared_ptr<PointGroup>& subgroup);
102 
104  const char *error(int errcod);
105 
107  int n() const { return n_; }
109  int subn() const { return subn_; }
111  int degen(int igamma) const;
113  int subdegen(int igamma) const;
115  //from the high order group can be reduced to.
116  int ngamma(int igamma) const { return ngamma_[igamma]; }
119  int gamma(int igamma, int i) const { return gamma_[igamma][i]; }
120 
121  // void print(std::ostream &o=ExEnv::out0()) const;
122 };
123 
124 }
125 
126 #endif
127 
128 // Local Variables:
129 // mode: c++
130 // c-file-style: "CLJ-CONDENSED"
131 // End:
void clear()
Definition: corrtab.cc:208
const char * error(int errcod)
Converts error codes from initialize_table into a text string.
Definition: corrtab.cc:218
int gamma(int igamma, int i) const
Definition: corrtab.h:119
~CorrelationTable()
Definition: corrtab.cc:91
Definition: pointgrp.h:105
int subn() const
Returns the number of irreps in the subgroup.
Definition: corrtab.h:109
int subn_
Definition: corrtab.h:78
Definition: corrtab.h:72
std::shared_ptr< PointGroup > subgroup() const
Returns the lower order point group.
Definition: corrtab.h:95
CorrelationTable()
Definition: corrtab.cc:67
int n_
Definition: corrtab.h:77
int * ngamma_
Definition: corrtab.h:79
std::shared_ptr< PointGroup > group() const
Returns the higher order point group.
Definition: corrtab.h:93
int subdegen(int igamma) const
Returns the degeneracy of the subgroup irrep.
Definition: corrtab.cc:245
int initialize_table(const std::shared_ptr< PointGroup > &group, const std::shared_ptr< PointGroup > &subgroup)
Definition: corrtab.cc:97
std::shared_ptr< PointGroup > subgroup_
Definition: corrtab.h:75
int degen(int igamma) const
Returns the degeneracy of the irrep.
Definition: corrtab.cc:239
int ngamma(int igamma) const
Returns the number of irreps in the low order group that an irrep.
Definition: corrtab.h:116
std::shared_ptr< PointGroup > group_
Definition: corrtab.h:74
int n() const
Returns the number of irreps in the high order group.
Definition: corrtab.h:107
int ** gamma_
Definition: corrtab.h:80