From 5a095c490dfd1675915817c803ca87072e839fae Mon Sep 17 00:00:00 2001 From: v1j4y Date: Mon, 27 Sep 2021 18:39:45 +0200 Subject: [PATCH] Check whether MO basis has been initialized before computations. #32 --- org/qmckl_mo.org | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/org/qmckl_mo.org b/org/qmckl_mo.org index e13cbc5..2914c62 100644 --- a/org/qmckl_mo.org +++ b/org/qmckl_mo.org @@ -377,6 +377,13 @@ qmckl_exit_code qmckl_provide_mo_vgl(qmckl_context context) NULL); } + if (!ctx->mo_basis.provided) { + return qmckl_failwith( context, + QMCKL_NOT_PROVIDED, + "qmckl_mo_basis", + NULL); + } + /* Compute if necessary */ if (ctx->electron.coord_new_date > ctx->mo_basis.mo_vgl_date) {