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