structuretoolkit.analyse.spatial.get_voronoi_vertices

structuretoolkit.analyse.spatial.get_voronoi_vertices#

structuretoolkit.analyse.spatial.get_voronoi_vertices(structure: Atoms, epsilon: float = 0.00025, distance_threshold: float = 0, width_buffer: float = 10.0) ndarray[source]#

Get voronoi vertices of the box.

Parameters:
  • epsilon (float) – displacement to add to avoid wrapping of atoms at borders

  • distance_threshold (float) – distance below which two vertices are considered as one. Agglomerative clustering algorithm (sklearn) is employed. Final positions are given as the average positions of clusters.

  • width_buffer (float) – width of the layer to be added to account for pbc.

Returns:

3d-array of vertices

Return type:

numpy.ndarray

This function detect octahedral and tetrahedral sites in fcc; in bcc it detects tetrahedral sites. In defects (e.g. vacancy, dislocation, grain boundary etc.), it gives a list of positions interstitial atoms might want to occupy. In order for this to be more successful, it might make sense to look at the distance between the voronoi vertices and their nearest neighboring atoms via:

>>> voronoi_vertices = structure_of_your_choice.analyse.get_voronoi_vertices()
>>> neigh = structure_of_your_choice.get_neighborhood(voronoi_vertices)
>>> print(neigh.distances.min(axis=-1))