Commit 5023e76d authored by Samuel Tan's avatar Samuel Tan
Browse files

changed to genGamessIE(), now prints frags correctly

parent b6278c77
......@@ -147,10 +147,10 @@ def genGamess(curr_sys, tsk_d):
return out_f
def genFMO(curr_sys, tsk_d):
def genGamessIE(curr_sys, tsk_d):
if not curr_sys:
print("missing system arg in genGamess()")
print("missing system arg in genGamessIE()")
return 1
if "template" in tsk_d:
......@@ -177,6 +177,6 @@ def genFMO(curr_sys, tsk_d):
frag_d[i] = insert_List(frag_d[i], tag = "xyz_data", insertThis = mol.printMol("gamess"))
# add space in front of GROUP keywords, signaled by "$"
# doing this last so insert_List() etc don't interfere with it
out_f[i] = [" " + line if line.startswith("$") else line for line in out_f[i]]
frag_d[i] = [" " + line if line.startswith("$") else line for line in frag_d[i]]
return frag_d
task=gen_int_e
nfrag=4
mwords=200
guess_charges=true
using=xyz_files/c1mim-br-p1.xyz
title=My_Awesome_Input_File
RUNTYP=ENERGY
......@@ -52,7 +52,7 @@ def main():
# optional parameters that take an arg must be followed by a ":"
try:
opts, args = getopt.getopt(sys.argv[1:], "hi:o:t:")
opts, args = getopt.getopt(sys.argv[1:], "hi:o:t:j:")
except getopt.GetoptError:
usage()
sys.exit(3)
......@@ -83,6 +83,8 @@ def main():
taskDict["out_filename"] = optDict["-o"]
elif "-t" in optDict:
taskDict["template"] = optDict["-t"]
elif "-j" in optDict:
taskDict["task"] = optDict["-j"]
# System class from chemF
try:
......@@ -103,6 +105,7 @@ def main():
a = genPsi4(curr_sys = curr_sys, tsk_d = taskDict)
a = prettyPrint(a, taskDict.get("out_filename"))
return 0
# GAMESS optimisation
elif taskDict["task"] == "optGamess":
......@@ -114,6 +117,7 @@ def main():
a = optGamess(curr_sys = curr_sys, tsk_d = taskDict)
a = prettyPrint(a)
return 0
# GAMESS EFP
elif taskDict["task"] == "genefpinput":
......@@ -132,11 +136,21 @@ def main():
prettyPrint(a[0])
prettyPrint(a[1])
return 0
# GAMESS interaction energy (FMO version)
elif taskDict["task"] == "gen_int_e":
a = genGamessIE(curr_sys = curr_sys, tsk_d = taskDict)
for mol in a.values():
prettyPrint(mol)
return 0
else:
print("Task not recognized")
return 1
return a
#return a
main()
# this is a comment
task=psi4sapt
title=c1mim-bf4-p1-opt_IL_aTZ_sapt2plus3
using=./xyz_files/c1mim-bf4-p1.xyz
......
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