crystal_torture.Graph¶
-
class
crystal_torture.
Graph
(clusters, structure=None)¶ Bases:
object
Graph class: group of disconnected clusters making up full graph
-
minimal_clusters
¶
-
output_clusters
(fmt, periodic=None)¶ Outputs the unique unit cell clusters from the graph
Args: fmt (str): output format for pymatgen structures set up from clusters periodic (Boolean): Whether to output only periodic clusters
Outputs: CLUS_*.”fmt”: A cluster structure file for each cluster in the graph
-
return_frac_percolating
()¶ Calculates the fraction of nodes in the graph that are in a periodic cluster
- Args:
- None
- Returns:
- frac(real): nodes in graph in periodic clusers / total number of nodes
-
return_periodic_structure
(fmt)¶ Gathers all periodic clusters in the graph as a single pymatgen Structure
Args: fmt (str): output format for pymatgen structure set up from cluster
Returns: #CLUS_PER.”fmt”: A structure file containing periodic sites in the graph. cluster_structure (pymatgen Structure): Structure object containing all periodic clusters
-
set_minimal_clusters
()¶ Access to the information on unique unit cell clusters. Cycles through the halo clusters, gets a set unique cluster sites and sets up minimal_Cluster object to store and access the data
- Args:
- None
- Output:
- self.unit_clusters (set(minimal_Cluster)): a set of minimal_Cluster objects for unit cell in graph
-
set_site_tortuosity
()¶ Sets a dict containing the site by site tortuosity for sites in the graph unit cell
-
torture
()¶ Torture the graph and set node tortuosity for UC nodes in cluster. This only tortures UC nodes in each cluster, but the graph contains a halo of clusters.
- Args:
- none
-
torture_py
()¶ Torture the graph and set node tortuosity for UC nodes in cluster. This only tortures UC nodes in each cluster, but the graph contains a halo of clusters.
- Args:
- none
-