site_analysis.voronoi_site

class VoronoiSite(frac_coords: numpy.ndarray, label: str = None)[source]

Bases: site_analysis.site.Site

Site subclass corresponding to Voronoi cells centered on fixed positions.

frac_coords

Fractional coordinates of the site centre.

Type:np.array
as_dict() → Dict[KT, VT][source]

Json-serializable dict representation of this VoronoiSite.

Parameters:None
Returns:(dict)
centre() → numpy.ndarray[source]

Returns the centre position of this site.

Parameters:None
Returns:np.ndarray
contains_point(x: numpy.ndarray, *args, **kwargs) → bool[source]

A single Voronoi site cannot determine whether it contains a given point, because the site boundaries are defined by the set of all Voronoi sites.

Use VoronoiSiteCollection.assign_site_occupations() instead.

classmethod from_dict(d)[source]

Create a VoronoiSite object from a dict representation.

Parameters:d (dict) – The dict representation of this Site.
Returns:(VoronoiSite)