From ca97e90da34bba9d194ee7bc40b585a528170047 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 6 Nov 2018 22:08:26 +0100 Subject: [PATCH] Fixed Gamess with symmetry --- resultsFile/Modules/gamessFile.py | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/resultsFile/Modules/gamessFile.py b/resultsFile/Modules/gamessFile.py index 77916c9..74ed09f 100755 --- a/resultsFile/Modules/gamessFile.py +++ b/resultsFile/Modules/gamessFile.py @@ -601,9 +601,13 @@ class gamessFile(resultsFile): end = self._pos pos += 4 basis_read = [] + atom = [] while pos < end: line = self.text[pos].split() bf = [] + if len(line) == 1: + basis_read.append(atom) + atom = [] while len(line) > 1: index = int(line[0]) sym = line[1] @@ -617,13 +621,32 @@ class gamessFile(resultsFile): pos += 1 line = self.text[pos].split() if len(bf) > 0: - basis_read.append( [index, sym, bf] ) + atom.append( [index, sym, bf] ) pos += 1 + basis_read.append(atom) + + new_basis_read = [] + ib = 1 + for iatom in range(len(basis_read)): + atom = basis_read[iatom] + for (i, s, b) in atom: + new_basis_read += [ [ib, s, b] ] + ib += 1 + if iatom+1 < len(basis_read): + while ib < basis_read[iatom+1][0][0]: + for (i, s, b) in atom: + new_basis_read += [ [ib, s, b] ] + ib += 1 + + basis_read = new_basis_read + Nmax = basis_read[len(basis_read)-1][0] basis = [None for i in range(Nmax)] for b in basis_read: basis[b[0]-1] = [b[1],b[2]] + + NotNone = 0 ReadNone = False for i in range(len(basis)-1,-1,-1): @@ -673,6 +696,7 @@ class gamessFile(resultsFile): for i in mylist[-1:]: basis[k][0] = i k+=1 + for a,i in enumerate(self.atom_to_ao_range): for j in range(i[0]-1,i[1]): basis[j].append(a)