9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-23 03:53:29 +01:00
qp2/scripts/Hn.py

45 lines
869 B
Python
Raw Normal View History

2023-08-21 14:54:41 +02:00
#!/usr/bin/env python3
2023-03-23 13:08:09 +01:00
import sys
from math import *
arg = sys.argv
#f = open('data_dft','r')
n = int(sys.argv[1])
r = float(sys.argv[2])
2023-03-28 12:43:15 +02:00
f = open('H'+str(n)+'_'+str(r)+'.xyz','w')
2023-03-23 13:08:09 +01:00
string=str(n)+"\n"
f.write(string)
string="\n"
f.write(string)
for i in range(n):
x = r * cos(2.* i* pi/n)
y = r * sin(2.* i* pi/n)
z = 0.
string="H "+str(x)+" "+str(y)+" "+str(z)+"\n"
f.write(string)
#lines = f.readlines()
#cipsi_dft= []
#
#dissoc = []
#dissoc.append(float(-76.0179223470363))
#dissoc.append(float(-76.0592367866993))
#dissoc.append(float(-76.0678739715659))
#delta_e = []
#
#for line in lines:
# data = line.split()
# if(len(data)>0):
# dft=float(data[1])
# fci=float(data[2])
# e=fci+dft
# cipsi_dft.append(e)
#
#print(*cipsi_dft,sep=" & ")
#
#for i in 0,1,2:
# delta_e.append(1000.*(dissoc[i] - cipsi_dft[i]))
#
#print(*delta_e,sep=" & ")
#