CheMPS2
Irreps.h
1 /*
2  CheMPS2: a spin-adapted implementation of DMRG for ab initio quantum chemistry
3  Copyright (C) 2013-2016 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{
69  class Irreps{
70 
71  public:
72 
74  Irreps();
75 
77 
78  Irreps(const int nGroup);
79 
81  virtual ~Irreps();
82 
84 
86  bool setGroup(const int nGroup);
87 
89 
90  bool getIsActivated() const;
91 
93 
94  int getGroupNumber() const;
95 
97 
98  string getGroupName() const;
99 
101 
103  static string getGroupName(const int nGroup);
104 
106 
107  int getNumberOfIrreps() const;
108 
110 
112  static int getNumberOfIrreps(const int nGroup);
113 
115 
117  string getIrrepName(const int irrepNumber) const;
118 
120 
123  static int directProd(const int Irrep1, const int Irrep2){ return Irrep1 ^ Irrep2; }
124 
126 
127  void symm_psi2molpro( int * psi2molpro ) const;
128 
130 
132  static void symm_psi2molpro( int * psi2molpro, const string SymmLabel );
133 
135  static void printAll();
136 
137  private:
138 
139  //whether a relevant group number is currently set
140  bool isActivated;
141 
142  //the currently set group number (check isActivated)
143  int groupNumber;
144 
145  //number of irreps
146  int nIrreps;
147 
148  //static member functions containing the group names, the number of irreps, and the names of the irreps
149  static string getGroupNamePrivate(const int nGroup);
150  static string getIrrepNamePrivate(const int nGroup, const int nIrrep);
151 
152  };
153 }
154 
155 #endif
156 
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:218
Definition: CASPT2.h:42
void symm_psi2molpro(int *psi2molpro) const
Fill the array psi2molpro with the irrep conventions of molpro for the currently activated group...
Definition: Irreps.cpp:177
int getGroupNumber() const
Get the group number.
Definition: Irreps.cpp:66
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
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&#39;s convent...
Definition: Irreps.h:123
Irreps()
Constructor.
Definition: Irreps.cpp:30
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:110