Skip to content

Commit

Permalink
on very large files, overflow a cutoff i put in parse_gaussian
Browse files Browse the repository at this point in the history
  • Loading branch information
corinwagen committed Jan 2, 2023
1 parent f79cff5 commit c922f8a
Show file tree
Hide file tree
Showing 3 changed files with 166,113 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cctk/parse_gaussian.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Functions to help with parsing Gaussian files
"""

def read_file_fast(file_text, filename, link1idx, max_len=20000, extended_opt_info=False, fail_silently=True):
def read_file_fast(file_text, filename, link1idx, max_len=50000, extended_opt_info=False, fail_silently=True):

#### "Make your bottleneck routines fast, everything else clear" - M. Scott Shell, UCSB
#### Welcome to the fast part!
Expand Down Expand Up @@ -330,9 +330,10 @@ def parse_geometry(blocks):
current_nums.append(int(pieces[1]))
current_geoms.append([float(pieces[3]), float(pieces[4]), float(pieces[5])])
except:
print(block)
print("\n\n")
print(line)
#print(block)
#print("\n\n")
#print(line)
pass
nums.append(current_nums)
geoms.append(current_geoms)
return nums, geoms
Expand Down Expand Up @@ -551,7 +552,6 @@ def parse_modes(freq_block, num_atoms, hpmodes=False):
force_ks += re.split(" +", lines[2])[4:]
intensities += re.split(" +", lines[3].rstrip())[4:]


for line in lines[5:]:
fields = re.split(" +", line)
fields = list(filter(None, fields))
Expand Down

0 comments on commit c922f8a

Please sign in to comment.