added the g09_zmat_to_qp_create.py
This commit is contained in:
parent
10df488f42
commit
bf63ae8528
Binary file not shown.
@ -548,13 +548,14 @@ Regarding the wave function chosen to define the local range-separation paramete
|
||||
\hline
|
||||
& ex (FC)FCI+PBE & 225.8 & 227.6 & 228.4 & 228.6 & \\
|
||||
& ex (FC)FCI+PBE -val & 228.0 & 227.8 & 228.5 & 228.6 & \\
|
||||
& ex FCI & 202.0 & 218.5 & 224.3 & ----- & \\
|
||||
\hline
|
||||
& ex FCI+LDA & 217.8 & 226.8 & 229.0 & ----- & \\
|
||||
& ex FCI+LDA-val & 218.8 & 226.9 & 229.0 & ----- & \\
|
||||
& ex FCI & 202.0 & 218.5 & 224.3 & 227.1 & \\
|
||||
\hline
|
||||
& ex FCI+PBE & 226.2 & 228.2 & 229.0 & ----- & \\
|
||||
& ex FCI+PBE -val & 227.8 & 228.2 & 229.0 & ----- & \\
|
||||
& ex FCI+LDA & 217.8 & 226.8 & 229.0 & 229.9 & \\
|
||||
& ex FCI+LDA-val & 218.8 & 226.9 & 229.0 & 229.9 & \\
|
||||
\hline
|
||||
& ex FCI+PBE & 226.2 & 228.2 & 229.0 & 229.3 & \\
|
||||
& ex FCI+PBE -val & 227.8 & 228.2 & 229.0 & 229.2 & \\
|
||||
\\
|
||||
\end{tabular}
|
||||
\end{ruledtabular}
|
||||
|
57
Ref/Molecules/g09_zmat_to_qp_create.py
Executable file
57
Ref/Molecules/g09_zmat_to_qp_create.py
Executable file
@ -0,0 +1,57 @@
|
||||
#!/usr/bin/env python2
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
def findall(sub, string):
|
||||
"""
|
||||
>>> text = "Allowed Hello Hollow"
|
||||
>>> tuple(findall('ll', text))
|
||||
(1, 10, 16)
|
||||
"""
|
||||
index = 0 - len(sub)
|
||||
try:
|
||||
while True:
|
||||
index = string.index(sub, index + len(sub))
|
||||
yield index
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
filepath = sys.argv[1]
|
||||
basis = sys.argv[2]
|
||||
icount = 0
|
||||
zmat = []
|
||||
with open(filepath, "r") as fp:
|
||||
cipsi = []
|
||||
for line in fp:
|
||||
if (icount == 0 ):
|
||||
a=line.split(',')
|
||||
charge = int(a[0])
|
||||
spin = int(a[1])
|
||||
else:
|
||||
a=line.split()
|
||||
if(len(a)>0):
|
||||
n=a[0].count(',')
|
||||
if(n > 6):
|
||||
listfind=list(findall(',', a[0]))
|
||||
char=a[0]
|
||||
a[0]=char[0:listfind[n-1]]
|
||||
|
||||
b=a[0].replace(',', ' ')
|
||||
b=b.replace('=', ' ')
|
||||
zmat.append(b)
|
||||
else:
|
||||
b=" "
|
||||
zmat.append(b)
|
||||
|
||||
icount += 1
|
||||
|
||||
c = filepath.split('.')
|
||||
file_origin = c[0]
|
||||
ezfio = file_origin+".ezfio"
|
||||
zmat_file = file_origin+".zmt"
|
||||
file_zmat = open(zmat_file,"w+")
|
||||
for l in zmat:
|
||||
file_zmat.write(l +'\n')
|
||||
|
||||
print("qp_create_ezfio -m %s -c %s -b %s -o %s %s" % (spin,charge,basis,ezfio,zmat_file))
|
Loading…
Reference in New Issue
Block a user