5 #include "Hamiltonian.h"
9 OptIndex::OptIndex(
const int L,
const int _Group,
const int * NORBin)
17 NORBcumulative.resize(Nirreps+1);
20 NORBcumulative[0] = 0;
21 for (
int irrep=0; irrep<Nirreps; irrep++)
23 NORB[irrep] = NORBin[irrep];
25 sum_check += NORB[irrep];
27 NORBcumulative[irrep+1] = NORBcumulative[irrep] + NORB[irrep];
31 std::cerr <<
"OptIndex::OptIndex : Sum over all orbitals is not L." << std::endl;
33 irrep_each_orbital.resize(NORBcumulative[Nirreps]);
35 for (
int irrep=0; irrep<Nirreps; irrep++)
36 for (
int cnt=0; cnt<NORB[irrep]; cnt++)
37 irrep_each_orbital[ NORBcumulative[irrep] + cnt ] = irrep;
46 NORBcumulative.resize(Nirreps+1);
49 NORBcumulative[0] = 0;
50 for (
int irrep=0; irrep<Nirreps; irrep++)
52 NORB[irrep] = ham.irrep2num_orb[irrep];
54 sum_check += NORB[irrep];
56 NORBcumulative[irrep+1] = NORBcumulative[irrep] + NORB[irrep];
60 std::cerr <<
"OptIndex::OptIndex : Sum over all orbitals is not L." << std::endl;
62 irrep_each_orbital.resize(NORBcumulative[Nirreps]);
64 for (
int irrep=0; irrep<Nirreps; irrep++)
65 for (
int cnt=0; cnt<NORB[irrep]; cnt++)
66 irrep_each_orbital[ NORBcumulative[irrep] + cnt ] = irrep;
85 for (
int irrep=0; irrep<Nirreps-1; irrep++)
86 cout << NORB[irrep] <<
" , ";
87 cout << NORB[Nirreps-1] <<
" ]" << endl;
bool setGroup(const int nGroup)
Set the group.
int getNumberOfIrreps() const
Get the number of irreps for the currently activated group.
OptIndex(const int L, const int Group, const int *NORBin)
int * get_irrep_each_orbital()
int getNORB(const int irrep) const
int getNstart(const int irrep) const