johnson.py 文件源码

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

项目:PyDiatomic 作者: stggh 项目源码 文件源码
def matching_point(en, rot, V, R, mu):
    """ estimate matching point for inward and outward solutions position
    based on the determinant of the R-matrix.

    Parameters
    ----------
    en : float
        potential energy of the solution
    rot : int
        rotational quantum number J
    V : numpy 3d array
        potential curve and couplings matrix
    R : numpy 1d array
        internuclear distance grid
    mu : float
        reduced mass in kg

    Returns
    -------
    mx : int
        matching point grid index

    """

    oo, n, m = V.shape

    Vm = min([V[-1][j][j].min() for j in range(n)])  # lowest dissociation energy

    if en > Vm:
        return oo-1
    else:
        Vnn = np.transpose(V)[-1][-1]  # -1 -1 highest PEC?
        mx = np.abs(Vnn - en).argmin()

        WI = WImat(en, rot, V, R, mu)
        Rm = RImat(WI, mx)
        while linalg.det(Rm[mx]) > 1:
            mx -= 1

    return mx
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号