edtools.find_cell

Functions:

cluster_cell(cells[, distance, method, ...])

Perform hierarchical cluster analysis on a list of cells.

d_calculator(cell)

Helper function for unit_cell_lcv_distance

distance_from_dendrogram(z[, ylabel, ...])

Takes a linkage object z from scipy.cluster.hierarchy.linkage and displays a dendrogram.

find_cell(cells, weights[, binsize])

Opens a plot with 6 subplots in which the cell parameter histogram is displayed.

get_clusters(z, cells[, distance])

main()

parse_cellparm(fn)

put_in_order(cells)

order cell parameters in order to eliminate difference in cell distance because of parameter order

to_radian(cells)

convert all angles in unit cell parameter list to radians cells: the cell parameters that are parsed from cells.yaml as np array

to_sin(cells)

convert all angles in unit cell parameter list to sine cells: the cell parameters that are parsed from cells.yaml as np array

unit_cell_lcv_distance(cell1, cell2)

Implements Linear Cell Volume from Acta Cryst.

volume_difference(cell1, cell2)

Return the absolute difference in volumes between two unit cells

weighted_average(values[, weights])

Returns weighted mean and standard deviation

edtools.find_cell.cluster_cell(cells: list, distance: Optional[float] = None, method: str = 'average', metric: str = 'euclidean', use_radian: bool = False, use_sine: bool = False)

Perform hierarchical cluster analysis on a list of cells.

method: lcv, volume, euclidean distance: cutoff distance, if it is not given, pop up a dendrogram to

interactively choose a cutoff distance

use_radian: Use radian instead of degrees to downweight difference use_sine: Use sine for unit cell clustering (to disambiguousize the difference in angles)

edtools.find_cell.d_calculator(cell: list) tuple

Helper function for unit_cell_lcv_distance

edtools.find_cell.distance_from_dendrogram(z, ylabel: str = '', initial_distance: Optional[float] = None) float

Takes a linkage object z from scipy.cluster.hierarchy.linkage and displays a dendrogram. The cutoff distance can be picked interactively, and is returned ylabel: sets the label for the y-axis initial_distance: initial cutoff distsance to display

edtools.find_cell.find_cell(cells, weights, binsize=0.5)

Opens a plot with 6 subplots in which the cell parameter histogram is displayed. It will calculate the weighted mean of the unit cell parameters. The ranges can be adjusted by dragging on the plots.

edtools.find_cell.get_clusters(z, cells, distance=0.5)
edtools.find_cell.main()
edtools.find_cell.parse_cellparm(fn)
edtools.find_cell.put_in_order(cells)

order cell parameters in order to eliminate difference in cell distance because of parameter order

edtools.find_cell.to_radian(cells)

convert all angles in unit cell parameter list to radians cells: the cell parameters that are parsed from cells.yaml as np array

edtools.find_cell.to_sin(cells)

convert all angles in unit cell parameter list to sine cells: the cell parameters that are parsed from cells.yaml as np array

edtools.find_cell.unit_cell_lcv_distance(cell1: list, cell2: list) float

Implements Linear Cell Volume from Acta Cryst. (2013). D69, 1617-1632

edtools.find_cell.volume_difference(cell1: list, cell2: list)

Return the absolute difference in volumes between two unit cells

edtools.find_cell.weighted_average(values, weights=None)

Returns weighted mean and standard deviation