Commit d5eb5240 authored by Samuel Tan's avatar Samuel Tan
Browse files

todo: remove -s template and change -t from taskfile to template

parent e3e0e4ba
......@@ -48,7 +48,8 @@ def prettyPrint(contentsList, out_filename = None):
def usage():
usage_str = """
Usage:\n \t qcpp <task_file> -x <xyz_file> -o <out_filename> -t <task> -s <template>
Usage:
qcpp <task_file> -x <xyz_file> -o <out_filename> -t <task> -s <template>
See the "templates" directory for examples of templates
"""
warning(usage_str)
......@@ -65,6 +66,7 @@ def main():
opts, args = getopt.getopt(sys.argv[1:], "hx:o:t:s:")
except getopt.GetoptError:
usage()
warning("GetoptError: trouble reading in arguments")
sys.exit(3)
optDict = dict(opts)
......@@ -98,7 +100,7 @@ def main():
# override task file defaults with optional arguments
if "-x" in optDict:
taskDict["using"] = optDict["-i"]
taskDict["using"] = optDict["-x"]
elif "-o" in optDict:
taskDict["out_filename"] = optDict["-o"]
elif "-t" in optDict:
......@@ -147,7 +149,7 @@ def main():
print("Please remove line from task file and use a template file instead")
return 0
a = optGamess(curr_sys = curr_sys, tsk_d = taskDict)
a = prettyPrint(a)
a = prettyPrint(a, out_filename = taskDict["out_filename"])
return 0
......@@ -210,7 +212,7 @@ def main():
# note using same function as optimise, since
# basically just replacing xyz_data
a = optGamess(curr_sys = curr_sys, tsk_d = taskDict)
a = prettyPrint(a)
a = prettyPrint(a, out_filename = taskDict["out_filename"])
return 0
......@@ -221,4 +223,7 @@ def main():
#return a
# because we're still testing
# todo
# remove -s taskfile and change -t to template
main()
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