pymatgen.analysis.diffusion.utils.edge_data_from_sc module¶
Function to add edge data to MigrationGraph through 2 SC structures.
- add_edge_data_from_sc(mg: MigrationGraph, i_sc: Structure, e_sc: Structure, data_array: list | str | float, key: str = 'custom_key', use_host_sg: bool = True) None [source]¶
Add a data entry and key to edges within FullPathMapper object with the same hop_label. These hops are equivalent by symmetry to the 2 positions given in the supercell structures.
- Parameters:
mg – MigrationGraph object.
i_sc – Supercell structure containing working ion at initial position
e_sc – Supercell structure containing working ion at ending position
data_array – The data to be added to the edges
key – Key of the edge attribute to be added
use_host_sg – Flag whether to use the host structure’s spacegroup to initiate MigrationHop
- Returns:
None
- get_uc_pos(isite: PeriodicSite, esite: PeriodicSite, uc: Structure, sc: Structure, sm: StructureMatcher) tuple[PeriodicSite, PeriodicSite, PeriodicSite] [source]¶
Take positions in the supercell and transform into the unit cell positions.
- Parameters:
isite – initial site in the SC
esite – ending site in the SC
uc – Unit Cell structure
sc – Super Cell structure
sm – StructureMatcher object with the working ion ignored
- Returns:
The positions in the unit cell
- get_unique_hop(mg: MigrationGraph, sc: Structure, isite: PeriodicSite, esite: PeriodicSite, use_host_sg: bool = True) tuple[int, MigrationHop] [source]¶
Get the unique hop label that correspond to two end positions in the SC.
- Parameters:
mg – Object containing the migration analysis
sc – Structure of the supercell used for the NEB calculation
isite – Initial position in the supercell
esite – Final position in the supercell
use_host_sg – Flag t whether or not to use the host structure’s spacegroup to initiate MigrationHop
- Returns:
The index of the unique hop, the MigrationHop object transformed from the SC