def value_for_xyz(cls, xyz): def e(j, k): ev = LightVector.l_sub(xyz[k-1], xyz[j-1]); ev.normalize() return ev eab, eac, ead = e(1,2), e(1,3), e(1,4) tmp = eab.l_cross(eac).normalized() return BondLength.value_for_positions(xyz[0], xyz[3]) * tmp.dot(ead)
def value_for_xyz(cls, xyz): def e(j, k): ev = LightVector.l_sub(xyz[k - 1], xyz[j - 1]) ev.normalize() return ev return BondLength.value_for_positions(xyz[0], xyz[3]) * (e(1, 2).dot( e(1, 4)))
def value_for_xyz(cls, xyz): def e(j, k): ev = LightVector.l_sub(xyz[k - 1], xyz[j - 1]) ev.normalize() return ev eab, eac, ead = e(1, 2), e(1, 3), e(1, 4) tmp = eab.l_cross(eac).normalized() return BondLength.value_for_positions(xyz[0], xyz[3]) * tmp.dot(ead)
def value_for_xyz(cls, xyz): def e(j, k): ev = LightVector.l_sub(xyz[k-1], xyz[j-1]); ev.normalize() return ev return BondLength.value_for_positions(xyz[0], xyz[3]) * (e(1,2).dot(e(1,4)))