pymatgen_diffusion/neb/full_path_mapper.py
def group_and_label_hops(self):
        """
        Group the MigrationPath objects together and label all the symmetrically equlivaelnt hops with the same label
        """
        hops = [
            (g_index, val)
            for g_index, val in nx.get_edge_attributes(
                self.s_graph.graph, "hop"
            ).items()
        ]
        labs = generic_groupby(hops, comp=lambda x, y: x[1] == y[1])
        new_attr = {
            g_index: {"hop_label": labs[edge_index]}
            for edge_index, (g_index, _) in enumerate(hops)
        }
        nx.set_edge_attributes(self.s_graph.graph, new_attr)
        return new_attr

        Group the MigrationPath objects together and label all the symmetrically equlivaelnt hops with the same label
        
Group the MigrationPath objects together and label all the symmetrically equlivaelnt hops with the same label
Group the MigrationPath objects together and label all the symmetrically equlivaelnt hops with the same label
def group_and_label_hops(self):
        hops = [
            (g_index, val)
            for g_index, val in nx.get_edge_attributes(
                self.s_graph.graph, "hop"
            ).items()
        ]
        labs = generic_groupby(hops, comp=lambda x, y: x[1] == y[1])
        new_attr = {
            g_index: {"hop_label": labs[edge_index]}
            for edge_index, (g_index, _) in enumerate(hops)
        }
        nx.set_edge_attributes(self.s_graph.graph, new_attr)
        return new_attr
def group_and_label_hops ( self ) : hops = [ ( g_index , val ) for g_index , val in nx . get_edge_attributes ( self . s_graph . graph , "hop" ) . items ( ) ] labs = generic_groupby ( hops , comp = lambda x , y : x [ 1 ] == y [ 1 ] ) new_attr = { g_index : { "hop_label" : labs [ edge_index ] } for edge_index , ( g_index , _ ) in enumerate ( hops ) } nx . set_edge_attributes ( self . s_graph . graph , new_attr ) return new_attr
Group the MigrationPath objects together and label all the symmetrically equlivaelnt hops with the same label
Group the MigrationPath objects together and label all the symmetrically equlivaelnt hops with the same label
"""
        Group the MigrationPath objects together and label all the symmetrically equlivaelnt hops with the same label
        """
self