4x4 with 2 updates example is working again after adding update cycle 8169 dataset but with replacement updates instead of additive updates.

This commit is contained in:
François Coppens 2021-03-12 15:47:47 +01:00
parent ef97b40196
commit 6012b9decf
3 changed files with 39 additions and 4 deletions

View File

@ -0,0 +1,32 @@
#START_PACKET
#CYCLE_ID: 8169
#SLATER_MATRIX_DIM: 4
#NUPDATES: 2
#SLATER_MATRIX: (i (outer), j (inner)), slater_matrix_alpha(i,j), ddet * slater_matrix_alpha_inv_det(i,j) / ddet
(01,01) 0.100000000000000E+01 0.100000000000000E+01
(01,02) 0.000000000000000E+00 0.100000000000000E+01
(01,03) 0.100000000000000E+01 -0.100000000000000E+01
(01,04) -0.100000000000000E+01 -0.100000000000000E+01
(02,01) 0.000000000000000E+00 -0.100000000000000E+01
(02,02) 0.100000000000000E+01 0.000000000000000E+00
(02,03) 0.100000000000000E+01 0.100000000000000E+01
(02,04) 0.000000000000000E+00 0.000000000000000E+00
(03,01) -0.100000000000000E+01 0.100000000000000E+01
(03,02) 0.000000000000000E+00 0.200000000000000E+01
(03,03) -0.100000000000000E+01 -0.200000000000000E+01
(03,04) 0.000000000000000E+00 -0.100000000000000E+01
(04,01) 0.100000000000000E+01 0.100000000000000E+01
(04,02) 0.100000000000000E+01 0.100000000000000E+01
(04,03) 0.100000000000000E+01 -0.100000000000000E+01
(04,04) 0.100000000000000E+01 0.000000000000000E+00
#COL_UPDATE_INDEX: 2
#COL_UPDATE_COMP_(01): 0.000000000000000E+00
#COL_UPDATE_COMP_(02): -1.000000000000000E+00
#COL_UPDATE_COMP_(03): 0.000000000000000E+00
#COL_UPDATE_COMP_(04): 1.000000000000000E+00
#COL_UPDATE_INDEX: 4
#COL_UPDATE_COMP_(01): -1.000000000000000E+00
#COL_UPDATE_COMP_(02): -1.000000000000000E+00
#COL_UPDATE_COMP_(03): 0.000000000000000E+00
#COL_UPDATE_COMP_(04): -1.000000000000000E+00
#END_PACKET

View File

@ -17,7 +17,7 @@ void selectBestUpdate(unsigned int l, unsigned int N_updates,
breakdown = abs(1 + ylk[l][index][component]); breakdown = abs(1 + ylk[l][index][component]);
#ifdef DEBUG #ifdef DEBUG
cout << "Inside selectBestUpdate()" << endl; cout << "Inside selectBestUpdate()" << endl;
cout << "breakdown = abs(1 + ylk[" << l << "][" << index << "][" << component << "])" << endl; cout << "breakdown = abs(1 + ylk[" << l << "][" << index << "][" << component << "]) = " << breakdown << endl;
cout << endl; cout << endl;
#endif #endif
if (breakdown > max) { if (breakdown > max) {
@ -69,7 +69,7 @@ void MaponiA3(double *Slater_inv, unsigned int Dim,
for (k = 1; k < N_updates + 1; k++) { for (k = 1; k < N_updates + 1; k++) {
#ifdef DEBUG #ifdef DEBUG
cout << "Compute y0k: " << endl; cout << "Compute y0k: " << endl;
cout << "ylk[0][" << k << "][:]" << endl; cout << "ylk[0][" << k << "][:]";
cout << endl; cout << endl;
#endif #endif
for (i = 1; i < Dim + 1; i++) { for (i = 1; i < Dim + 1; i++) {
@ -78,6 +78,9 @@ void MaponiA3(double *Slater_inv, unsigned int Dim,
* Updates[(k-1)*Dim + (j-1)]; * Updates[(k-1)*Dim + (j-1)];
} }
} }
#ifdef DEBUG
showVector(ylk[0][k], Dim, "");
#endif
} }
// Calculate the {y_{l,k}} from the {y_{0,k}} // Calculate the {y_{l,k}} from the {y_{0,k}}
@ -96,7 +99,7 @@ void MaponiA3(double *Slater_inv, unsigned int Dim,
#ifdef DEBUG #ifdef DEBUG
cout << "p[l+1] = " << p[l+1] << endl; cout << "p[l+1] = " << p[l+1] << endl;
cout << "component = " << component << endl; cout << "component = " << component << endl;
cout << "beta = 1 + ylk[" << l << "][" << p[l+1] << "][" << component << "]" << endl; cout << "beta = 1 + ylk[" << l << "][" << p[l+1] << "][" << component << "] = " << beta << endl;
cout << endl; cout << endl;
#endif #endif
if (fabs(beta) < 1e-6) { if (fabs(beta) < 1e-6) {

View File

@ -9,7 +9,7 @@ program QMCChem_dataset_test
real(c_double), dimension(:,:), allocatable :: Updates, U real(c_double), dimension(:,:), allocatable :: Updates, U
real(c_double), dimension(:,:), allocatable :: S, S_inv, S_inv_t real(c_double), dimension(:,:), allocatable :: S, S_inv, S_inv_t
call Read_dataset("datasets/update_cycle_8169.dat", & call Read_dataset("datasets/update_cycle_8169_repl.dat", &
cycle_id, & cycle_id, &
dim, & dim, &
n_updates, & n_updates, &