How asma-jamali/spectral-molecular-kernels works
Kermol is a molecular-property kernel-ridge regression toolkit focused on kernel spectra. Its documented workflow loads QM9 data, prepares labels and molecular representations, builds kernels, fits/evaluates KRR, and analyzes spectral metrics; optional analyses include rank truncation and feature ablation. The README establishes the example-level workflow and capabilities; sampled source confirms core data, representation, kernel, spectral, truncation, and output responsibilities, but not every example’s internal wiring.
Main entry points: kernels.py Kernel construction and KRR · features.py Feature generators · qm9.py QM9 preparation · loader.py QM9 loader
Components 16
Data preparation
- QM9 preparation
Kermol/data/qm9.py - QM9 loader
Kermol/data/loader.py - Property labels
Kermol/data/properties.py
Molecular representations
- Feature generators
Kermol/data/features.py - MBDF descriptors
Kermol/data/mbdf.py - Precomputed embeddings
Kermol/data/features.py - Transformer embeddings
examples/generate_llm_embeddings.py
Kernel analysis
- Kernel construction and KRR
Kermol/kernels/kernels.py - Kernel generator
Kermol/kernels/gen_kernel.py - Spectral metrics
Kermol/kernels/spectral.py - Rank truncation
Kermol/kernels/truncate.py - Feature ablation
examples/ablation_study.py
Results and outputs
- Analysis outputs
Kermol/io_utils.py
Other components
- Researcher
- QM9 archive
- Hugging Face models
Connections 18
- Researcher → QM9 preparation: prepares dataset
README.md - QM9 preparation → QM9 archive: downloads QM9
Kermol/data/qm9.py - Researcher → QM9 loader: loads data
README.md - QM9 loader → Property labels: supplies properties
- Researcher → Feature generators: generates features
README.md - Feature generators → MBDF descriptors: calls generator
Kermol/data/features.py - Researcher → Precomputed embeddings: loads embeddings
README.md - Researcher → Transformer embeddings: generates embeddings
README.md - Transformer embeddings → Hugging Face models: loads model
- Feature generators → Kernel construction and KRR: provides representations
- Precomputed embeddings → Kernel construction and KRR: provides vectors
README.md - Kernel construction and KRR → Spectral metrics: analyzes training kernel
- Researcher → Kernel construction and KRR: builds and fits
README.md - Kernel construction and KRR → Rank truncation: uses KRR predictor
Kermol/kernels/truncate.py - Researcher → Rank truncation: sweeps rank
README.md - Researcher → Feature ablation: removes features
README.md - Spectral metrics → Analysis outputs: saves metrics
- Researcher → Analysis outputs: saves results