io.py 文件源码

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

项目:ommprotocol 作者: insilichem 项目源码 文件源码
def from_parmed(cls, path, *args, **kwargs):
        """
        Try to load a file automatically with ParmEd. Not guaranteed to work, but
        might be useful if it succeeds.

        Arguments
        ---------
        path : str
            Path to file that ParmEd can load
        """
        st = parmed.load_file(path, structure=True, *args, **kwargs)
        box = kwargs.pop('box', getattr(st, 'box', None))
        velocities = kwargs.pop('velocities', getattr(st, 'velocities', None))
        positions = kwargs.pop('positions', getattr(st, 'positions', None))
        return cls(master=st, topology=st.topology, positions=positions, box=box,
                   velocities=velocities, path=path, **kwargs)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号