From c1c5a4a8aaa5021b6eb46044d57ad07445c0dc72 Mon Sep 17 00:00:00 2001 From: v1j4y Date: Mon, 27 Sep 2021 18:30:59 +0200 Subject: [PATCH] Provided function to check for MO basis. #32 --- org/qmckl_mo.org | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/org/qmckl_mo.org b/org/qmckl_mo.org index 31da1cd..e13cbc5 100644 --- a/org/qmckl_mo.org +++ b/org/qmckl_mo.org @@ -180,6 +180,19 @@ int64_t qmckl_get_mo_basis_mo_num (const qmckl_context context) { return ctx->mo_basis.mo_num; } +bool qmckl_mo_basis_provided(const qmckl_context context) { + + if (qmckl_context_check(context) == QMCKL_NULL_CONTEXT) { + return false; + } + + qmckl_context_struct* const ctx = (qmckl_context_struct* const) context; + assert (ctx != NULL); + + return ctx->mo_basis.provided; +} + + #+end_src ** Initialization functions @@ -768,7 +781,7 @@ for (int i=0; i