团簇结构
本文使用ASE测量下面团簇结构的碳碳键键长,用于验证结构优化方法是否合理。 【团簇结构】
平均键长测量
ASE官方是通过Geometry tools与Analysis tools部分介绍,在类ase.geometry.analysis的Analysis模块中有源码介绍。 【直接上代码】
import os
from ase.io import read,write
from ase.visualize import view
from ase.geometry.analysis import Analysis
path=r'D:\software output files\quntum_experiment\POSCAR\non_periodic_CN\C130\ORCA_test\POSCAR3'
files='POSCAR3.xyz'
CN=read(os.path.join(path,files),format='xyz')
view(CN)
ana = Analysis(CN)
CCBonds = ana.get_bonds('C', 'C', unique=True)
CCCAngles = ana.get_angles('C', 'C', 'C', unique=True)
print("There are {} C-C bonds in C130H30.".format(len(CCBonds[0])))
print("There are {} C-C-C angles in C130H30.".format(len(CCCAngles[0])))
CCBondValues = ana.get_values(CCBonds)
CCCAngleValues = ana.get_values(CCCAngles)
print("The average C-C bond length is {}.".format(np.average(CCBondValues)))
print("The average C-C-C angle is {}.".format(np.average(CCCAngleValues)))
【代码输出结果】 There are 210 C-C bonds in C130H30. There are 390 C-C-C angles in C130H30. The average C-C bond length is 1.427652873317778. The average C-C-C angle is 120.15017380095725.
误差分析
即该团簇结构中的碳碳键平均键长为:1.427652873317778埃 实验上测得的碳碳键键长为1.42埃 因此计算误差为:0.5%左右
|