38 if ((nGroup >= 0) && (nGroup <= 7)){
52 if ((nGroup >= 0) && (nGroup <= 7)){
70 return isActivated ? getGroupNamePrivate(groupNumber) :
"error" ;
76 return ((nGroup>=0)&&(nGroup<=7)) ? getGroupNamePrivate(nGroup) :
"error" ;
80 string CheMPS2::Irreps::getGroupNamePrivate(
const int nGroup){
82 if (nGroup==0)
return "c1";
83 if (nGroup==1)
return "ci";
84 if (nGroup==2)
return "c2";
85 if (nGroup==3)
return "cs";
86 if (nGroup==4)
return "d2";
87 if (nGroup==5)
return "c2v";
88 if (nGroup==6)
return "c2h";
89 if (nGroup==7)
return "d2h";
96 return isActivated ? nIrreps : -1 ;
102 if ((nGroup < 0) || ( nGroup > 7)){
return -1; }
103 if (nGroup == 0)
return 1;
104 if (nGroup <= 3)
return 2;
105 if (nGroup <= 6)
return 4;
112 if (!isActivated)
return "error1";
114 if ( (irrepNumber<0) || (irrepNumber >= nIrreps) )
return "error2";
116 return getIrrepNamePrivate(groupNumber,irrepNumber);
120 string CheMPS2::Irreps::getIrrepNamePrivate(
const int nGroup,
const int nIrrep){
123 if (nIrrep == 0)
return "A";
127 if (nIrrep == 0)
return "Ag";
128 if (nIrrep == 1)
return "Au";
132 if (nIrrep == 0)
return "A";
133 if (nIrrep == 1)
return "B";
137 if (nIrrep == 0)
return "Ap";
138 if (nIrrep == 1)
return "App";
142 if (nIrrep == 0)
return "A";
143 if (nIrrep == 1)
return "B1";
144 if (nIrrep == 2)
return "B2";
145 if (nIrrep == 3)
return "B3";
149 if (nIrrep == 0)
return "A1";
150 if (nIrrep == 1)
return "A2";
151 if (nIrrep == 2)
return "B1";
152 if (nIrrep == 3)
return "B2";
156 if (nIrrep == 0)
return "Ag";
157 if (nIrrep == 1)
return "Bg";
158 if (nIrrep == 2)
return "Au";
159 if (nIrrep == 3)
return "Bu";
163 if (nIrrep == 0)
return "Ag";
164 if (nIrrep == 1)
return "B1g";
165 if (nIrrep == 2)
return "B2g";
166 if (nIrrep == 3)
return "B3g";
167 if (nIrrep == 4)
return "Au";
168 if (nIrrep == 5)
return "B1u";
169 if (nIrrep == 6)
return "B2u";
170 if (nIrrep == 7)
return "B3u";
179 if (!isActivated)
return;
186 if ( SymmLabel.compare(
"c1")==0 ){
189 if ( ( SymmLabel.compare(
"ci")==0 ) || ( SymmLabel.compare(
"c2")==0 ) || ( SymmLabel.compare(
"cs")==0 ) ){
193 if ( ( SymmLabel.compare(
"d2")==0 ) ){
199 if ( ( SymmLabel.compare(
"c2v")==0 ) || ( SymmLabel.compare(
"c2h")==0 ) ){
205 if ( ( SymmLabel.compare(
"d2h")==0 ) ){
220 for (
int thegroup=0; thegroup<8; thegroup++){
221 cout <<
"######################################################" << endl;
222 cout <<
"Name = " << getGroupNamePrivate(thegroup) << endl;
224 cout <<
"Multiplication table :" << endl;
227 if ((irrep1 == -1) && (irrep2 == -1)) cout <<
"\t";
228 if ((irrep1 == -1) && (irrep2 >= 0 )) cout << getIrrepNamePrivate(thegroup, irrep2) <<
"\t";
229 if ((irrep2 == -1) && (irrep1 >= 0 )) cout << getIrrepNamePrivate(thegroup, irrep1) <<
"\t";
230 if ((irrep2 >= 0) && (irrep1 >= 0 )) cout << getIrrepNamePrivate(thegroup,
directProd(irrep1, irrep2)) <<
"\t";
235 cout <<
"######################################################" << endl;
bool setGroup(const int nGroup)
Set the group.
int getNumberOfIrreps() const
Get the number of irreps for the currently activated group.
static void printAll()
Print all info contained in this class.
void symm_psi2molpro(int *psi2molpro) const
Fill the array psi2molpro with the irrep conventions of molpro for the currently activated group...
int getGroupNumber() const
Get the group number.
bool getIsActivated() const
Whether the group number is already activated.
string getGroupName() const
Get the name of the group.
virtual ~Irreps()
Destructor.
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...
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 ...