1
0
mirror of https://github.com/TREX-CoE/qmckl.git synced 2024-12-23 04:44:03 +01:00

Added AO Normalization in trexio read. #41

This commit is contained in:
v1j4y 2021-10-25 15:29:08 +02:00
parent a2e420e9a5
commit e80c8d51ed

View File

@ -704,6 +704,42 @@ qmckl_trexio_read_ao_X(qmckl_context context, trexio_t* const file)
} }
#+end_src #+end_src
*** AO Normalization
#+begin_src c :tangle (eval c)
{
qmckl_memory_info_struct mem_info = qmckl_memory_info_struct_zero;
mem_info.size = ao_num * sizeof(double);
double* ao_normalization = (double*) qmckl_malloc(context, mem_info);
if (ao_normalization == NULL) {
return qmckl_failwith( context,
QMCKL_ALLOCATION_FAILED,
"qmckl_trexio_read_ao_normalization_X",
NULL);
}
assert (ao_normalization != NULL);
rcio = trexio_read_ao_normalization_64(file, ao_normalization);
if (rcio != TREXIO_SUCCESS) {
return qmckl_failwith( context,
QMCKL_FAILURE,
"trexio_read_ao_normalization",
trexio_string_of_error(rcio));
}
rc = qmckl_set_ao_basis_ao_factor(context, ao_normalization);
qmckl_free(context, ao_normalization);
ao_normalization = NULL;
if (rc != QMCKL_SUCCESS)
return rc;
}
#+end_src
#+begin_src c :tangle (eval c) #+begin_src c :tangle (eval c)
@ -711,7 +747,6 @@ qmckl_trexio_read_ao_X(qmckl_context context, trexio_t* const file)
} }
#endif #endif
#+end_src #+end_src
** Molecular orbitals ** Molecular orbitals
In this section we read the MO coefficients. In this section we read the MO coefficients.