25 #include "DMRGSCFindices.h" 37 NORB =
new int[Nirreps];
38 NOCC =
new int[Nirreps];
39 NDMRG =
new int[Nirreps];
40 NVIRT =
new int[Nirreps];
41 NORBcumulative =
new int[Nirreps+1];
42 NDMRGcumulative =
new int[Nirreps+1];
45 NORBcumulative[0] = 0;
46 NDMRGcumulative[0] = 0;
47 for (
int irrep=0; irrep<Nirreps; irrep++){
49 assert( NOCCin [irrep]>=0 );
50 assert( NDMRGin[irrep]>=0 );
51 assert( NVIRTin[irrep]>=0 );
53 NORB[ irrep] = NOCCin[ irrep] + NDMRGin[irrep] + NVIRTin[irrep];
54 NOCC[ irrep] = NOCCin[ irrep];
55 NDMRG[irrep] = NDMRGin[irrep];
56 NVIRT[irrep] = NVIRTin[irrep];
58 totalNumOrbs += NORB[irrep];
60 NORBcumulative[ irrep+1] = NORBcumulative[ irrep] + NORB[irrep];
61 NDMRGcumulative[irrep+1] = NDMRGcumulative[irrep] + NDMRG[irrep];
64 assert( totalNumOrbs==L );
66 irrepOfEachDMRGorbital =
new int[NDMRGcumulative[Nirreps]];
67 irrepOfEachOrbital =
new int[L];
68 for (
int irrep=0; irrep<Nirreps; irrep++){
69 for (
int cnt=0; cnt<NDMRG[irrep]; cnt++){
70 irrepOfEachDMRGorbital[ NDMRGcumulative[irrep] + cnt ] = irrep;
72 for (
int cnt=0; cnt<NORB[irrep]; cnt++){
73 irrepOfEachOrbital[ NORBcumulative[irrep] + cnt ] = irrep;
85 delete [] NORBcumulative;
86 delete [] NDMRGcumulative;
87 delete [] irrepOfEachDMRGorbital;
88 delete [] irrepOfEachOrbital;
121 for (
int irrep = 0; irrep <
getNirreps(); irrep++ ){ total +=
getNOCC( irrep ); }
129 for (
int irrep = 0; irrep <
getNirreps(); irrep++ ){ the_max = max( the_max,
getNORB( irrep ) ); }
137 for (
int irrep = 0; irrep <
getNirreps(); irrep++ ){ paramsize += (
getNORB( irrep ) * (
getNORB( irrep ) - 1 ) ) / 2; }
145 for (
int irrep=0; irrep<Nirreps-1; irrep++){ cout << NORB[irrep] <<
" , "; }
146 cout << NORB[Nirreps-1] <<
" ]" << endl;
149 for (
int irrep=0; irrep<Nirreps-1; irrep++){ cout << NOCC[irrep] <<
" , "; }
150 cout << NOCC[Nirreps-1] <<
" ]" << endl;
152 cout <<
"NDMRG = [ ";
153 for (
int irrep=0; irrep<Nirreps-1; irrep++){ cout << NDMRG[irrep] <<
" , "; }
154 cout << NDMRG[Nirreps-1] <<
" ]" << endl;
156 cout <<
"NVIRT = [ ";
157 for (
int irrep=0; irrep<Nirreps-1; irrep++){ cout << NVIRT[irrep] <<
" , "; }
158 cout << NVIRT[Nirreps-1] <<
" ]" << endl;
int getNORB(const int irrep) const
Get the number of orbitals for an irrep.
int getOrigNVIRTstart(const int irrep) const
Get in the original Hamiltonian index the start orbital for the virtual orbitals with a certain irrep...
int getNOCCsum() const
Get the total number of occupied orbitals.
bool setGroup(const int nGroup)
Set the group.
int getROTparamsize() const
Get the orbital rotation parameter space size.
int getOrigNDMRGstart(const int irrep) const
Get in the original Hamiltonian index the start orbital for the active orbitals with a certain irrep...
int getNumberOfIrreps() const
Get the number of irreps for the currently activated group.
DMRGSCFindices(const int L, const int Group, int *NOCCin, int *NDMRGin, int *NVIRTin)
Constructor.
int getGroupNumber() const
Get the group number.
int * getIrrepOfEachDMRGorbital()
Get an array with the irreps of each DMRG orbital.
virtual ~DMRGSCFindices()
Destructor.
int getDMRGcumulative(const int irrep) const
Get the cumulative number of active orbitals for an irrep.
int getGroupNumber() const
Get the group number.
int getNORBmax() const
Get the maximum NORB.
int getL() const
Get the number of orbitals.
void Print() const
Print my contents.
int getNDMRG(const int irrep) const
Get the number of active orbitals for an irrep.
int getNOCC(const int irrep) const
Get the number of occupied orbitals for an irrep.
int getNVIRT(const int irrep) const
Get the number of virtual orbitals for an irrep.
int getOrbitalIrrep(const int index) const
Get the irrep corresponding to a global orbital index.
int getOrigNOCCstart(const int irrep) const
Get in the original Hamiltonian index the start orbital for the occupied orbitals with a certain irre...
int getNirreps() const
Get the number of irreps.