packing_defect.core.stats

Statistics utilities for packing_defect.

Functions

average_std_per_frame(distros)

Return dict mapping frame_name to (mean, stdev) of all defects in that frame.

cluster_positions(positions)

Return a list of clusters, each as a set of (i, j) tuples.

cluster_sizes(positions)

Return cluster sizes from a set of positions.

count_defect_types(gro_dir, cutoff)

Count number of clusters ≥ cutoff in each frame GRO file.

defect_distribution(gro_dir)

Returns dict mapping frame_name to Counter of defect sizes.

defect_distro_stats(distros)

Compute mean and stdev for each defect size across frames.

global_avg_std_defect_size(distros)

Return global (mean, stdev) across all frames and sizes.

main()

open_gro(gro_path)

Open a GRO file and return a set of integer (i, j) grid positions.

return_stats(gro_dir, cutoff)

Return summary statistics (mean, median, stdev) of defect counts.

packing_defect.core.stats.average_std_per_frame(distros)[source]

Return dict mapping frame_name to (mean, stdev) of all defects in that frame.

packing_defect.core.stats.cluster_positions(positions)[source]

Return a list of clusters, each as a set of (i, j) tuples.

packing_defect.core.stats.cluster_sizes(positions)[source]

Return cluster sizes from a set of positions.

packing_defect.core.stats.count_defect_types(gro_dir, cutoff)[source]

Count number of clusters ≥ cutoff in each frame GRO file. Returns list of (frame_name, count).

packing_defect.core.stats.defect_distribution(gro_dir)[source]

Returns dict mapping frame_name to Counter of defect sizes.

packing_defect.core.stats.defect_distro_stats(distros)[source]

Compute mean and stdev for each defect size across frames.

packing_defect.core.stats.global_avg_std_defect_size(distros)[source]

Return global (mean, stdev) across all frames and sizes.

packing_defect.core.stats.main()[source]
packing_defect.core.stats.open_gro(gro_path)[source]

Open a GRO file and return a set of integer (i, j) grid positions.

packing_defect.core.stats.return_stats(gro_dir, cutoff)[source]

Return summary statistics (mean, median, stdev) of defect counts.