From 7d94e9616f20e6905c0ca4cad2e8709e859af9c8 Mon Sep 17 00:00:00 2001 From: meister Date: Sat, 27 Jul 2024 06:50:38 -0400 Subject: [PATCH] Signal error if no charges were loaded from sqm output --- src/lisp/cando/charges/sqm-interface.lisp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lisp/cando/charges/sqm-interface.lisp b/src/lisp/cando/charges/sqm-interface.lisp index 82200910..4b357a39 100644 --- a/src/lisp/cando/charges/sqm-interface.lisp +++ b/src/lisp/cando/charges/sqm-interface.lisp @@ -61,6 +61,8 @@ qm-charge : The overall charge of the molecule" (vector-push-extend charge charge-vec))) do (when (string= line " Atom Element Mulliken Charge") (setf line-charge 1))))) + (when (= (length charge-vec) 0) + (error "No charges were read from sqm output file ~s" pathname)) (values atom-number-vec element-vec charge-vec))) (defun parse-mulliken-charge (line)