site_analysis.voronoi_site
Voronoi site representation for crystal structure analysis.
This module provides the VoronoiSite class, which represents a site defined by a Voronoi cell centered at a fixed position.
- class VoronoiSite(frac_coords: ndarray, label: str | None = None)[source]
Bases:
SiteSite subclass corresponding to Voronoi cells centered on fixed positions.
Voronoi sites divide space into regions where each point in a region is closer to its site center than to any other site center.
Unlike other site types, a single VoronoiSite cannot determine whether an atom is contained within it, as this calculation depends on the positions of all other Voronoi sites in the structure. Therefore, the contains_point method is not implemented directly in this class.
- frac_coords
Fractional coordinates of the site centre.
- Type:
np.ndarray
See also
Site: Parent class documenting inherited attributes(index, label, contains_atoms, trajectory, points, transitions, average_occupation).
Important
Do not use VoronoiSite.contains_point() directly. Instead, use
VoronoiSiteCollectionand its assign_site_occupations() method to determine which atoms belong to which Voronoi sites.- as_dict() dict[source]
Json-serializable dict representation of this VoronoiSite.
- Parameters:
None –
- Returns:
(dict)
- property centre: ndarray
Returns the centre position of this site.
- Parameters:
None –
- Returns:
np.ndarray