From 202a426062bd30900e36f86431c869f674fcf68c Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 5 Oct 2021 12:03:31 +0200 Subject: [PATCH] Add normf in gamessFile --- resultsFile/Modules/gamessFile.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/resultsFile/Modules/gamessFile.py b/resultsFile/Modules/gamessFile.py index 7a55a45..c7992d5 100755 --- a/resultsFile/Modules/gamessFile.py +++ b/resultsFile/Modules/gamessFile.py @@ -44,7 +44,7 @@ gamessFile_defined_vars = [ "date", "version", "machine", "memory", "disk",\ "closed_mos", "active_mos", "virtual_mos", \ "determinants_mo_type", "det_coefficients", \ "csf_mo_type", "csf_coefficients", "symmetries", "occ_num", \ - "csf", "num_states", "two_e_int_ao_filename", "pseudo", + "csf", "num_states", "two_e_int_ao_filename", "pseudo", "normf", \ "one_e_int_ao_filename", "atom_to_ao_range", "gradient_energy" ] class gamessFile(resultsFile.resultsFileX): @@ -63,6 +63,25 @@ class gamessFile(resultsFile.resultsFileX): exec(get_data('charge',"CHARGE OF MOLECULE", '4:5',"float"), locals()) exec(get_data('nuclear_energy',"THE NUCLEAR REPULSION ENERGY", '5:6',"float"), locals()) + def get_normf(self): + try: + getattr(self,'_normf') + except AttributeError: + self._normf = None + + if self._normf is None: + self._normf=0 + try: + self.find_string("RUN TITLE") + self.find_next_string("NORMF = ") + pos = self._pos + self._normf = int(self.text[pos].split("=")[1].split()[0]) + except IndexError: + pass + return self._normf + + normf = property (get_normf, None) + def get_multiplicity(self): if self._multiplicity is None: try: