30 void CheMPS2::CASSCF::checkHF(
int * docc,
int * socc ){
32 double EnergyHF = NUCL_ORIG;
34 cout <<
"Single particle energy levels : " << endl;
35 for (
int irrep = 0; irrep < num_irreps; irrep++ ){
36 for (
int orb = 0; orb < iHandler->
getNORB( irrep ); orb++ ){
38 double SPenergy = TMAT_ORIG->
get( irrep, orb, orb );
40 const int num_beta = (( orb < docc[ irrep ] ) ? 1 : 0 );
41 const int num_alpha = (( orb < docc[ irrep ] + socc[ irrep ] ) ? 1 : 0 );
42 const int num_total = num_alpha + num_beta;
44 EnergyHF += num_total * TMAT_ORIG->
get( irrep, orb, orb );
46 for (
int irrep2 = 0; irrep2 < num_irreps; irrep2++ ){
47 for (
int orb2 = 0; orb2 < iHandler->
getNORB( irrep2 ); orb2++ ){
49 const int num_beta2 = (( orb2 < docc[ irrep2 ] ) ? 1 : 0 );
50 const int num_alpha2 = (( orb2 < docc[ irrep2 ] + socc[ irrep2 ] ) ? 1 : 0 );
51 const int num_total2 = num_alpha2 + num_beta2;
53 SPenergy += ( num_total2 * VMAT_ORIG->
get( irrep, irrep2, irrep, irrep2, orb, orb2, orb, orb2 )
54 - num_alpha2 * VMAT_ORIG->
get( irrep, irrep, irrep2, irrep2, orb, orb, orb2, orb2 ) );
56 EnergyHF += 0.5 * num_total * num_total2 * VMAT_ORIG->
get( irrep, irrep2, irrep, irrep2, orb, orb2, orb, orb2 );
57 EnergyHF -= 0.5 * ( num_alpha * num_alpha2 + num_beta * num_beta2 ) * VMAT_ORIG->
get( irrep, irrep, irrep2, irrep2, orb, orb, orb2, orb2 );
61 cout <<
" Orb " << iHandler->
getOrigNOCCstart( irrep ) + orb <<
" : "<< orb + 1 << SymmInfo.
getIrrepName(irrep) <<
" = " << SPenergy << endl;
64 cout <<
"HF energy = " << EnergyHF << endl;
68 void CheMPS2::CASSCF::coeff_fe2( DMRG * theDMRG ){
76 assert( nOrbDMRG == 28 );
79 int coeff0[] = { 2, 2, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 2, 0, 0, 2, 0, 0 };
80 int coeff1[] = { 2, 1, 1, 0, 0, 0, 1, 0, 2, 0, 0, 1, 0, 0, 1, 0, 2, 1, 1, 0, 0, 0, 2, 0, 0, 1, 0, 0 };
81 int coeff2[] = { 2, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 2, 0, 0, 1, 0, 2, 1, 1, 0, 0, 0, 1, 0, 0, 2, 0, 0 };
83 int coeff3[] = { 2, 2, 1, 0, 0, 0, 2, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0 };
84 int coeff4[] = { 2, 1, 1, 0, 0, 0, 2, 0, 2, 0, 0, 1, 0, 0, 1, 0, 2, 1, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0 };
85 int coeff5[] = { 2, 1, 1, 0, 0, 0, 2, 0, 1, 0, 0, 2, 0, 0, 1, 0, 2, 1, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0 };
87 int coeff6[] = { 2, 2, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 2, 1, 1, 0, 0, 0, 2, 0, 0, 2, 0, 0 };
88 int coeff7[] = { 2, 2, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0 };
90 const double value0 = theDMRG->getSpecificCoefficient( coeff0 );
91 const double value1 = theDMRG->getSpecificCoefficient( coeff1 );
92 const double value2 = theDMRG->getSpecificCoefficient( coeff2 );
93 cout <<
"Coeff of main contribution ^9 Sigma_g^- = " << value0 << endl;
94 cout <<
"Coeff of | pi_x > excitation ^9 Sigma_g^- = " << value1 << endl;
95 cout <<
"Coeff of | pi_y > excitation ^9 Sigma_g^- = " << value2 << endl;
96 const double value3 = theDMRG->getSpecificCoefficient( coeff3 );
97 const double value4 = theDMRG->getSpecificCoefficient( coeff4 );
98 const double value5 = theDMRG->getSpecificCoefficient( coeff5 );
99 cout <<
"Coeff of main contribution ^7 Delta_u = " << value3 << endl;
100 cout <<
"Coeff of | pi_x > excitation ^7 Delta_u = " << value4 << endl;
101 cout <<
"Coeff of | pi_y > excitation ^7 Delta_u = " << value5 << endl;
102 const double value6 = theDMRG->getSpecificCoefficient( coeff6 );
103 const double value7 = theDMRG->getSpecificCoefficient( coeff7 );
104 cout <<
"Coeff of main contrib anion ^8 Sigma_u^- = " << value6 << endl;
105 cout <<
"Coeff of main contrib cation ^8 Sigma_u^- = " << value7 << endl;
int getNORB(const int irrep) const
Get the number of orbitals for an irrep.
double get(const int irrep_i, const int irrep_j, const int irrep_k, const int irrep_l, const int i, const int j, const int k, const int l) const
Get an element.
double get(const int irrep, const int i, const int j) const
Get an element.
int getOrigNOCCstart(const int irrep) const
Get in the original Hamiltonian index the start orbital for the occupied orbitals with a certain irre...
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 ...