58 bar3(1.0/(
N-1.0), tpm);
89 return (*
this)(0,a%
L);
100 (*
this)(0,i) = scal * tpm(0,i,i);
119 (*
this)(0,i) += tpm.
getDiag(i,a);
121 (*this)(0,i) *= scal;
138 (*
this)(0,i) += 2 * tpm.
getDiag(i,a);
140 (*this)(0,i) *= scal;
148 output <<
"SPM (2x): " << std::endl;
150 for(
int i=0;i<spm.
gL();i++)
151 output << i <<
"\t|\t" << i <<
" " << i <<
"\t\t" << spm(0,i) << std::endl;
164 (*
this)(0,i) += phm(i,a,i,a)+phm(i,a+L,i,a+L);
166 (*this)(0,i) *= scal;
175 std::vector<std::pair<int, double>> spm_elems;
176 spm_elems.reserve(
L);
179 spm_elems.push_back(std::make_pair(i, (*
this)(0,i)));
181 std::sort(spm_elems.begin(), spm_elems.end(),
182 [](
const std::pair<int,double> & a,
const std::pair<int,double> & b) ->
bool
184 return a.second < b.second;
187 for(
auto& elem: spm_elems)
188 std::cout << elem.first <<
"\t|\t" << elem.first <<
" " << elem.first <<
"\t\t" << elem.second << std::endl;
201 std::vector<double> results(symgroup.getNumberOfIrreps(), 0);
204 results[orbtoirrep[a]] += 2*(*
this)(0,a);
208 std::cout <<
"Group: " << symgroup.getGroupName() << std::endl;
209 for(
int i=0;i<symgroup.getNumberOfIrreps();i++)
210 std::cout << symgroup.getIrrepName(i) <<
":\t" << results[i] << std::endl;
void bar(double, const TPM &)
double GetElement(int, int) const
int L
the size of the sp DOCI space (there are 2*L sp states)
const int * get_irrep_each_orbital() const
void bar2(double, const TPM &)
std::ostream & operator<<(std::ostream &output, const doci2DM::BlockStructure< MyBlockType > &blocks_p)
void setDim(int, int, int)
std::vector< double > Particlesperirrep(const simanneal::OptIndex &index, bool print=true) const
double getDiag(int, int) const
void bar3(double, const TPM &)