structuretoolkit.analyse.spatial.cluster_by_steinhardt#
- structuretoolkit.analyse.spatial.cluster_by_steinhardt(positions: ndarray, neigh, l_values: list[int], q_eps: float, var_ratio: float, min_samples: int) ndarray[source]#
Clusters candidate positions via Steinhardt parameters and the variance in distances to host atoms.
The cluster that has the lowest variance is returned, i.e. those positions that have the most “regular” coordination polyhedra.
- Parameters:
positions (array) – candidate positions
neigh (Neighbor) – neighborhood information of the candidate positions
l_values (list of int) – which steinhardt parameters to use for clustering
q_eps (float) – maximum intercluster distance in steinhardt parameters for DBSCAN clustering
var_ratio (float) – multiplier to make steinhardt’s and distance variance numerically comparable
min_samples (int) – minimum size of clusters
- Returns:
Positions of the most likely interstitial sites
- Return type:
array