最近在用高斯算分子结构,VNL文件手动改成Gaussian文件各种痛苦,手动写了一个转换脚本,把原子结构和坐标复制进去就可以了。

def Transfer(elements,coordinates):
f=open("data.gjf","w")
f.write('%chk=data.chk\n%mem=8GB\n%nproc=4\n#\n\nTitle\n\n0 1\n')
Temp=' ';
n=len(elements)
for i in range(n):
f.write(elements[i])
f.write(Temp)
f.write(str(coordinates[i][0]))
f.write(Temp)
f.write(str(coordinates[i][1]))
f.write(Temp)
f.write(str(coordinates[i][2]))
f.write('\n')
f.close()

Carbon='C'
Hydrogen='H'
Iron='Fe'
Gold='Au'
Nitrogen='N'
Sulfur='S'

# Scattering elements and coordinates
elements=[Gold, Gold, Gold, Gold,
Gold, Gold, Gold, Gold,
Gold, Gold, Gold, Gold,
Gold, Gold, Gold, Gold,
Gold, Gold, Gold, Gold,
Gold, Gold, Gold, Gold,
Gold, Gold, Gold, Gold,
Gold, Gold, Gold, Gold,
Gold, Gold, Gold, Gold,
Gold, Gold, Gold, Gold,
Gold, Gold, Gold, Gold,
Gold, Gold, Gold, Gold,
Gold, Gold, Gold, Gold,
Carbon, Carbon, Carbon, Carbon,
Carbon, Nitrogen, Carbon, Carbon,
Nitrogen, Carbon, Carbon, Carbon,
Carbon, Carbon, Carbon, Carbon,
Carbon, Nitrogen, Carbon, Carbon,
Nitrogen, Carbon, Carbon, Carbon,
Carbon, Carbon, Carbon, Carbon,
Carbon, Carbon, Carbon, Carbon,
Carbon, Carbon, Carbon, Carbon,
Hydrogen, Hydrogen, Hydrogen, Hydrogen,
Hydrogen, Hydrogen, Hydrogen, Hydrogen,
Hydrogen, Hydrogen, Sulfur, Hydrogen,
Hydrogen, Hydrogen, Hydrogen, Hydrogen,
Hydrogen, Sulfur, Hydrogen, Hydrogen,
Hydrogen, Hydrogen, Gold, Gold,
Gold, Gold, Gold, Gold,
Gold, Gold, Gold, Gold,
Gold, Gold, Gold, Gold,
Gold, Gold, Gold, Gold,
Gold, Gold, Gold, Gold,
Gold, Gold, Gold, Gold,
Gold, Gold, Gold, Gold,
Gold, Gold, Gold, Gold,
Gold, Gold]

