0 1
C -4.59255 0.08304 -0.05852
C -3.07318 0.17974 -0.06585
C -2.35822 1.43873 -0.06606
N -2.97016 2.74777 -0.05954
O -2.21637 3.82816 -0.06039
O -4.14959 2.90090 -0.05332
C -0.94837 1.40993 -0.07316
C -0.22055 0.22236 -0.07994
N 1.20996 0.24774 -0.08700
O 1.85923 1.39310 -0.08718
O 1.83665 -0.76914 -0.09283
C -0.91178 -0.98707 -0.07972
C -2.31693 -1.04992 -0.07289
N -2.91158 -2.36710 -0.07344
O -2.14448 -3.43785 -0.08011
O -4.09243 -2.53018 -0.06800
H -5.18863 0.99767 -0.05309
H -4.91946 -0.45909 0.85345
H -4.92857 -0.45422 -0.97006
H -0.39416 2.33820 -0.07345
H -0.33521 -1.90221 -0.08503
0 1 (代表电荷和自旋多重度。两个数字之间一定要空一格。0 1代表电荷为0,多重度是1)
C -4.59255 0.08304 -0.05852 (下面的一大串数字表示分子中各个原子的XYZ轴的坐标信息,也有的input file是用Z-matrix来表示原子位置的)
C -3.07318 0.17974 -0.06585
C -2.35822 1.43873 -0.06606
N -2.97016 2.74777 -0.05954
O -2.21637 3.82816 -0.06039
O -4.14959 2.90090 -0.05332
C -0.94837 1.40993 -0.07316
C -0.22055 0.22236 -0.07994
N 1.20996 0.24774 -0.08700
O 1.85923 1.39310 -0.08718
O 1.83665 -0.76914 -0.09283
C -0.91178 -0.98707 -0.07972
C -2.31693 -1.04992 -0.07289
N -2.91158 -2.36710 -0.07344
O -2.14448 -3.43785 -0.08011
O -4.09243 -2.53018 -0.06800
H -5.18863 0.99767 -0.05309
H -4.91946 -0.45909 0.85345
H -4.92857 -0.45422 -0.97006
H -0.39416 2.33820 -0.07345
H -0.33521 -1.90221 -0.08503
0 1
C -4.59255 0.08304 -0.05852
C -3.07318 0.17974 -0.06585
C -2.35822 1.43873 -0.06606
N -2.97016 2.74777 -0.05954
O -2.21637 3.82816 -0.06039
O -4.14959 2.90090 -0.05332
C -0.94837 1.40993 -0.07316
C -0.22055 0.22236 -0.07994
N 1.20996 0.24774 -0.08700
O 1.85923 1.39310 -0.08718
O 1.83665 -0.76914 -0.09283
C -0.91178 -0.98707 -0.07972
C -2.31693 -1.04992 -0.07289
N -2.91158 -2.36710 -0.07344
O -2.14448 -3.43785 -0.08011
O -4.09243 -2.53018 -0.06800
H -5.18863 0.99767 -0.05309
H -4.91946 -0.45909 0.85345
H -4.92857 -0.45422 -0.97006
H -0.39416 2.33820 -0.07345
H -0.33521 -1.90221 -0.08503
0 1
C -4.59255 0.08304 -0.05852
C -3.07318 0.17974 -0.06585
C -2.35822 1.43873 -0.06606
N -2.97016 2.74777 -0.05954
O -2.21637 3.82816 -0.06039
O -4.14959 2.90090 -0.05332
C -0.94837 1.40993 -0.07316
C -0.22055 0.22236 -0.07994
N 1.20996 0.24774 -0.08700
O 1.85923 1.39310 -0.08718
O 1.83665 -0.76914 -0.09283
C -0.91178 -0.98707 -0.07972
C -2.31693 -1.04992 -0.07289
N -2.91158 -2.36710 -0.07344
O -2.14448 -3.43785 -0.08011
O -4.09243 -2.53018 -0.06800
H -5.18863 0.99767 -0.05309
H -4.91946 -0.45909 0.85345
H -4.92857 -0.45422 -0.97006
H -0.39416 2.33820 -0.07345
H -0.33521 -1.90221 -0.08503
0 3
C -4.59255 0.08304 -0.05852
C -3.07318 0.17974 -0.06585
C -2.35822 1.43873 -0.06606
N -2.97016 2.74777 -0.05954
O -2.21637 3.82816 -0.06039
O -4.14959 2.90090 -0.05332
C -0.94837 1.40993 -0.07316
C -0.22055 0.22236 -0.07994
N 1.20996 0.24774 -0.08700
O 1.85923 1.39310 -0.08718
O 1.83665 -0.76914 -0.09283
C -0.91178 -0.98707 -0.07972
C -2.31693 -1.04992 -0.07289
N -2.91158 -2.36710 -0.07344
O -2.14448 -3.43785 -0.08011
O -4.09243 -2.53018 -0.06800
H -5.18863 0.99767 -0.05309
H -4.91946 -0.45909 0.85345
H -4.92857 -0.45422 -0.97006
H -0.39416 2.33820 -0.07345
H -0.33521 -1.90221 -0.08503
with open(filename_input, “r”) as f:
lines = f.readlines()
for line_num, line in enumerate(lines):
line = line.strip() # remove break line
if line_num+1 < start_line_num: # line_num starts from 0
output_text += “{}\n”.format(line) # add break line at the end
else:
line_array = [e for e in line.split(” “) if e != “”] # split input line by space and make an array
if len(line_array) > 1:
if line_array[0] == “H”:
line_array.insert(1, str(0)) # add “0” in case of “H”
else:
line_array.insert(1, str(-1)) # otherwise, add “1”
line_output = “\t”.join(line_array)
output_text += “{}\n”.format(line_output) # add break line at the end
# print(“=== output text ====”)
# print(output_text)
with open(filename_output, “w”) as f_out:
f_out.write(output_text)
f = open(‘output.gjf’, ‘a’, encoding=’utf-8′, newline=’\n’)
f.write(‘\n’)
f.write(‘\n’)
f.close()
0 1
C -1.81226530 -0.33960474 -0.18951040
H -2.75438476 -0.79975943 -0.40297839
H -1.10701678 -1.08952983 0.10227189
C -1.29892308 0.38635154 -1.44691537
H -2.00326075 0.26246181 -2.24281724
H -0.35589216 -0.02730756 -1.73756778
C -1.12912084 1.88597588 -1.14049402
H -0.42506352 2.00984515 -0.34434097
H -0.77209312 2.39031163 -2.01403661
H -2.07222653 2.29971720 -0.85020142
C -1.98469104 0.67604887 0.95518044
H -2.68960723 1.42622055 0.66322903
H -2.34178564 0.17172469 1.82870237
H -1.04248246 1.13588249 1.16894671
0 1
C 1.30655 0.82344 0.00492
C 2.77391 0.99154 0.00168
N 3.31017 2.23958 -0.00402
C 4.65665 2.40580 -0.00701
N 5.47368 1.32308 -0.00430
C 4.94379 0.07449 0.00139
N 3.59724 -0.09075 0.00438
C 0.69855 -0.36588 0.01053
C -0.68897 -0.37931 0.01309
C -1.31990 0.79801 0.00976
C -2.79024 0.93767 0.01194
N -3.59244 -0.16036 0.01764
C -4.94194 -0.02122 0.01962
N -5.49593 1.21687 0.01592
C -4.70003 2.31522 0.01024
N -3.35058 2.17509 0.00826
Te -0.02269 2.46360 0.00106
H 5.07835 3.40146 -0.01154
H 5.59443 -0.78913 0.00356
H 1.25457 -1.29508 0.01308
H -1.22688 -1.31910 0.01765
H -5.57573 -0.89727 0.02416
H -5.14094 3.30252 0.00729
No comments yet.