mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-21 11:03:29 +01:00
Open-Shell CSF: Fix bug in convertCSFtoDetBasis.
This commit is contained in:
parent
9b8ee6dd2d
commit
e06ab2fd05
@ -334,10 +334,21 @@ void convertCSFtoDetBasis(int64_t Isomo, int MS, int rowsmax, int colsmax, doubl
|
|||||||
Get Overlap
|
Get Overlap
|
||||||
************************************/
|
************************************/
|
||||||
// Fill matrix
|
// Fill matrix
|
||||||
|
|
||||||
|
int rowsbftodetI, colsbftodetI;
|
||||||
|
|
||||||
|
/***********************************
|
||||||
|
Get BFtoDeterminant Matrix
|
||||||
|
************************************/
|
||||||
|
|
||||||
|
printf("In convertcsftodet\n");
|
||||||
|
convertBFtoDetBasis(Isomo, MS, &bftodetmatrixI, &rowsbftodetI, &colsbftodetI);
|
||||||
|
|
||||||
int rowsI = 0;
|
int rowsI = 0;
|
||||||
int colsI = 0;
|
int colsI = 0;
|
||||||
|
|
||||||
getOverlapMatrix(Isomo, MS, &overlapMatrixI, &rowsI, &colsI, &NSOMO);
|
//getOverlapMatrix(Isomo, MS, &overlapMatrixI, &rowsI, &colsI, &NSOMO);
|
||||||
|
getOverlapMatrix_withDet(bftodetmatrixI, rowsbftodetI, colsbftodetI, Isomo, MS, &overlapMatrixI, &rowsI, &colsI, &NSOMO);
|
||||||
|
|
||||||
|
|
||||||
/***********************************
|
/***********************************
|
||||||
@ -348,14 +359,6 @@ void convertCSFtoDetBasis(int64_t Isomo, int MS, int rowsmax, int colsmax, doubl
|
|||||||
|
|
||||||
gramSchmidt(overlapMatrixI, rowsI, colsI, orthoMatrixI);
|
gramSchmidt(overlapMatrixI, rowsI, colsI, orthoMatrixI);
|
||||||
|
|
||||||
/***********************************
|
|
||||||
Get BFtoDeterminant Matrix
|
|
||||||
************************************/
|
|
||||||
|
|
||||||
int rowsbftodetI, colsbftodetI;
|
|
||||||
|
|
||||||
convertBFtoDetBasis(Isomo, MS, &bftodetmatrixI, &rowsbftodetI, &colsbftodetI);
|
|
||||||
|
|
||||||
/***********************************
|
/***********************************
|
||||||
Get Final CSF to Det Matrix
|
Get Final CSF to Det Matrix
|
||||||
************************************/
|
************************************/
|
||||||
@ -1305,7 +1308,7 @@ void getbftodetfunction(Tree *dettree, int NSOMO, int MS, int *BF1, double *rowv
|
|||||||
donepq[i] = 0.0;
|
donepq[i] = 0.0;
|
||||||
for(int i=0;i<npairs;++i){
|
for(int i=0;i<npairs;++i){
|
||||||
for(int j=0;j<NSOMO;++j)
|
for(int j=0;j<NSOMO;++j)
|
||||||
detslist[i*npairs + j]=0;
|
detslist[i*NSOMO + j]=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i = 0; i < NSOMO; i++){
|
for(int i = 0; i < NSOMO; i++){
|
||||||
@ -1337,8 +1340,11 @@ void getbftodetfunction(Tree *dettree, int NSOMO, int MS, int *BF1, double *rowv
|
|||||||
for(int i = 0; i < npairs; i++){
|
for(int i = 0; i < npairs; i++){
|
||||||
for(int j = 0; j < NSOMO; j++) {
|
for(int j = 0; j < NSOMO; j++) {
|
||||||
inpdet[j] = detslist[i*NSOMO + j];
|
inpdet[j] = detslist[i*NSOMO + j];
|
||||||
|
printf(" %d ",inpdet[j]);
|
||||||
}
|
}
|
||||||
|
printf("\n");
|
||||||
findAddofDetDriver(dettree, NSOMO, inpdet, &addr);
|
findAddofDetDriver(dettree, NSOMO, inpdet, &addr);
|
||||||
|
printf("(%d) - addr = %d\n",i,addr);
|
||||||
// Calculate the phase for cfg to QP2 conversion
|
// Calculate the phase for cfg to QP2 conversion
|
||||||
//get_phase_cfg_to_qp_inpList(inpdet, NSOMO, &phase_cfg_to_qp);
|
//get_phase_cfg_to_qp_inpList(inpdet, NSOMO, &phase_cfg_to_qp);
|
||||||
//rowvec[addr] = 1.0 * phaselist[i]*phase_cfg_to_qp/sqrt(fac);
|
//rowvec[addr] = 1.0 * phaselist[i]*phase_cfg_to_qp/sqrt(fac);
|
||||||
|
Loading…
Reference in New Issue
Block a user