Skip to content

Commit 30682e9

Browse files
author
Haiyang Yu
committed
Merge branch 'main' of https://github.com/divelab/AIRS into main
This is for merging. Merge branch 'main' of https://github.com/divelab/AIRS into main
2 parents 0dc08c7 + 3d308d2 commit 30682e9

11 files changed

+432
-1056
lines changed

OpenDFT/QHBench/QH9/QH9.png

270 KB
Loading

OpenDFT/QHBench/QH9/README.md

+24-20
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,30 @@
11
# QH9: A Quantum Hamiltonian Prediction Benchmark
22

3-
[[Paper]](https://arxiv.org/abs/2306.09549)
3+
[[Paper]](https://arxiv.org/abs/2306.09549) (**NeurIPS**, Track on Datasets and Benchmarks, 2023)
44

55
## Introduction
66

77
QH9 provides precise DFT-calculated Hamiltonian matrices for **2,399 molecular dynamics trajectories** and **130,831 stable molecular geometries**, based on the [QM9](http://quantum-machine.org/datasets/) dataset.
88

9-
In this repo, we provide both the QH9 dataset and the baseline models, which can be highly valuable for developing machine learning methods and accelerating molecular and materials design for scientific and technological applications.
9+
In this repo, we provide both the QH9 dataset and the benchmark code, which can be highly valuable for developing machine learning methods and accelerating molecular and materials design for scientific and technological applications.
1010

11+
![QH9](figs/QH9.png)
1112

1213
## Tasks
1314

1415
To comprehensively evaluate the quantum Hamiltonian prediction performance, we define the following tasks based on the obtained stable and dynamic geometries in the QH9 dataset. Please refer to our paper for details of these task setups.
1516

16-
* **QH-stable-iid**
17-
* **QH-stable-ood**
18-
* **QH-dynamic-geo**
19-
* **QH-dynamic-mol**
17+
* **QH9-stable-id**
18+
* **QH9-stable-ood**
19+
* **QH9-dynamic-geo**
20+
* **QH9-dynamic-mol**
2021

2122
| Task | # Total geometries | # Total molecules | # Training/validation/testing geometries|
2223
| -------- | -------- | -------- | -------- |
23-
|**QH-stable-iid** | 130, 831 | 130, 831 | 104, 664/13, 083/13, 084|
24-
|**QH-stable-ood** | 130, 831 | 130, 831 | 104, 001/17, 495/9, 335|
25-
|**QH-dynamic-geo** | 143, 940 | 2, 399 | 119, 950/11, 995/11, 995|
26-
|**QH-dynamic-mol** | 143, 940 | 2, 399 | 115, 140/14, 340/14, 460|
24+
|**QH9-stable-id** | 130, 831 | 130, 831 | 104, 664/13, 083/13, 084|
25+
|**QH9-stable-ood** | 130, 831 | 130, 831 | 104, 001/17, 495/9, 335|
26+
|**QH9-dynamic-geo** | 143, 940 | 2, 399 | 119, 950/11, 995/11, 995|
27+
|**QH9-dynamic-mol** | 143, 940 | 2, 399 | 115, 140/14, 340/14, 460|
2728

2829
## Requirement
2930

@@ -38,17 +39,17 @@ Meanwhile, we provide the installation file, and you can build the environment b
3839

3940

4041
## Dataset Usage
41-
We provide the datasets as commonly used PyG datasets. Here are simple examples to load our datasets with a few lines of code. Prior to that, you can download the `datasets` folder, which includes the raw data files `QH9Stable.db` and `QH9Dynamic.db`, via [this Google Drive link](https://drive.google.com/drive/folders/13pPgBh3XvN2FCpowfnA8TT4VJ0OTceNM?usp=sharing) and [OneDrive Link](https://tamucs-my.sharepoint.com/:f:/g/personal/haiyang_tamu_edu/Ev4XIVcumhVFtaI8lUkIHXABHkKnKgWSJ5LYZOo67UKO0g?e=tsXkT1). Meanwhile, we provide the zip files of the datasets in this [google drive link](https://drive.google.com/drive/u/0/folders/1LXTC8uaOQzmb76FsuGfwSocAbK5Hshfj).
42+
We provide the datasets as commonly used PyG datasets. Here are simple examples to load our datasets with a few lines of code. Prior to that, you can download the `datasets` folder, which includes the raw data files `QH9Stable.db` and `QH9Dynamic.db`, via [this Google Drive link](https://drive.google.com/drive/folders/13pPgBh3XvN2FCpowfnA8TT4VJ0OTceNM?usp=sharing) or [OneDrive Link](https://tamucs-my.sharepoint.com/:f:/g/personal/haiyang_tamu_edu/Ev4XIVcumhVFtaI8lUkIHXABHkKnKgWSJ5LYZOo67UKO0g?e=tsXkT1). Meanwhile, we provide the zip files of the datasets in this [google drive link](https://drive.google.com/drive/u/0/folders/1LXTC8uaOQzmb76FsuGfwSocAbK5Hshfj).
4243

4344
```python
4445
from torch_geometric.loader import DataLoader
4546
from datasets import QH9Stable, QH9Dynamic
4647

4748
### Use one of the following lines to Load the specific dataset
48-
dataset = QH9Stable(split='random') # QH-stable-iid
49-
dataset = QH9Stable(split='size_ood') # QH-stable-ood
50-
dataset = QH9Dynamic(split='geometry') # QH-dynamic-geo
51-
dataset = QH9Dynamic(split='mol') # QH-dynamic-mol
49+
dataset = QH9Stable(split='random') # QH9-stable-id
50+
dataset = QH9Stable(split='size_ood') # QH9-stable-ood
51+
dataset = QH9Dynamic(split='geometry') # QH9-dynamic-geo
52+
dataset = QH9Dynamic(split='mol') # QH9-dynamic-mol
5253

5354
### Get the training/validation/testing subsets
5455
train_dataset = dataset[dataset.train_mask]
@@ -62,17 +63,20 @@ test_data_loader = DataLoader(test_dataset, batch_size=32, shuffle=False)
6263
```
6364

6465
## Baselines
65-
Equivariant quantum tensor network QHNet is selected as the main baseline method in the QH9 benchmark currently. QHNet has an extendable expansion module that is built upon intermediate full orbital matrices, enabling its capability to effectively handle different molecules. This flexibility allows QHNet to accommodate various molecules in the QH9 benchmark.
66+
Equivariant quantum tensor network [QHNet](https://arxiv.org/abs/2306.04922) is selected as the main baseline method in the QH9 benchmark currently. QHNet has an extendable expansion module that is built upon intermediate full orbital matrices, enabling its capability to effectively handle different molecules. This flexibility allows QHNet to accommodate various molecules in the QH9 benchmark.
6667

6768
* Train the QHNet model
69+
6870
```shell script
6971
### Modify the configurations in config/config.yaml (or pass the configurations as args) as needed, and then run
70-
python main.py datasets=QH9-stable datasets.split=random # QH-stable-iid
71-
python main.py datasets=QH9-stable datasets.split=size_ood # QH-stable-ood
72-
python main.py datasets=QH9-dynamic datasets.split=geometry # QH-stable-iid
73-
python main.py datasets=QH9-dynamic datasets.split=mol # QH-stable-iid
72+
python main.py datasets=QH9-stable datasets.split=random # QH9-stable-id
73+
python main.py datasets=QH9-stable datasets.split=size_ood # QH9-stable-ood
74+
python main.py datasets=QH9-dynamic datasets.split=geometry # QH9-dynamic-geo
75+
python main.py datasets=QH9-dynamic datasets.split=mol # QH9-dynamic-mol
7476
```
7577

78+
**Trained models**: our trained QHNet models on the defined tasks are available via [this Google Drive link](https://drive.google.com/drive/folders/10ebqIWLrZ672A9bFg9wLe48F-nsz7za3?usp=share_link).
79+
7680
* Evaluate the trained model (in terms of MAE on Hamiltonian matrix, MAE on occupied orbital energies, and cosine similarity of orbital coefficients)
7781
```shell script
7882
### Modify the configurations in config/config.yaml (or pass the configurations as args) as needed (including the trained_model arg), and then run

OpenDFT/QHBench/QH9/config/datasets/QH9-dynamic.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pin_memory: True
1313
num_workers: 8
1414

1515
warmup_steps: 1000
16-
total_steps: 250000
16+
total_steps: 300000
1717
lr_end: 1e-7
1818

1919
train_batch_interval: 100

OpenDFT/QHBench/QH9/config/datasets/QH9-stable.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pin_memory: True
1313
num_workers: 8
1414

1515
warmup_steps: 1000
16-
total_steps: 200000
16+
total_steps: 300000
1717
lr_end: 1e-7
1818

1919
train_batch_interval: 100

OpenDFT/QHBench/QH9/figs/QH9.png

270 KB
Loading

0 commit comments

Comments
 (0)