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


Python Trajectory.load_from_dcd方法代码示例

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


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

示例1: test_xtc_dcd

# 需要导入模块: from msmbuilder import Trajectory [as 别名]
# 或者: from msmbuilder.Trajectory import load_from_dcd [as 别名]
def test_xtc_dcd():
    pdb_filename = get("native.pdb", just_filename=True)
    xtc_filename = get('RUN00_frame0.xtc', just_filename=True)
    dcd_filename = get('RUN00_frame0.dcd', just_filename=True)
    r_xtc = Trajectory.load_from_xtc(xtc_filename, pdb_filename)
    r_dcd = Trajectory.load_from_dcd(dcd_filename, pdb_filename)

    x_xtc = r_xtc["XYZList"]
    x_dcd = r_dcd["XYZList"]

    eq(x_xtc, x_dcd, decimal=4)
开发者ID:leeping,项目名称:msmbuilder,代码行数:13,代码来源:test_traj.py

示例2: _load_traj

# 需要导入模块: from msmbuilder import Trajectory [as 别名]
# 或者: from msmbuilder.Trajectory import load_from_dcd [as 别名]
    def _load_traj(self, file_list):
        """
        Load a set of xtc or dcd files as a single trajectory

        Note that the ordering of `file_list` is relevant, as the trajectories
        are catted together.

        Returns
        -------
        traj : msmbuilder.Trajectory
        """

        if self.input_traj_ext == '.xtc':
            traj = Trajectory.load_from_xtc(file_list, PDBFilename=self.conf_filename,
                        discard_overlapping_frames=True)
        elif self.input_traj_ext == '.dcd':
            traj = Trajectory.load_from_dcd(file_list, PDBFilename=self.conf_filename)
        else:
            raise ValueError()
        return traj
开发者ID:chrismichel,项目名称:msmbuilder,代码行数:22,代码来源:builder.py

示例3: _load_traj

# 需要导入模块: from msmbuilder import Trajectory [as 别名]
# 或者: from msmbuilder.Trajectory import load_from_dcd [as 别名]
    def _load_traj(self, file_list):
        """
        Load a set of xtc or dcd files as a single trajectory

        Note that the ordering of `file_list` is relevant, as the trajectories
        are catted together.

        Returns
        -------
        traj : msmbuilder.Trajectory
        """

        if self.input_traj_ext == '.xtc':
            traj = Trajectory.load_from_xtc(file_list, Conf=self.conf,
                        discard_overlapping_frames=True)
        elif self.input_traj_ext == '.dcd':
            traj = Trajectory.load_from_dcd(file_list, Conf=self.conf,
                        discard_overlapping_frames=True)
        else:
            raise ValueError()
        # return the number of files loaded, which in this case is all or
        # nothing, since an error is raised if the Trajectory.load_from_<ext> 
        # doesn't work
        return traj, len(file_list)
开发者ID:raviramanathan,项目名称:msmbuilder,代码行数:26,代码来源:builder.py


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