2019-03-02 14:51:20 +01:00
|
|
|
import sys
|
2019-03-01 01:54:10 +01:00
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
|
|
system = []
|
|
|
|
ev = []
|
|
|
|
hf_lda = []
|
|
|
|
val_lda = []
|
|
|
|
|
|
|
|
|
2019-03-15 16:30:46 +01:00
|
|
|
filepath = 'G2_cc-pVDZ.dat'
|
2019-03-01 01:54:10 +01:00
|
|
|
|
2019-03-02 14:51:20 +01:00
|
|
|
with open(filepath, "r") as fp:
|
2019-03-01 01:54:10 +01:00
|
|
|
cipsi = []
|
|
|
|
for line in fp:
|
|
|
|
a=line.split()
|
2019-03-02 14:51:20 +01:00
|
|
|
cipsi.append(line.split())
|
2019-03-01 01:54:10 +01:00
|
|
|
system.append(a[0])
|
|
|
|
ev.append(a[1])
|
|
|
|
|
|
|
|
|
2019-03-02 14:51:20 +01:00
|
|
|
#print cipsi
|
2019-03-01 01:54:10 +01:00
|
|
|
|
2019-03-15 16:30:46 +01:00
|
|
|
filepath = 'data_HF_PBE_VDZ'
|
2019-03-02 14:51:20 +01:00
|
|
|
with open(filepath, "r") as fp2:
|
2019-03-01 01:54:10 +01:00
|
|
|
for line in fp2:
|
|
|
|
a=line.split()
|
2019-03-02 14:51:20 +01:00
|
|
|
# print a[0], a[1]
|
2019-03-01 01:54:10 +01:00
|
|
|
hf_lda.append(a[1])
|
|
|
|
val_lda.append(a[2])
|
|
|
|
|
2019-03-15 16:30:46 +01:00
|
|
|
file_PBE = open("G2_CIPSI_VDZ_PBE.dat","w+")
|
2019-03-01 01:54:10 +01:00
|
|
|
count=0
|
|
|
|
for e in ev:
|
2019-03-05 14:05:33 +01:00
|
|
|
file_PBE.write(system[count] +' '+str(float(e)+float(hf_lda[count]))+'\n')
|
2019-03-01 01:54:10 +01:00
|
|
|
count += 1
|
|
|
|
|
2019-03-02 14:51:20 +01:00
|
|
|
|
2019-03-15 16:30:46 +01:00
|
|
|
file_PBE_val = open("G2_CIPSI_VDZ_PBE_valence.dat","w+")
|
2019-03-01 01:54:10 +01:00
|
|
|
count=0
|
|
|
|
for e in ev:
|
|
|
|
if (count==1):
|
|
|
|
print float(e), float(val_lda[count]) , float(hf_lda[count])
|
2019-03-02 14:51:20 +01:00
|
|
|
|
2019-03-05 14:05:33 +01:00
|
|
|
file_PBE_val.write(system[count] +' '+''+str(float(e)+float(val_lda[count]))+'\n')
|
2019-03-01 01:54:10 +01:00
|
|
|
count += 1
|
2019-03-02 14:51:20 +01:00
|
|
|
|
2019-03-01 01:54:10 +01:00
|
|
|
|