Commit 0193b5a4 authored by Samuel Tan's avatar Samuel Tan
Browse files

added check for xyz file 1st line in System class, and EFP frag printing to .inp in ppqc

parent 1e148518
......@@ -116,7 +116,12 @@ class System(object):
self.lineno = len(self.f) - 2 # no of lines in xyz file
self.f = [line.split() for line in self.f]
self.size = int(self.f[0][0]) # number of atoms
try:
self.size = int(self.f[0][0]) # number of atoms
except ValueError:
print("ValueError on first line: is your xyz file of the correct format?")
sys.exit(1)
if self.size != self.lineno:
print("WARNING: number of lines (", self.lineno, ") and number of atoms (", self.size, ") do not match in xyz file")
if self.f[1]:
......
......@@ -179,8 +179,8 @@ def main():
return 0
a = efpGamess(curr_sys = curr_sys, tsk_d = taskDict)
if taskDict.get("out_filename"):
prettyPrint(a[0], taskDict["out_filename"] + "0")
prettyPrint(a[1], taskDict["out_filename"] + "1")
prettyPrint(a[0], taskDict["out_filename"] + "1" + ".inp")
prettyPrint(a[1], taskDict["out_filename"] + "2" + ".inp")
else:
#prettyPrint(a[0], "efp_frag_0.inp")
#prettyPrint(a[1], "efp_frag_1.inp")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment