v2DM-DOCI  1.0
Irreps.h
Go to the documentation of this file.
1 /*
2  CheMPS2: a spin-adapted implementation of DMRG for ab initio quantum chemistry
3  Copyright (C) 2013, 2014 Sebastian Wouters
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License along
16  with this program; if not, write to the Free Software Foundation, Inc.,
17  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19 
20 #ifndef IRREPS_CHEMPS2_H
21 #define IRREPS_CHEMPS2_H
22 
23 #include <string>
24 using std::string;
25 
26 namespace CheMPS2{
68  class Irreps{
69 
70  public:
71 
73  Irreps();
74 
76 
77  Irreps(const int nGroup);
78 
80  virtual ~Irreps();
81 
83 
85  bool setGroup(const int nGroup);
86 
88 
89  bool getIsActivated() const;
90 
92 
93  int getGroupNumber() const;
94 
96 
97  string getGroupName() const;
98 
100 
102  static string getGroupName(const int nGroup);
103 
105 
106  int getNumberOfIrreps() const;
107 
109 
111  string getIrrepName(const int irrepNumber) const;
112 
114 
117  static int directProd(const int Irrep1, const int Irrep2){ return Irrep1 ^ Irrep2; }
118 
120  static void printAll();
121 
122  private:
123 
124  //whether a relevant group number is currently set
126 
127  //the currently set group number (check isActivated)
129 
130  //number of irreps
131  int nIrreps;
132 
133  //static member functions containing the group names, the number of irreps, and the names of the irreps
134  static string getGroupNamePrivate(const int nGroup);
135  static int getNumberOfIrrepsPrivate(const int nGroup);
136  static string getIrrepNamePrivate(const int nGroup, const int nIrrep);
137 
138  };
139 }
140 
141 #endif
142 
bool setGroup(const int nGroup)
Set the group.
Definition: Irreps.cpp:50
int getNumberOfIrreps() const
Get the number of irreps for the currently activated group.
Definition: Irreps.cpp:94
static void printAll()
Print all info contained in this class.
Definition: Irreps.cpp:176
int getGroupNumber() const
Get the group number.
Definition: Irreps.cpp:66
static int getNumberOfIrrepsPrivate(const int nGroup)
Definition: Irreps.cpp:100
bool getIsActivated() const
Whether the group number is already activated.
Definition: Irreps.cpp:64
string getGroupName() const
Get the name of the group.
Definition: Irreps.cpp:68
int groupNumber
Definition: Irreps.h:128
static string getGroupNamePrivate(const int nGroup)
Definition: Irreps.cpp:80
virtual ~Irreps()
Destructor.
Definition: Irreps.cpp:48
static int directProd(const int Irrep1, const int Irrep2)
Get the direct product of the irreps with numbers Irrep1 and Irrep2: a bitwise XOR for Psi4's convent...
Definition: Irreps.h:117
Irreps()
Constructor.
Definition: Irreps.cpp:30
static string getIrrepNamePrivate(const int nGroup, const int nIrrep)
Definition: Irreps.cpp:119
bool isActivated
Definition: Irreps.h:125
string getIrrepName(const int irrepNumber) const
Get the name of the irrep with number irrepNumber of the activated group. The irrep with number 0 is ...
Definition: Irreps.cpp:109