本文整理汇总了Python中Geometry.dihedralAngle方法的典型用法代码示例。如果您正苦于以下问题:Python Geometry.dihedralAngle方法的具体用法?Python Geometry.dihedralAngle怎么用?Python Geometry.dihedralAngle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Geometry
的用法示例。
在下文中一共展示了Geometry.dihedralAngle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: UpdateLigandAnchorPoint
# 需要导入模块: import Geometry [as 别名]
# 或者: from Geometry import dihedralAngle [as 别名]
def UpdateLigandAnchorPoint(self):
try:
if self.Translation:
index = int(float(self.Line[self.colNo:self.colNo+10]))
coordX = self.top.GridVertex[index][0] # The atom X coordinate
coordY = self.top.GridVertex[index][1] # The atom Y coordinate
coordZ = self.top.GridVertex[index][2] # The atom Z coordinate
pointA = [coordX, coordY, coordZ]
pointB = [self.top.OriX[0], self.top.OriX[1], self.top.OriX[2]]
pointC = [self.top.Ori[0], self.top.Ori[1], self.top.Ori[2]]
pointD = [self.top.OriY[0], self.top.OriY[1], self.top.OriY[2]]
self.top.DisAngDih[self.top.VarAtoms[0]][0] = Geometry.distance(pointA, pointB)
self.top.DisAngDih[self.top.VarAtoms[0]][1] = Geometry.angle(pointA, pointB, pointC)
self.top.DisAngDih[self.top.VarAtoms[0]][2] = Geometry.dihedralAngle(pointA, pointB, pointC, pointD)
self.colNo += 11
if self.Rotation:
self.top.DisAngDih[self.top.VarAtoms[1]][1] = float(self.Line[self.colNo:self.colNo+10])
self.top.DisAngDih[self.top.VarAtoms[1]][2] = float(self.Line[self.colNo+11:self.colNo+21])
self.top.DisAngDih[self.top.VarAtoms[2]][2] = float(self.Line[self.colNo+22:self.colNo+32])
self.colNo += 33
except:
self.CriticalError(" Could not update ligand anchor point")
return 1
return 0