knobs_into_holes.py 文件源码

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

项目:isambard 作者: woolfson-group 项目源码 文件源码
def daisy_chains(self, kih, max_path_length=None):
        """ Generator for daisy chains (complementary kihs) associated with a knob.

        Notes
        -----
        Daisy chain graph is the directed graph with edges from knob residue to each hole residue for each KnobIntoHole
         in self.
        Given a KnobIntoHole, the daisy chains are non-trivial paths in this graph (walks along the directed edges)
        that begin and end at the knob.
        These paths must be of length  <= max_path_length

        Parameters
        ----------
        kih : KnobIntoHole interaction.
        max_path_length : int or None
            Maximum length of a daisy chain.
            Defaults to number of chains in self.ampal_parent.
            This is the maximum sensible value. Larger values than this will cause slow running of this function.
        """
        if max_path_length is None:
            max_path_length = len(self.ampal_parent)
        g = self.daisy_chain_graph
        paths = networkx.all_simple_paths(g, source=kih.knob, target=kih.knob, cutoff=max_path_length)
        return paths
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号