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