mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-12-22 20:36:01 +01:00
Added AO Normalization in trexio read. #41
This commit is contained in:
parent
a2e420e9a5
commit
e80c8d51ed
@ -704,6 +704,42 @@ qmckl_trexio_read_ao_X(qmckl_context context, trexio_t* const file)
|
||||
}
|
||||
#+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)
|
||||
|
||||
@ -711,7 +747,6 @@ qmckl_trexio_read_ao_X(qmckl_context context, trexio_t* const file)
|
||||
}
|
||||
#endif
|
||||
#+end_src
|
||||
|
||||
** Molecular orbitals
|
||||
|
||||
In this section we read the MO coefficients.
|
||||
|
Loading…
Reference in New Issue
Block a user