VOLT
Plugins

K-means Clustering

Identify crystal structure and grain boundaries by K-means clustering over per-atom von Mises stress, potential energy, and atomic volume.

Parameters

ParameterTypeDefaultDescription
n_clustersint2Number of K-means clusters (minimum 2). With the default of 2 the atoms split into FCC vs. grain-boundary populations.
n_initint50Number of K-means initializations; the best inertia run is kept.
seedint36Random seed for reproducible cluster assignments.
col_svmstringSvmPer-atom column holding the von Mises stress feature.
col_epotstringEpotPer-atom column holding the potential energy feature.
col_volstringVolPer-atom column holding the atomic volume feature.

Output

The plugin writes two parquet files per frame.

{outputBase}_kmeans.parquet

Per-cluster summary statistics for the frame.

interface KmeansClusterStats {
    cluster_id: int;
    label: string;
    count: int;
    percentage: float;
    svm_min: float;
    svm_max: float;
    svm_mean: float;
}

interface KmeansOutput {
    main_listing: {
        total_atoms: int;
        num_clusters: int;
        feature_column: string;
    };
    sub_listings: {
        clusters: KmeansClusterStats[];
    };
}

Surfaced in VOLT as the K-means Clustering exposure (listing-only, no exported artifact).

{outputBase}_atoms.parquet

Per-atom data in AtomisticExporter format, consumed by the VOLT viewer for 3D rendering. Atoms are grouped into buckets by their cluster label.

interface Atom {
    id: int;
    pos: [float, float, float];
    structure_id: int;
    structure_name: string;
    cluster_id: int;
    Svm: float;
    Epot: float;
    Vol: float;
}

interface AtomsOutput {
    main_listing: {
        total_atoms: int;
        structure_count: int;
    };
    sub_listings: {
        structures: Array<{
            structure_id: int;
            structure_name: string;
            atom_count: int;
        }>;
    };
    export: {
        AtomisticExporter: {
            [bucketName: string]: Atom[];
        };
    };
}

The Svm, Epot, and Vol fields carry the names given by col_svm, col_epot, and col_vol. Surfaced in VOLT as the K-means Model exposure and exported as a .glb scene.

See Also

On this page