mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2025-01-03 18:16:28 +01:00
Added test for MO but deactivated because slow. #32
This commit is contained in:
parent
4df8a5e066
commit
0c0f8e53d0
@ -120,7 +120,7 @@ typedef struct qmckl_mo_basis_struct {
|
||||
this mechanism.
|
||||
|
||||
** Access functions
|
||||
|
||||
|
||||
#+begin_src c :comments org :tangle (eval h_private_func) :exports none
|
||||
char qmckl_get_mo_basis_type (const qmckl_context context);
|
||||
int64_t qmckl_get_mo_basis_mo_num (const qmckl_context context);
|
||||
@ -277,7 +277,6 @@ qmckl_exit_code qmckl_set_mo_basis_coefficient(qmckl_context context, const dou
|
||||
qmckl_memory_info_struct mem_info = qmckl_memory_info_struct_zero;
|
||||
mem_info.size = ctx->ao_basis.ao_num * ctx->mo_basis.mo_num * sizeof(double);
|
||||
double* new_array = (double*) qmckl_malloc(context, mem_info);
|
||||
|
||||
if (new_array == NULL) {
|
||||
return qmckl_failwith( context,
|
||||
QMCKL_ALLOCATION_FAILED,
|
||||
@ -783,23 +782,44 @@ double mo_vgl[5][walk_num][elec_num][chbrclf_mo_num];
|
||||
rc = qmckl_get_mo_basis_vgl(context, &(mo_vgl[0][0][0][0]));
|
||||
assert (rc == QMCKL_SUCCESS);
|
||||
|
||||
//// Overlap of MOs
|
||||
//double ovl[mo_num][mo_num];
|
||||
//for (int i=0; i<mo_num; ++i) {
|
||||
//for (int j=0; j<mo_num; ++j) {
|
||||
// ovl[i][j] = 0.0;
|
||||
//}
|
||||
// Test overlap of MO
|
||||
//double point_x[100];
|
||||
//double point_y[100];
|
||||
//double point_z[100];
|
||||
//int32_t npoints=100;
|
||||
//// obtain points
|
||||
//double dr = 20./(npoints-1);
|
||||
//double dr3 = dr*dr*dr;
|
||||
//
|
||||
//for (int i=0;i<npoints;++i) {
|
||||
// point_x[i] = -10. + dr*i;
|
||||
// point_y[i] = -10. + dr*i;
|
||||
// point_z[i] = -10. + dr*i;
|
||||
//}
|
||||
//
|
||||
//for (int iel=0;iel<elec_num;++iel){
|
||||
//for (int i=0; i<mo_num; ++i) {
|
||||
//for (int j=0; j<mo_num; ++j) {
|
||||
// ovl[i][j] += mo_vgl[0][0][iel][i] * mo_vgl[0][0][iel][j];
|
||||
//double ovlmo1 = 0.0;
|
||||
//// Calculate overlap
|
||||
//for (int i=0;i<npoints;++i) {
|
||||
// printf(".");
|
||||
// fflush(stdout);
|
||||
// for (int j=0;j<npoints;++j) {
|
||||
// for (int k=0;k<npoints;++k) {
|
||||
// // Set point
|
||||
// elec_coord[0] = point_x[i];
|
||||
// elec_coord[1] = point_y[j];
|
||||
// elec_coord[2] = point_z[k];
|
||||
// rc = qmckl_set_electron_coord (context, 'N', elec_coord);
|
||||
// assert(rc == QMCKL_SUCCESS);
|
||||
//
|
||||
// // Calculate value of MO (1st electron)
|
||||
// double mo_vgl[5][walk_num][elec_num][chbrclf_mo_num];
|
||||
// rc = qmckl_get_mo_basis_vgl(context, &(mo_vgl[0][0][0][0]));
|
||||
// assert (rc == QMCKL_SUCCESS);
|
||||
// ovlmo1 += mo_vgl[0][0][0][0];
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//}
|
||||
//}
|
||||
//for (int i=0;i<mo_num-1;++i)
|
||||
// printf("%d) %10.14f (%10.14f)\n",ovl[i][i], ovl[i][i+1]);
|
||||
//printf("OVL MO1 = %10.15f\n",ovlmo1);
|
||||
|
||||
|
||||
printf("\n");
|
||||
|
Loading…
Reference in New Issue
Block a user