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

improved CP files and fragment file writing in mp2Psi4() for Zoe

parent b5fa524f
......@@ -126,16 +126,22 @@ def mp2Psi4(curr_sys, tsk_d):
for i,mol in enumerate(curr_sys.molDict.values()):
ins = mol.printMol("psi4")
# starting index 1
out_f_d[i+1] = insert_List(out_f, tag = "xyz_data", insertThis = ins)
allmol = curr_sys.molDict.keys()
for l, k in enumerate(allmol):
# fragment of interest
cp1 = curr_sys.molDict[k].printMol("psi4")
cp1 = [ " @" + i.lstrip() for i in cp1]
for m,n in curr_sys.molDict.items():
if m != k:
cp1 += n.printMol("psi4")
out_f_d[l+3] = insert_List(out_f, tag = "xyz_data", insertThis = cp1)
ghosted = [] # to contain ghost atoms with @ in front
# ghost the other fragments
for j in allmol:
if j != k:
cp2 = curr_sys.molDict[j].printMol("psi4")
cp2 = [ " @" + i.lstrip() for i in cp2]
ghosted += cp2
# need to account for fragments already in, + 1 because 1 is starting index
out_f_d[l + tsk_d["nfrag"] + 1] = insert_List(out_f, tag = "xyz_data", insertThis = cp1 + ghosted)
# write complex
out_f_d["complex"] = insert_List(out_f, tag = "xyz_data", insertThis = curr_sys.printSys("psi4"))
......
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