Smart Hybrid Functionals via Hierarchical Atomic Pathway Networks
git clone https://github.com/SuthPhy2Ai/HAPNet.git
cd HAPNet
conda create -n hapnet python=3.10
conda activate hapnet
pip install -r requirements.txtMat2vec pretrained embeddings are required but not included due to licensing. See src/mat2vec-master/README.md for download instructions.
The dielectric dataset (dbs/clean.db) must be built from the Materials Project. See dbs/README.md for instructions.
HAPNet/
├── models/ # GRU encoder + CLIP model
├── utils/ # Dataset, feature extraction, training utilities
├── scripts/ # Training scripts (CLIP + regression)
├── src/ # Path representation, embeddings, auxiliary data
├── dbs/ # ASE database (user-built, 7240 structures)
├── checkpoints/ # Saved model weights
└── conf.py # Centralized hyperparameters
Two-stage pipeline:
# Stage 1: CLIP contrastive pretraining
python scripts/train_clip.py
# Stage 2: Regression fine-tuning
python scripts/train_regression.pyHyperparameters for CLIP are defined in scripts/train_clip.py. Regression hyperparameters are in conf.py.
Checkpoints are saved to checkpoints/.
Each atom is encoded as a 384-dim vector:
| Component | Dims | Source |
|---|---|---|
| Atomic embedding | 92 | One-hot atomic number |
| Mat2vec | 200 | Pretrained material embeddings |
| Symmetry | 64 | Point group features |
| Window distance | 4 | Local distance (Gaussian basis) |
| Radial structure | 24 | Radial distribution (Gaussian basis) |
Atoms are ordered via a TSP-inspired nearest-neighbor path, then processed by a bidirectional GRU with attention.