TASTET is a Python toolkit for selecting representative structures from molecular and materials datasets. At its core it does three things:
- Parse input structures into an ASE database.
- Represent each structure in a similarity kernel space encoded by SOAP descriptors.
- Select a space-filling subset of structures for high-fidelity calculations.
Two secondary tools support this workflow: kernel-PCA visualization of the kernel space, and unsupervised/supervised hyperparameter grid searches that tune the SOAP and kernel representation.
TASTET is built on ASE (structures and databases) and DScribe (SOAP descriptors).
pip install -e . # library only
pip install -e ".[examples]" # also run the bundled examples (installs RDKit)
pip install -e ".[docs]" # also build the Sphinx docsimport pandas as pd
from ase.io import read
from tastet.soap_utils import compute_soap
from tastet.kernel import compute_kernel
from tastet.selection import select_structures
structures = read("structures.traj", index=":")
# Represent the structures in a SOAP-encoded kernel space
soap_list = compute_soap(structures, r_cut=4.0, n_max=6, l_max=6, sigma=0.1)
K = compute_kernel(soap_list, method="rematch", metric="linear", alpha=0.5)
# Select 10 space-filling representatives directly from the kernel space
meta = pd.DataFrame({"configuration_id": range(1, len(structures) + 1)})
selected, pool, selected_indices = select_structures(K, meta, k=10, method="fps")
print(selected_indices)Two complete, self-contained example pipelines live under examples/:
examples/nanoclusters/— Cu nanoclusters on a surface (single-kernel mode).examples/rh_complex/— Rh complex conformers (tensor-product mode, with a supervised round-2 workflow).
Each is driven by three scripts — config.py, prepare.py, and run.py — sharing
the same CLI steps (db, grid_search, soap, kernel, kpca, select). See the
Use Cases docs for worked walkthroughs.
tastet/
├── soap_utils.py # compute_soap — SOAP descriptors
├── kernel.py # compute_kernel — average / REMatch kernels
├── kpca.py # fit_kpca — KernelPCA wrapper + KPCAResult dataclass
├── io.py # database, SOAP, and kernel save/load helpers
├── distance.py # kernel-induced distance distributions
├── selection.py # diverse structure selection (FPS / k-medoids)
├── pipeline.py # shared db/soap/kernel/kpca/grid_search/select steps
├── cka.py # centered kernel alignment scoring
├── metrics/ # scorer protocol + CKA scorer
├── sweep/ # SOAP × kernel grid search (single- and multi-channel)
└── plotting/ # kPCA scatter, heatmaps, distance plots, styling
TASTET is released under the MIT License — see LICENSE.
© 2026 Alejandro Cañete-Arché and the CCEM Group.