Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -16,33 +16,117 @@ pipeline_tag: other
|
|
| 16 |
|
| 17 |
# QHFlow2 — MD17 Pre-trained Checkpoints
|
| 18 |
|
| 19 |
-
Pre-trained checkpoints for **QHFlow2** on the **MD17** dataset.
|
| 20 |
|
| 21 |
-
**Paper:** [High-order Equivariant Flow Matching for
|
| 22 |
-
**Authors:** Seongsu Kim, Nayoung Kim, Dongwoo Kim, Sungsoo Ahn (KAIST)
|
| 23 |
-
**Venue:** NeurIPS 2025
|
| 24 |
-
**Code:** [github.com/seongsukim-ml/QHFlow2](https://github.com/seongsukim-ml/QHFlow2)
|
| 25 |
|
| 26 |
## Model Variants
|
| 27 |
|
| 28 |
| Size | hidden_size | num_gnn_layers | Checkpoint Size |
|
| 29 |
-
|------|-------------|---------------|----------------|
|
| 30 |
| small_v2 | 64 | 3 | 313 MB |
|
| 31 |
| middle | 128 | 3 | 975 MB |
|
| 32 |
|
| 33 |
## Molecules
|
| 34 |
|
| 35 |
-
|
| 36 |
-
-
|
| 37 |
-
|
|
|
|
|
|
|
| 38 |
|
| 39 |
## File Structure
|
| 40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
|
|
|
| 42 |
|
| 43 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
## License
|
| 48 |
|
|
|
|
| 16 |
|
| 17 |
# QHFlow2 — MD17 Pre-trained Checkpoints
|
| 18 |
|
| 19 |
+
Pre-trained checkpoints for **QHFlow2** on the **MD17** dataset (DFT Hamiltonian prediction).
|
| 20 |
|
| 21 |
+
> **Paper:** [High-order Equivariant Flow Matching for Density Functional Theory Hamiltonian Prediction](https://arxiv.org/abs/2602.16897)
|
| 22 |
+
> **Authors:** Seongsu Kim, Nayoung Kim, Dongwoo Kim, Sungsoo Ahn (KAIST)
|
| 23 |
+
> **Venue:** NeurIPS 2025
|
| 24 |
+
> **Code:** [github.com/seongsukim-ml/QHFlow2](https://github.com/seongsukim-ml/QHFlow2)
|
| 25 |
|
| 26 |
## Model Variants
|
| 27 |
|
| 28 |
| Size | hidden_size | num_gnn_layers | Checkpoint Size |
|
| 29 |
+
|------|-------------|----------------|-----------------|
|
| 30 |
| small_v2 | 64 | 3 | 313 MB |
|
| 31 |
| middle | 128 | 3 | 975 MB |
|
| 32 |
|
| 33 |
## Molecules
|
| 34 |
|
| 35 |
+
| Molecule | Atoms | Formula |
|
| 36 |
+
|----------|-------|---------|
|
| 37 |
+
| ethanol | 9 | C₂H₆O |
|
| 38 |
+
| malondialdehyde | 9 | C₃H₄O₂ |
|
| 39 |
+
| uracil | 12 | C₄H₄N₂O₂ |
|
| 40 |
|
| 41 |
## File Structure
|
| 42 |
|
| 43 |
+
```
|
| 44 |
+
{molecule}/
|
| 45 |
+
QHFlow_so2_v5_1_{size}_b10-{molecule}/
|
| 46 |
+
weights-epoch=79-val_loss=0.0000000.ckpt
|
| 47 |
+
```
|
| 48 |
|
| 49 |
+
## Quick Start
|
| 50 |
|
| 51 |
+
### 1. Install QHFlow2
|
| 52 |
+
|
| 53 |
+
```bash
|
| 54 |
+
git clone https://github.com/seongsukim-ml/QHFlow2.git
|
| 55 |
+
cd QHFlow2
|
| 56 |
+
pip install -e ".[fairchem]"
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
### 2. Download Checkpoints
|
| 60 |
+
|
| 61 |
+
```bash
|
| 62 |
+
# Download a single checkpoint
|
| 63 |
+
huggingface-cli download ksusu/QHFlow2-MD17 \
|
| 64 |
+
"ethanol/QHFlow_so2_v5_1_small_v2_b10-ethanol/weights-epoch=79-val_loss=0.0000000.ckpt" \
|
| 65 |
+
--local-dir ckpt/md17
|
| 66 |
+
|
| 67 |
+
# Download all checkpoints (~3.9 GB)
|
| 68 |
+
huggingface-cli download ksusu/QHFlow2-MD17 --local-dir ckpt/md17
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
Or in Python:
|
| 72 |
+
|
| 73 |
+
```python
|
| 74 |
+
from huggingface_hub import hf_hub_download
|
| 75 |
+
|
| 76 |
+
path = hf_hub_download(
|
| 77 |
+
repo_id="ksusu/QHFlow2-MD17",
|
| 78 |
+
filename="ethanol/QHFlow_so2_v5_1_small_v2_b10-ethanol/weights-epoch=79-val_loss=0.0000000.ckpt",
|
| 79 |
+
)
|
| 80 |
+
```
|
| 81 |
+
|
| 82 |
+
### 3. Download Dataset
|
| 83 |
|
| 84 |
+
Download from [Google Drive](https://drive.google.com/drive/folders/1d3HTu0H7gdg54kirWBqN24x-s1QW6OKV?usp=sharing) and place under `dataset/`:
|
| 85 |
+
|
| 86 |
+
```
|
| 87 |
+
QHFlow2/dataset/
|
| 88 |
+
ethanol/
|
| 89 |
+
malondialdehyde/
|
| 90 |
+
uracil/
|
| 91 |
+
```
|
| 92 |
+
|
| 93 |
+
### 4. Run Prediction
|
| 94 |
+
|
| 95 |
+
```bash
|
| 96 |
+
python -m qhflow2.experiment.train_md17 \
|
| 97 |
+
mode=predict \
|
| 98 |
+
dataset=ethanol \
|
| 99 |
+
ckpt=ckpt/md17/ethanol/QHFlow_so2_v5_1_small_v2_b10-ethanol/weights-epoch=79-val_loss=0.0000000.ckpt
|
| 100 |
+
```
|
| 101 |
+
|
| 102 |
+
### 5. Python API
|
| 103 |
+
|
| 104 |
+
```python
|
| 105 |
+
import torch
|
| 106 |
+
from qhflow2.models import get_model, get_default_model_args
|
| 107 |
+
|
| 108 |
+
args = get_default_model_args("md17")
|
| 109 |
+
args["version"] = "QHFlow_so2_v5_1"
|
| 110 |
+
args["hidden_size"] = 64
|
| 111 |
+
args["num_gnn_layers"] = 3
|
| 112 |
+
model = get_model(args)
|
| 113 |
+
|
| 114 |
+
ckpt = torch.load("weights-epoch=79-val_loss=0.0000000.ckpt", map_location="cpu")
|
| 115 |
+
state_dict = {k.replace("model.", ""): v for k, v in ckpt["state_dict"].items()}
|
| 116 |
+
model.load_state_dict(state_dict, strict=False)
|
| 117 |
+
model.eval()
|
| 118 |
+
```
|
| 119 |
+
|
| 120 |
+
## Citation
|
| 121 |
|
| 122 |
+
```bibtex
|
| 123 |
+
@inproceedings{kim2025high,
|
| 124 |
+
title={High-order Equivariant Flow Matching for Density Functional Theory Hamiltonian Prediction},
|
| 125 |
+
author={Kim, Seongsu and Kim, Nayoung and Kim, Dongwoo and Ahn, Sungsoo},
|
| 126 |
+
booktitle={Advances in Neural Information Processing Systems},
|
| 127 |
+
year={2025}
|
| 128 |
+
}
|
| 129 |
+
```
|
| 130 |
|
| 131 |
## License
|
| 132 |
|