当前位置: 首页>>代码示例>>Python>>正文


Python MSMLib.build_msm_from_counts方法代码示例

本文整理汇总了Python中msmbuilder.MSMLib.build_msm_from_counts方法的典型用法代码示例。如果您正苦于以下问题:Python MSMLib.build_msm_from_counts方法的具体用法?Python MSMLib.build_msm_from_counts怎么用?Python MSMLib.build_msm_from_counts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在msmbuilder.MSMLib的用法示例。


在下文中一共展示了MSMLib.build_msm_from_counts方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: set_coordinate_as_eigvector2

# 需要导入模块: from msmbuilder import MSMLib [as 别名]
# 或者: from msmbuilder.MSMLib import build_msm_from_counts [as 别名]
    def set_coordinate_as_eigvector2(self, lag_time=1, symmetrize='transpose'):
        """
        Set the reaction coordinate to be the second eigenvector of the MSM generated
        by counts, the provided lag_time, and the provided symmetrization method.

        Parameters
        ----------
        lag_time : int
            The MSM lag time to use (in units of frames) in the estimation
            of the MSM transition probability matrix from the `counts` matrix.

        symmetrize : str {'mle', 'transpose', 'none'}
            Which symmetrization method to employ in the estimation of the
            MSM transition probability matrix from the `counts` matrix.
        """

        t_matrix = MSMLib.build_msm_from_counts(self.counts, lag_time, symmetrize)
        v, w = get_eigenvectors(t_matrix, 5)
        self.reaction_coordinate_values = w[:, 1].flatten()

        return
开发者ID:AgnesHH,项目名称:msmbuilder,代码行数:23,代码来源:cfep.py

示例2: set_coordinate_as_committors

# 需要导入模块: from msmbuilder import MSMLib [as 别名]
# 或者: from msmbuilder.MSMLib import build_msm_from_counts [as 别名]
    def set_coordinate_as_committors(self, lag_time=1, symmetrize='transpose'):
        """
        Set the reaction coordinate to be the committors (pfolds).

        Employs the reactant, product states provided as the sources, sinks
        respectively for the committor calculation.

        Parameters
        ----------
        lag_time : int
            The MSM lag time to use (in units of frames) in the estimation
            of the MSM transition probability matrix from the `counts` matrix.

        symmetrize : str {'mle', 'transpose', 'none'}
            Which symmetrization method to employ in the estimation of the
            MSM transition probability matrix from the `counts` matrix.
        """

        t_matrix = MSMLib.build_msm_from_counts(self.counts, lag_time, symmetrize)
        self.reaction_coordinate_values = tpt.calculate_committors([self.reactant],
                                                                   [self.product], 
                                                                   t_matrix)
        return
开发者ID:jimsnyderjr,项目名称:msmbuilder,代码行数:25,代码来源:cfep.py


注:本文中的msmbuilder.MSMLib.build_msm_from_counts方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。