Generate KnobGroup from the helices in the assembly - classic socket functionality.

        Notes
        -----
        Socket identifies knobs-into-holes (KIHs) packing motifs in protein structures.
        The following resources can provide more information:
        The socket webserver: http://coiledcoils.chm.bris.ac.uk/socket/server.html
        The help page: http://coiledcoils.chm.bris.ac.uk/socket/help.html
        The original publication reference: Walshaw, J. & Woolfson, D.N. (2001) J. Mol. Biol., 307 (5), 1427-1450.

        Parameters
        ----------
        assembly : Assembly
        cutoff : float
            Socket cutoff in Angstroms
        min_helix_length : int
            Minimum number of Residues in a helix considered for KIH packing.

        Returns
        -------
        instance : KnobGroup
        None if no helices or no kihs.

def from_helices(cls, assembly, cutoff=7.0, min_helix_length=8):
        """ Generate KnobGroup from the helices in the assembly - classic socket functionality.

        Notes
        -----
        Socket identifies knobs-into-holes (KIHs) packing motifs in protein structures.
        The following resources can provide more information:
        The socket webserver: http://coiledcoils.chm.bris.ac.uk/socket/server.html
        The help page: http://coiledcoils.chm.bris.ac.uk/socket/help.html
        The original publication reference: Walshaw, J. & Woolfson, D.N. (2001) J. Mol. Biol., 307 (5), 1427-1450.

        Parameters
        ----------
        assembly : Assembly
        cutoff : float
            Socket cutoff in Angstroms
        min_helix_length : int
            Minimum number of Residues in a helix considered for KIH packing.

        Returns
        -------
        instance : KnobGroup
        None if no helices or no kihs.
        """
        cutoff = float(cutoff)
        helices = Assembly([x for x in assembly.helices if len(x) >= min_helix_length])
        if len(helices) <= 1:
            return None
        # reassign ampal_parents
        helices.relabel_polymers([x.ampal_parent.id for x in helices])
        for i, h in enumerate(helices):
            h.number = i
            h.ampal_parent = h[0].ampal_parent
            for r in h.get_monomers():
                r.tags['helix'] = h
        all_kihs = []
        cluster_dict = cluster_helices(helices, cluster_distance=(cutoff + 10))
        for k, v in cluster_dict.items():
            if len(v) > 1:
                kihs = find_kihs(v, cutoff=cutoff, hole_size=4)
                if len(kihs) == 0:
                    continue
                for x in kihs:
                    all_kihs.append(x)
        instance = cls(ampal_parent=helices, cutoff=cutoff)
        for x in all_kihs:
            x.ampal_parent = instance
        instance._monomers = all_kihs
        instance.relabel_monomers()
        return instance