pymatgen_diffusion/neb/full_path_mapper.py
def add_data_to_similar_edges(
        self, target_label: Union[int, str], data: dict, m_path: MigrationPath = None
    ):
        """
        Insert data to all edges with the same label

        Args:
            target_label: The edge uniqueness label are adding data
            data: The data to passed to the different edges
            m_path: If the data is an array, and m_path is set, it uses the reference migration path to
            determine whether the data needs to be flipped so that 0-->1 is different from 1-->0
        """

        for u, v, d in self.s_graph.graph.edges(data=True):
            if d["hop_label"] == target_label:
                d.update(data)
                if m_path is not None:
                    # Try to override the data.
                    if not m_path.symm_structure.spacegroup.are_symmetrically_equivalent(
                        [m_path.isite], [d["hop"].isite]
                    ):
                        # "The data going to this edge needs to be flipped"
                        for k in data.keys():
                            if isinstance(data[k], (np.ndarray, np.generic)):
                                raise Warning(
                                    "The data provided will only be flipped "
                                    "if it a list"
                                )
                            if not isinstance(data[k], list):
                                continue
                            d[k] = d[k][::-1]

        Insert data to all edges with the same label

        Args:
            target_label: The edge uniqueness label are adding data
            data: The data to passed to the different edges
            m_path: If the data is an array, and m_path is set, it uses the reference migration path to
            determine whether the data needs to be flipped so that 0-->1 is different from 1-->0
        
Insert data to all edges with the same label
Args:
target_label: The edge uniqueness label are adding data
data: The data to passed to the different edges
m_path: If the data is an array, and m_path is set, it uses the reference migration path to
determine whether the data needs to be flipped so that 0-->1 is different from 1-->0
Insert data to all edges with the same label Args : target_label : The edge uniqueness label are adding data data : The data to passed to the different edges m_path : If the data is an array and m_path is set it uses the reference migration path to determine whether the data needs to be flipped so that 0 -- > 1 is different from 1 -- > 0
def add_data_to_similar_edges(
        self, target_label: Union[int, str], data: dict, m_path: MigrationPath = None
    ):
        for u, v, d in self.s_graph.graph.edges(data=True):
            if d["hop_label"] == target_label:
                d.update(data)
                if m_path is not None:
                    if not m_path.symm_structure.spacegroup.are_symmetrically_equivalent(
                        [m_path.isite], [d["hop"].isite]
                    ):
                        for k in data.keys():
                            if isinstance(data[k], (np.ndarray, np.generic)):
                                raise Warning(
                                    "The data provided will only be flipped "
                                    "if it a list"
                                )
                            if not isinstance(data[k], list):
                                continue
                            d[k] = d[k][::-1]
def add_data_to_similar_edges ( self , target_label : Union [ int , str ] , data : dict , m_path : MigrationPath = None ) : for u , v , d in self . s_graph . graph . edges ( data = True ) : if d [ "hop_label" ] == target_label : d . update ( data ) if m_path is not None : if not m_path . symm_structure . spacegroup . are_symmetrically_equivalent ( [ m_path . isite ] , [ d [ "hop" ] . isite ] ) : for k in data . keys ( ) : if isinstance ( data [ k ] , ( np . ndarray , np . generic ) ) : raise Warning ( "The data provided will only be flipped " "if it a list" ) if not isinstance ( data [ k ] , list ) : continue d [ k ] = d [ k ] [ : : - 1 ]
Insert data to all edges with the same label
Args:
target_label: The edge uniqueness label are adding data
data: The data to passed to the different edges
m_path: If the data is an array, and m_path is set, it uses the reference migration path to
determine whether the data needs to be flipped so that 0-->1 is different from 1-->0
Insert data to all edges with the same label Args : target_label : The edge uniqueness label are adding data data : The data to passed to the different edges m_path : If the data is an array and m_path is set it uses the reference migration path to determine whether the data needs to be flipped so that 0 -- > 1 is different from 1 -- > 0
"""
        Insert data to all edges with the same label

        Args:
            target_label: The edge uniqueness label are adding data
            data: The data to passed to the different edges
            m_path: If the data is an array, and m_path is set, it uses the reference migration path to
            determine whether the data needs to be flipped so that 0-->1 is different from 1-->0
        """ # Try to override the data. # "The data going to this edge needs to be flipped"
self
target_label
Union[int, str]
data
dict
m_path
MigrationPath