## Scattering coordinates
coordinates=[[ 0.00000000e+00, 0.00000000e+00, 4.70886880e+00],
[ 4.44089210e-16, 1.66483653e+00, 7.06330329e+00],
[ -1.44179070e+00, 2.49725485e+00, 4.70886880e+00],
[ -1.44179070e+00, 4.16209126e+00, 7.06330329e+00],
[ -2.88358140e+00, 4.99450970e+00, 4.70886880e+00],
[ -2.88358140e+00, 6.65934610e+00, 7.06330329e+00],
[ -4.32537222e+00, 7.49176455e+00, 4.70886880e+00],
[ -4.32537222e+00, 9.15660095e+00, 7.06330329e+00],
[ 2.88358140e+00, 0.00000000e+00, 4.70886880e+00],
[ 2.88358140e+00, 1.66483653e+00, 7.06330329e+00],
[ 1.44179070e+00, 2.49725485e+00, 4.70886880e+00],
[ 1.44179070e+00, 4.16209126e+00, 7.06330329e+00],
[ -9.99999994e-09, 4.99450970e+00, 4.70886880e+00],
[ -9.99999905e-09, 6.65934610e+00, 7.06330329e+00],
[ -1.44179070e+00, 7.49176455e+00, 4.70886880e+00],
[ -1.44179070e+00, 9.15660095e+00, 7.06330329e+00],
[ 5.76716280e+00, 0.00000000e+00, 4.70886880e+00],
[ 5.76716280e+00, 1.66483653e+00, 7.06330329e+00],
[ 4.32537222e+00, 2.49725485e+00, 4.70886880e+00],
[ 4.32537222e+00, 4.16209126e+00, 7.06330329e+00],
[ 2.88358140e+00, 4.99450970e+00, 4.70886880e+00],
[ 2.88358140e+00, 6.65934610e+00, 7.06330329e+00],
[ 1.44179070e+00, 7.49176455e+00, 4.70886880e+00],
[ 1.44179070e+00, 9.15660095e+00, 7.06330329e+00],
[ 8.65074444e+00, 0.00000000e+00, 4.70886880e+00],
[ 8.65074444e+00, 1.66483653e+00, 7.06330329e+00],
[ 7.20895386e+00, 2.49725485e+00, 4.70886880e+00],
[ 7.20895386e+00, 4.16209126e+00, 7.06330329e+00],
[ 5.76716280e+00, 4.99450970e+00, 4.70886880e+00],
[ 5.76716280e+00, 6.65934610e+00, 7.06330329e+00],
[ 4.32537222e+00, 7.49176455e+00, 4.70886880e+00],
[ 4.32537222e+00, 9.15660095e+00, 7.06330329e+00],
[ 0.00000000e+00, 0.00000000e+00, 9.41773778e+00],
[ -1.44179070e+00, 2.49725485e+00, 9.41773778e+00],
[ -2.88358140e+00, 4.99450970e+00, 9.41773778e+00],
[ -4.32537222e+00, 7.49176455e+00, 9.41773778e+00],
[ 2.88358140e+00, 0.00000000e+00, 9.41773778e+00],
[ 1.44179070e+00, 2.49725485e+00, 9.41773778e+00],
[ -9.99999994e-09, 4.99450970e+00, 9.41773778e+00],
[ -1.44179070e+00, 7.49176455e+00, 9.41773778e+00],
[ 5.76716280e+00, 0.00000000e+00, 9.41773778e+00],
[ 4.32537222e+00, 2.49725485e+00, 9.41773778e+00],
[ 2.88358140e+00, 4.99450970e+00, 9.41773778e+00],
[ 1.44179070e+00, 7.49176455e+00, 9.41773778e+00],
[ 8.65074444e+00, 0.00000000e+00, 9.41773778e+00],
[ 7.20895386e+00, 2.49725485e+00, 9.41773778e+00],
[ 5.76716280e+00, 4.99450970e+00, 9.41773778e+00],
[ 4.32537222e+00, 7.49176455e+00, 9.41773778e+00],
[ 0.00000000e+00, 6.65934992e+00, 1.17721689e+01],
[ 2.88357997e+00, 6.65934992e+00, 1.17721689e+01],
[ 1.44178998e+00, 4.16208982e+00, 1.17721689e+01],
[ 1.44178998e+00, 5.82693005e+00, 1.41265991e+01],
[ 1.61401999e+00, 3.11600018e+00, 2.49839953e+01],
[ 1.65762007e+00, 2.55208015e+00, 2.62577971e+01],
[ 1.64859998e+00, 3.17923999e+00, 2.75078962e+01],
[ 1.53460014e+00, 3.31410003e+00, 2.27212961e+01],
[ 1.58970010e+00, 2.40047002e+00, 2.37421969e+01],
[ 1.58231008e+00, 4.45072985e+00, 2.46654966e+01],
[ 1.73837006e+00, 2.43069005e+00, 2.87551954e+01],
[ 1.70816004e+00, 3.34712005e+00, 2.97537954e+01],
[ 1.56146991e+00, 4.51820993e+00, 2.77460955e+01],
[ 1.48399007e+00, 5.87482977e+00, 2.26534956e+01],
[ 1.44935000e+00, 7.10873985e+00, 2.33438967e+01],
[ 1.53741014e+00, 4.62734985e+00, 2.33025969e+01],
[ 1.41015995e+00, 8.58279991e+00, 2.49410971e+01],
[ 1.38249004e+00, 9.20921993e+00, 2.61912954e+01],
[ 1.40069997e+00, 8.64422989e+00, 2.74652956e+01],
[ 1.45685995e+00, 8.41913986e+00, 2.26945971e+01],
[ 1.42400014e+00, 9.33553028e+00, 2.36931971e+01],
[ 1.42989004e+00, 7.24107981e+00, 2.47032965e+01],
[ 1.33337009e+00, 9.35589981e+00, 2.87076967e+01],
[ 1.36664999e+00, 8.44125938e+00, 2.97285956e+01],
[ 1.48279011e+00, 7.31153965e+00, 2.77833956e+01],
[ 1.47015011e+00, 7.13243961e+00, 2.91465967e+01],
[ 1.52854002e+00, 5.88519001e+00, 2.97956961e+01],
[ 1.58622992e+00, 4.65224981e+00, 2.91051958e+01],
[ 1.40487993e+00, 5.86722994e+00, 1.83322981e+01],
[ 3.30520004e-01, 6.39085007e+00, 1.90617979e+01],
[ 3.62600058e-01, 6.39199972e+00, 2.04547976e+01],
[ 1.45944011e+00, 5.87400007e+00, 2.11608961e+01],
[ 2.52909994e+00, 5.35194969e+00, 2.04153975e+01],
[ 2.50734997e+00, 5.34707975e+00, 1.90231970e+01],
[ 1.52636993e+00, 5.88487005e+00, 3.12885969e+01],
[ 4.84969944e-01, 5.28101969e+00, 3.20121954e+01],
[ 4.76579994e-01, 5.28035975e+00, 3.34042967e+01],
[ 1.51823008e+00, 5.88866997e+00, 3.41175955e+01],
[ 2.56346989e+00, 6.49469995e+00, 3.34102972e+01],
[ 2.56219006e+00, 6.49029970e+00, 3.20166967e+01],
[ 1.70467007e+00, 1.46648991e+00, 2.62720965e+01],
[ 1.48803008e+00, 3.11226010e+00, 2.16614969e+01],
[ 1.60194004e+00, 1.32142997e+00, 2.36614969e+01],
[ 1.82535994e+00, 1.35383999e+00, 2.88354967e+01],
[ 1.77306998e+00, 3.17348003e+00, 3.08184965e+01],
[ 1.34008014e+00, 1.02950296e+01, 2.61769961e+01],
[ 1.49588001e+00, 8.59688950e+00, 2.16292971e+01],
[ 1.42235005e+00, 1.04158297e+01, 2.36124971e+01],
[ 1.25762999e+00, 1.04323301e+01, 2.87887953e+01],
[ 1.31677997e+00, 8.63879967e+00, 3.07890967e+01],
[ 1.44178998e+00, 5.82693005e+00, 1.65465983e+01],
[ -5.38360000e-01, 6.79343987e+00, 1.85479982e+01],
[ -4.83530015e-01, 6.79189968e+00, 2.10061968e+01],
[ 3.39748001e+00, 4.95776987e+00, 2.09354971e+01],
[ 3.35413980e+00, 4.94447994e+00, 1.84737986e+01],
[ -3.35060030e-01, 4.81481981e+00, 3.14737967e+01],
[ -3.46239954e-01, 4.81056976e+00, 3.39363974e+01],
[ 1.44331992e+00, 5.85095978e+00, 3.59021986e+01],
[ 3.38628006e+00, 6.96559000e+00, 3.39415968e+01],
[ 3.38789988e+00, 6.95269966e+00, 3.14831961e+01],
[ 1.56031001e+00, 5.23467970e+00, 2.53133963e+01],
[ 1.51687992e+00, 6.52804995e+00, 2.71353968e+01],
[ 0.00000000e+00, 6.65934992e+00, 4.06766279e+01],
[ 1.44178998e+00, 4.16208982e+00, 4.06766279e+01],
[ 2.88357997e+00, 6.65934992e+00, 4.06766279e+01],
[ 1.44178998e+00, 5.82693005e+00, 3.83222006e+01],
[ 0.00000000e+00, 0.00000000e+00, 4.30333021e+01],
[ 4.44089210e-16, 1.66483653e+00, 4.53877371e+01],
[ -1.44179070e+00, 2.49725485e+00, 4.30333021e+01],
[ -1.44179070e+00, 4.16209126e+00, 4.53877371e+01],
[ -2.88358140e+00, 4.99450970e+00, 4.30333021e+01],
[ -2.88358140e+00, 6.65934610e+00, 4.53877371e+01],
[ -4.32537222e+00, 7.49176455e+00, 4.30333021e+01],
[ -4.32537222e+00, 9.15660095e+00, 4.53877371e+01],
[ 2.88358140e+00, 0.00000000e+00, 4.30333021e+01],
[ 2.88358140e+00, 1.66483653e+00, 4.53877371e+01],
[ 1.44179070e+00, 2.49725485e+00, 4.30333021e+01],
[ 1.44179070e+00, 4.16209126e+00, 4.53877371e+01],
[ -9.99999994e-09, 4.99450970e+00, 4.30333021e+01],
[ -9.99999905e-09, 6.65934610e+00, 4.53877371e+01],
[ -1.44179070e+00, 7.49176455e+00, 4.30333021e+01],
[ -1.44179070e+00, 9.15660095e+00, 4.53877371e+01],
[ 5.76716280e+00, 0.00000000e+00, 4.30333021e+01],
[ 5.76716280e+00, 1.66483653e+00, 4.53877371e+01],
[ 4.32537222e+00, 2.49725485e+00, 4.30333021e+01],
[ 4.32537222e+00, 4.16209126e+00, 4.53877371e+01],
[ 2.88358140e+00, 4.99450970e+00, 4.30333021e+01],
[ 2.88358140e+00, 6.65934610e+00, 4.53877371e+01],
[ 1.44179070e+00, 7.49176455e+00, 4.30333021e+01],
[ 1.44179070e+00, 9.15660095e+00, 4.53877371e+01],
[ 8.65074444e+00, 0.00000000e+00, 4.30333021e+01],
[ 8.65074444e+00, 1.66483653e+00, 4.53877371e+01],
[ 7.20895386e+00, 2.49725485e+00, 4.30333021e+01],
[ 7.20895386e+00, 4.16209126e+00, 4.53877371e+01],
[ 5.76716280e+00, 4.99450970e+00, 4.30333021e+01],
[ 5.76716280e+00, 6.65934610e+00, 4.53877371e+01],
[ 4.32537222e+00, 7.49176455e+00, 4.30333021e+01],
[ 4.32537222e+00, 9.15660095e+00, 4.53877371e+01]]

Transfer(elements,coordinates)

作者 hsyyf

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注