mirror of
https://gitlab.com/scemama/resultsFile.git
synced 2024-11-07 06:33:41 +01:00
Fix issue #2
This commit is contained in:
parent
d44905833e
commit
6df4a27d7d
@ -1023,26 +1023,30 @@ class gamessFile(resultsFile.resultsFileX):
|
|||||||
begin = pos
|
begin = pos
|
||||||
# Build vectors
|
# Build vectors
|
||||||
pos = begin
|
pos = begin
|
||||||
lmax = len(orbnum)+4
|
lmax = len(orbnum)
|
||||||
for l in range(4,lmax):
|
for l in range(lmax):
|
||||||
pos = begin
|
pos = begin
|
||||||
line = self.text[pos]
|
line = self.text[pos]
|
||||||
line = line.replace('-',' -').split()
|
line = [line[:5].strip(), line[5:8].strip(), line[8:11].strip(), line[11:14].strip()] \
|
||||||
|
+ line[14:].replace('-',' -').split()
|
||||||
v = orbital()
|
v = orbital()
|
||||||
v.set = index
|
v.set = index
|
||||||
v.basis = self.basis
|
v.basis = self.basis
|
||||||
if len(eigval)>0: v.eigenvalue = eigval[l-4]
|
if len(eigval)>0: v.eigenvalue = eigval[l]
|
||||||
if len(syms) >0: v.sym = syms[l-4]
|
if len(syms) >0: v.sym = syms[l]
|
||||||
while len(line) > 0 and pos < end:
|
print(self.text[pos].strip())
|
||||||
|
while len(line) > 4 and pos < end:
|
||||||
try:
|
try:
|
||||||
bid = int(line[2])
|
bid = int(line[2])
|
||||||
except ValueError:
|
except ValueError:
|
||||||
line.insert(2,str(curatom))
|
line.insert(2,str(curatom))
|
||||||
self.text[pos] = ' '.join(line)
|
self.text[pos] = ' '.join(line)
|
||||||
v.vector.append(float(line[l]))
|
v.vector.append(float(line[l+4]))
|
||||||
pos += 1
|
pos += 1
|
||||||
line = self.text[pos]
|
line = self.text[pos]
|
||||||
line = line.replace('-',' -').split()
|
line = [line[:5].strip(), line[5:8].strip(), line[8:11].strip(), line[11:14].strip()] \
|
||||||
|
+ line[14:].replace('-',' -').split()
|
||||||
|
print(line)
|
||||||
vectors.append(v)
|
vectors.append(v)
|
||||||
self._mo_sets[index] = vectors
|
self._mo_sets[index] = vectors
|
||||||
if 'BOYS' in self._mo_sets:
|
if 'BOYS' in self._mo_sets:
|
||||||
|
@ -416,7 +416,9 @@ def usage(fileType):
|
|||||||
print("Options:")
|
print("Options:")
|
||||||
print("--------")
|
print("--------")
|
||||||
print("")
|
print("")
|
||||||
for o in fileType.defined_vars + resultsFileX.defined_vars:
|
l = fileType.defined_vars + resultsFileX.defined_vars
|
||||||
|
l.sort()
|
||||||
|
for o in l:
|
||||||
line = (" --"+o).ljust(30)+': '
|
line = (" --"+o).ljust(30)+': '
|
||||||
for l in fileType.local_vars:
|
for l in fileType.local_vars:
|
||||||
if l[0] == o:
|
if l[0] == o:
|
||||||
|
Loading…
Reference in New Issue
Block a user