本文整理汇总了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
示例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