cells.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:muesr 作者: bonfus 项目源码 文件源码
def get_angles( lattice ):
    """
    Get alpha, beta and gamma angles from lattice vectors.

    >>> get_angles( np.diag([1,2,3]) )
    (90.0, 90.0, 90.0)
    """
    a, b, c = get_cell_parameters( lattice )
    alpha = np.arccos(np.vdot(lattice[1], lattice[2]) / b / c ) / np.pi * 180
    beta  = np.arccos(np.vdot(lattice[2], lattice[0]) / c / a ) / np.pi * 180
    gamma = np.arccos(np.vdot(lattice[0], lattice[1]) / a / b ) / np.pi * 180
    return alpha, beta, gamma
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号