Delete docs
Browse files- docs/cluster.md +0 -140
- docs/eigen_dataset.md +0 -81
- docs/horm.md +0 -157
- docs/rgd1.md +0 -79
- docs/training.md +0 -77
docs/cluster.md
DELETED
|
@@ -1,140 +0,0 @@
|
|
| 1 |
-
# Installation
|
| 2 |
-
|
| 3 |
-
### First time connecting to a cluster
|
| 4 |
-
|
| 5 |
-
```bash
|
| 6 |
-
ssh -Y aburger@killarney.alliancecan.ca
|
| 7 |
-
```
|
| 8 |
-
|
| 9 |
-
Add ssh key to github
|
| 10 |
-
```bash
|
| 11 |
-
ssh-keygen -t ed25519
|
| 12 |
-
eval "$(ssh-agent -s)"
|
| 13 |
-
ssh-add ~/.ssh/id_ed25519
|
| 14 |
-
cat ~/.ssh/id_ed25519.pub
|
| 15 |
-
```
|
| 16 |
-
|
| 17 |
-
### Python env
|
| 18 |
-
|
| 19 |
-
```bash
|
| 20 |
-
python3.11 -m venv gadenv
|
| 21 |
-
source gadenv/bin/activate
|
| 22 |
-
```
|
| 23 |
-
|
| 24 |
-
```bash
|
| 25 |
-
# module spider cuda
|
| 26 |
-
module load cuda/12.6
|
| 27 |
-
module load gcc/12.3
|
| 28 |
-
```
|
| 29 |
-
|
| 30 |
-
```bash
|
| 31 |
-
pip3 uninstall torch torchvision torchaudio torch-scatter torch-sparse torch-cluster torch-spline-conv -y
|
| 32 |
-
pip3 install --no-cache-dir torch==2.4.1 --index-url https://download.pytorch.org/whl/cu126
|
| 33 |
-
|
| 34 |
-
# install the rest
|
| 35 |
-
pip3 uninstall torch-cluster pyg-lib torch-scatter torch-sparse torch-geometric -y
|
| 36 |
-
pip3 install --no-cache-dir --no-index torch-scatter -f https://data.pyg.org/whl/torch-2.4.1+cu128.html
|
| 37 |
-
pip3 install --no-cache-dir torch-geometric==2.6.1
|
| 38 |
-
|
| 39 |
-
pip3 install --no-cache-dir numpy>=1.26.0 scipy scikit-learn pandas ase==3.25.0 plotly imageio seaborn black tqdm joblib einops ipykernel toml omegaconf nbformat nglview py3Dmol==2.5.0 hydra-submitit-launcher hydra-core==1.* wandb==0.19.11w pyyaml dxtb[libcint] torchmetrics joblib submitit rmsd pytorch_warmup e3nn==0.5.1 huggingface_hub>=0.27.1 kagglehub>=0.3.12 networkx==3.4.2 pydantic==2.11.4 opt-einsum-fx==0.1.4 lmdb==1.5.1 h5py>=3.10.0 progressbar==2.5
|
| 40 |
-
# fairchem-core==1.10.0
|
| 41 |
-
pip3 install --no-cache-dir triton==2.2.0 pytorch-lightning==2.5.1.post0
|
| 42 |
-
# pip3 install les@git+https://github.com/ChengUCB/les
|
| 43 |
-
|
| 44 |
-
# compute canada
|
| 45 |
-
# pip3 install --no-cache-dir rdkit==2024.9.6
|
| 46 |
-
module load rdkit/2023.09.5 openmm/8.2.0 openbabel/3.1.1 mctc-lib/0.3.1
|
| 47 |
-
|
| 48 |
-
pip install -e .
|
| 49 |
-
|
| 50 |
-
pip install -U "jax[cuda12]"==0.6.2
|
| 51 |
-
pip install -e sella
|
| 52 |
-
```
|
| 53 |
-
|
| 54 |
-
I had problems with the compute canada version of wandb, so I installed it manually
|
| 55 |
-
```bash
|
| 56 |
-
pip uninstall wandb -y
|
| 57 |
-
|
| 58 |
-
wget https://files.pythonhosted.org/packages/88/c9/41b8bdb493e5eda32b502bc1cc49d539335a92cacaf0ef304d7dae0240aa/wandb-0.20.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -O wandb-0.20.1-py3-none-any.whl
|
| 59 |
-
|
| 60 |
-
PIP_CONFIG_FILE=/dev/null pip3 install wandb-0.20.1-py3-none-any.whl --force-reinstall --no-deps --no-build-isolation --no-cache-dir --no-index
|
| 61 |
-
```
|
| 62 |
-
|
| 63 |
-
If you want to use MACE
|
| 64 |
-
```bash
|
| 65 |
-
pip install cuequivariance cuequivariance-torch cuequivariance-ops-torch-cu12
|
| 66 |
-
git clone https://github.com/ACEsuit/mace.git
|
| 67 |
-
pip install -e ./mace
|
| 68 |
-
```
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
### Setup
|
| 72 |
-
Create a .env file in the root directory and set these variables (adjust as needed):
|
| 73 |
-
```bash
|
| 74 |
-
touch .env
|
| 75 |
-
nano .env
|
| 76 |
-
```
|
| 77 |
-
```bash
|
| 78 |
-
# .env
|
| 79 |
-
HOMEROOT=${HOME}/gad-ff
|
| 80 |
-
# some scratch space where we can write files during training. can be the same as HOMEROOT
|
| 81 |
-
PROJECTROOT=${PROJECT}/gad-ff
|
| 82 |
-
# the python environment to use (run `which python` to find it)
|
| 83 |
-
PYTHONBIN=${HOME}/gad-ff/gadenv/bin/python
|
| 84 |
-
WANDB_ENTITY=...
|
| 85 |
-
MPLCONFIGDIR=${PROJECTROOT}/.matplotlib
|
| 86 |
-
```
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
Simlink
|
| 90 |
-
```bash
|
| 91 |
-
rm -rf ${PROJECT}/.cache
|
| 92 |
-
rm -rf ${HOME}/.cache
|
| 93 |
-
mkdir -p ${PROJECT}/.cache
|
| 94 |
-
# the fake folder we will use
|
| 95 |
-
ln -s ${PROJECT}/.cache ${HOME}/.cache
|
| 96 |
-
# Check the simlink
|
| 97 |
-
ls -la ${PROJECT}/.cache
|
| 98 |
-
|
| 99 |
-
rm -rf ${PROJECT}/.conda
|
| 100 |
-
rm -rf ${HOME}/.conda
|
| 101 |
-
mkdir -p ${PROJECT}/.conda
|
| 102 |
-
# the fake folder we will use
|
| 103 |
-
ln -s ${PROJECT}/.conda ${HOME}/.conda
|
| 104 |
-
# Check the simlink
|
| 105 |
-
ls -la ${PROJECT}/.conda
|
| 106 |
-
|
| 107 |
-
rm -rf ${PROJECT}/.mamba
|
| 108 |
-
rm -rf ${HOME}/.mamba
|
| 109 |
-
mkdir -p ${PROJECT}/.mamba
|
| 110 |
-
# the fake folder we will use
|
| 111 |
-
ln -s ${PROJECT}/.mamba ${HOME}/.mamba
|
| 112 |
-
# Check the simlink
|
| 113 |
-
ls -la ${PROJECT}/.mamba
|
| 114 |
-
```
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
### Setup
|
| 118 |
-
|
| 119 |
-
```bash
|
| 120 |
-
# download HORM dataset (11GB)
|
| 121 |
-
python scripts_horm/download_horm_data_kaggle.py
|
| 122 |
-
```
|
| 123 |
-
|
| 124 |
-
```bash
|
| 125 |
-
# Download HORM EquiformerV2 with Energy-Force-Hessian Training
|
| 126 |
-
mkdir -p ckpt
|
| 127 |
-
wget https://huggingface.co/yhong55/HORM/resolve/main/eqv2.ckpt -O ckpt/eqv2.ckpt
|
| 128 |
-
```
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
### Start an interactive session
|
| 132 |
-
|
| 133 |
-
Killarney
|
| 134 |
-
```bash
|
| 135 |
-
salloc -A aip-aspuru -t 60:00:00 -D /project/aip-aspuru/aburger/gad-ff --gres=gpu:l40s:1 --mem=128GB
|
| 136 |
-
```
|
| 137 |
-
Balam
|
| 138 |
-
```bash
|
| 139 |
-
debugjob --clean -g 1
|
| 140 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
docs/eigen_dataset.md
DELETED
|
@@ -1,81 +0,0 @@
|
|
| 1 |
-
# Creating the Eigen dataset
|
| 2 |
-
Smallest Hessian eigenvalues and their eigenvectors
|
| 3 |
-
|
| 4 |
-
For more information about the HORM dataset, see [docs/horm.md](docs/horm.md)
|
| 5 |
-
|
| 6 |
-
### Prerequisites
|
| 7 |
-
|
| 8 |
-
Start an interactive job
|
| 9 |
-
```bash
|
| 10 |
-
salloc -A aip-aspuru -t 60:00:00 -D /project/aip-aspuru/aburger/gad-ff --gres=gpu:l40s:1 --mem=128GB
|
| 11 |
-
source gadenv/bin/activate
|
| 12 |
-
source .env
|
| 13 |
-
```
|
| 14 |
-
|
| 15 |
-
Download the HORM dataset (11GB)
|
| 16 |
-
```bash
|
| 17 |
-
python scripts_horm/download_horm_data_kaggle.py
|
| 18 |
-
```
|
| 19 |
-
|
| 20 |
-
## DFT Hessian-eigen dataset
|
| 21 |
-
|
| 22 |
-
```bash
|
| 23 |
-
python scripts/create_dft_hess_eigen_dataset.py --dataset-file data/sample_100.lmdb
|
| 24 |
-
|
| 25 |
-
python scripts/create_dft_hess_eigen_dataset.py --dataset-file ts1x-val.lmdb
|
| 26 |
-
python scripts/create_dft_hess_eigen_dataset.py --dataset-file RGD1.lmdb
|
| 27 |
-
python scripts/create_dft_hess_eigen_dataset.py --dataset-file ts1x_hess_train_big.lmdb
|
| 28 |
-
"""
|
| 29 |
-
|
| 30 |
-
## EquiformerV2 Hessian-eigen dataset
|
| 31 |
-
|
| 32 |
-
### Test
|
| 33 |
-
Test if the dataset creation is working
|
| 34 |
-
```bash
|
| 35 |
-
python scripts/create_equ_hess_eigen_dataset.py --dataset-file data/sample_100.lmdb
|
| 36 |
-
python scripts/test_eigen_dataset.py --original-dataset data/sample_100.lmdb
|
| 37 |
-
```
|
| 38 |
-
|
| 39 |
-
### Smaller datasets
|
| 40 |
-
Create the smaller datasets (~10-20h each)
|
| 41 |
-
```bash
|
| 42 |
-
sbatch scripts/killarney.sh scripts/create_equ_hess_eigen_dataset.py --dataset-file ts1x-val.lmdb
|
| 43 |
-
sbatch scripts/killarney.sh scripts/create_equ_hess_eigen_dataset.py --dataset-file RGD1.lmdb
|
| 44 |
-
|
| 45 |
-
# test
|
| 46 |
-
python scripts/test_eigen_dataset.py --original-dataset ts1x-val.lmdb
|
| 47 |
-
python scripts/test_eigen_dataset.py --original-dataset RGD1.lmdb
|
| 48 |
-
```
|
| 49 |
-
|
| 50 |
-
### Large datasets
|
| 51 |
-
|
| 52 |
-
We split the datasets into 10 parts that can run in parallel (~3 days each)
|
| 53 |
-
```bash
|
| 54 |
-
sbatch scripts/killarney.sh scripts/create_equ_hess_eigen_dataset_split.py --process --dataset ts1x_hess_train_big.lmdb --start-idx 0 --end-idx 172536 --job-id 0
|
| 55 |
-
sbatch scripts/killarney.sh scripts/create_equ_hess_eigen_dataset_split.py --process --dataset ts1x_hess_train_big.lmdb --start-idx 172536 --end-idx 345072 --job-id 1
|
| 56 |
-
sbatch scripts/killarney.sh scripts/create_equ_hess_eigen_dataset_split.py --process --dataset ts1x_hess_train_big.lmdb --start-idx 345072 --end-idx 517608 --job-id 2
|
| 57 |
-
sbatch scripts/killarney.sh scripts/create_equ_hess_eigen_dataset_split.py --process --dataset ts1x_hess_train_big.lmdb --start-idx 517608 --end-idx 690144 --job-id 3
|
| 58 |
-
sbatch scripts/killarney.sh scripts/create_equ_hess_eigen_dataset_split.py --process --dataset ts1x_hess_train_big.lmdb --start-idx 690144 --end-idx 862680 --job-id 4
|
| 59 |
-
sbatch scripts/killarney.sh scripts/create_equ_hess_eigen_dataset_split.py --process --dataset ts1x_hess_train_big.lmdb --start-idx 862680 --end-idx 1035216 --job-id 5
|
| 60 |
-
sbatch scripts/killarney.sh scripts/create_equ_hess_eigen_dataset_split.py --process --dataset ts1x_hess_train_big.lmdb --start-idx 1035216 --end-idx 1207752 --job-id 6
|
| 61 |
-
sbatch scripts/killarney.sh scripts/create_equ_hess_eigen_dataset_split.py --process --dataset ts1x_hess_train_big.lmdb --start-idx 1207752 --end-idx 1380288 --job-id 7
|
| 62 |
-
sbatch scripts/killarney.sh scripts/create_equ_hess_eigen_dataset_split.py --process --dataset ts1x_hess_train_big.lmdb --start-idx 1380288 --end-idx 1552824 --job-id 8
|
| 63 |
-
sbatch scripts/killarney.sh scripts/create_equ_hess_eigen_dataset_split.py --process --dataset ts1x_hess_train_big.lmdb --start-idx 1552824 --end-idx 1725362 --job-id 9
|
| 64 |
-
```
|
| 65 |
-
|
| 66 |
-
After the job is done, we can merge the datasets
|
| 67 |
-
```bash
|
| 68 |
-
python scripts/create_equ_hess_eigen_dataset_split.py --combine --dataset ts1x_hess_train_big.lmdb
|
| 69 |
-
```
|
| 70 |
-
|
| 71 |
-
Check the files (default location)
|
| 72 |
-
```bash
|
| 73 |
-
ls -lh ~/.cache/kagglehub/datasets/yunhonghan/hessian-dataset-for-optimizing-reactive-mliphorm/versions/5/
|
| 74 |
-
```
|
| 75 |
-
|
| 76 |
-
### Next steps
|
| 77 |
-
|
| 78 |
-
Get training
|
| 79 |
-
```bash
|
| 80 |
-
python scripts/train_eigen.py experiment=debug
|
| 81 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
docs/horm.md
DELETED
|
@@ -1,157 +0,0 @@
|
|
| 1 |
-
# HORM:A Molecular Hessian Database for Optimizing Reactive Machine Learning Interatomic Potentials
|
| 2 |
-
|
| 3 |
-
This is the official implementation for the paper: "A Molecular Hessian Database for Optimizing Reactive Machine Learning Interatomic Potentials".
|
| 4 |
-
|
| 5 |
-
Paper: https://arxiv.org/abs/2505.12447
|
| 6 |
-
Code: https://github.com/deepprinciple/HORM
|
| 7 |
-
Data: https://www.kaggle.com/datasets/yunhonghan/hessian-dataset-for-optimizing-reactive-mliphorm/data
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
- [Overview](#overview)
|
| 11 |
-
- [Installation Guide](#installation-guide)
|
| 12 |
-
- [How to run this code](#how-to-run-this-code)
|
| 13 |
-
|
| 14 |
-
# Overview
|
| 15 |
-
Transition state (TS) characterization is central to computational reaction modeling, yet conventional approaches depend on expensive density functional theory (DFT) calculations, limiting their scalability. Machine learning interatomic potentials (MLIPs) have emerged as a promising approach to accelerate TS searches by approximating quantum-level accuracy at a fraction of the cost. However, most MLIPs are primarily designed for energy and force prediction, thus their capacity to accurately estimate Hessians, which are crucial for TS optimization, remains constrained by limited training data and inadequate learning strategies. This work introduces the Hessian dataset for Optimizing Reactive MLIP (HORM), the largest quantum chemistry Hessian database dedicated to reactive systems, comprising 1.84 million Hessian matrices computed at the $\omega$B97X/6-31G(d) level of theory. To effectively leverage this dataset, we adopt a Hessian-informed training strategy that incorporates stochastic row sampling, which addresses the dramatically increased cost and complexity of incorporating second-order information into MLIPs. Various MLIP architectures and force prediction schemes trained on HORM demonstrate up to a 63\% reduction in Hessian mean absolute error and up to a 200× increase in TS search success rates compared to models trained without Hessian information. These results highlight how HORM addresses critical data and methodological gaps, enabling the development of more accurate and robust reactive MLIPs for large-scale reaction network exploration.
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
# Installation Guide:
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
```bash
|
| 22 |
-
pip install torch==2.2.1
|
| 23 |
-
pip install . # building wheel might take a while
|
| 24 |
-
```
|
| 25 |
-
|
| 26 |
-
For torch-cluster installation, you need to install the version that matches your CUDA version.
|
| 27 |
-
For example, if you encounter CUDA-related errors, you can uninstall torch-cluster and install the version matching your CUDA version. For CUDA 12.1:
|
| 28 |
-
|
| 29 |
-
```bash
|
| 30 |
-
pip install torch-cluster -f https://data.pyg.org/whl/torch-2.2.1+cu121.html
|
| 31 |
-
```
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
# How to run this code:
|
| 36 |
-
|
| 37 |
-
### Train models
|
| 38 |
-
|
| 39 |
-
To train a model, please select the desired architecture from the available options: 'LeftNet', 'EquiformerV2', and 'AlphaNet'.
|
| 40 |
-
Specify your choice in the `model_type` field within the `train.py` file.
|
| 41 |
-
```bash
|
| 42 |
-
python train.py
|
| 43 |
-
```
|
| 44 |
-
|
| 45 |
-
### Evaluate models
|
| 46 |
-
|
| 47 |
-
To evaluate a model, please specify the lmdb dataset and checkpoint, and run the following command:
|
| 48 |
-
```bash
|
| 49 |
-
python eval.py
|
| 50 |
-
```
|
| 51 |
-
|
| 52 |
-
EquiformerV2 MAE should be:
|
| 53 |
-
Transition1x:
|
| 54 |
-
Energy: 0.02 eV
|
| 55 |
-
Force: 0.02 eV/A
|
| 56 |
-
Hessian: 0.08 eV/A^2
|
| 57 |
-
Hessian eigenvalues: 0.003 eV/A^2
|
| 58 |
-
RGD1:
|
| 59 |
-
Energy: 0.13 eV
|
| 60 |
-
Force: 0.05 eV/A
|
| 61 |
-
Hessian: 0.09 eV/A^2
|
| 62 |
-
Hessian eigenvalues: 0.003 eV/A^2
|
| 63 |
-
|
| 64 |
-
## Dataset
|
| 65 |
-
|
| 66 |
-
The HORM dataset is available at: https://www.kaggle.com/datasets/yunhonghan/hessian-dataset-for-optimizing-reactive-mliphorm/data
|
| 67 |
-
|
| 68 |
-
Run the following command to download the dataset:
|
| 69 |
-
```bash
|
| 70 |
-
# default is ~/.cache
|
| 71 |
-
# export KAGGLEHUB_CACHE=/path/to/your/preferred/directory
|
| 72 |
-
python download_horm_data_kaggle.py
|
| 73 |
-
```
|
| 74 |
-
|
| 75 |
-
```bash
|
| 76 |
-
ls ~/.cache/kagglehub/datasets/yunhonghan/hessian-dataset-for-optimizing-reactive-mliphorm/versions/5
|
| 77 |
-
|
| 78 |
-
total 23G
|
| 79 |
-
1.1G RGD1.lmdb (60000 samples)
|
| 80 |
-
21G ts1x_hess_train_big.lmdb (1725362 samples)
|
| 81 |
-
620M ts1x-val.lmdb (50844 samples)
|
| 82 |
-
```
|
| 83 |
-
|
| 84 |
-
Keys in the dataset:
|
| 85 |
-
```python
|
| 86 |
-
['force_constant', 'charges', 'energy', 'freq', 'forces', 'one_hot', 'pos', 'natoms', 'eig_values', 'hessian']
|
| 87 |
-
```
|
| 88 |
-
```python
|
| 89 |
-
Shapes per key:
|
| 90 |
-
forces: torch.Size([22, 3])
|
| 91 |
-
freq: torch.Size([66])
|
| 92 |
-
force_constant: torch.Size([66])
|
| 93 |
-
charges: torch.Size([22])
|
| 94 |
-
one_hot: torch.Size([22, 5])
|
| 95 |
-
energy: torch.Size([])
|
| 96 |
-
pos: torch.Size([22, 3])
|
| 97 |
-
hessian: torch.Size([4356])
|
| 98 |
-
eig_values: torch.Size([66])
|
| 99 |
-
natoms: torch.Size([])
|
| 100 |
-
```
|
| 101 |
-
|
| 102 |
-
Note on the elements / atomic numbers:
|
| 103 |
-
the HORM dataset uses a weird convention:
|
| 104 |
-
atom types are encoded as one-hot vectors of shape (N, 5)
|
| 105 |
-
where the fifth is unused, likely a padding or None class.
|
| 106 |
-
corresponds to H, C, N, O, None
|
| 107 |
-
|
| 108 |
-
All models are trained on the HORM-Transition1x training set
|
| 109 |
-
and evaluated on both the in-distribution (ID) Transition1x validation set and the out-of-distribution
|
| 110 |
-
(OOD) HORM-RGD1 subset
|
| 111 |
-
|
| 112 |
-
## Model checkpoints
|
| 113 |
-
Pre-trained model checkpoints can be downloaded from: https://huggingface.co/yhong55/HORM
|
| 114 |
-
|
| 115 |
-
Checkpoints available:
|
| 116 |
-
|
| 117 |
-
Filename | Model | Training Method \
|
| 118 |
-
alpha_orig.ckpt | AlphaNet | Energy-Force Training \
|
| 119 |
-
alpha.ckpt | AlphaNet | Energy-Force-Hessian Training \
|
| 120 |
-
left_orig.ckpt | LEFTNet | Energy-Force Training \
|
| 121 |
-
left.ckpt | LEFTNet | Energy-Force-Hessian Training \
|
| 122 |
-
left-df_orig.ckpt | LEFTNet-df | Energy-Force Training \
|
| 123 |
-
left-df.ckpt | LEFTNet-df | Energy-Force-Hessian Training \
|
| 124 |
-
eqv2_orig.ckpt | EquiformerV2 | Energy-Force Training \
|
| 125 |
-
eqv2.ckpt | EquiformerV2 | Energy-Force-Hessian Training \
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
To download specific model checkpoints, use the following command:
|
| 129 |
-
```bash
|
| 130 |
-
# Download EquiformerV2 with Energy-Force-Hessian Training
|
| 131 |
-
mkdir -p ckpt
|
| 132 |
-
wget https://huggingface.co/yhong55/HORM/resolve/main/eqv2.ckpt -O ckpt/eqv2.ckpt
|
| 133 |
-
```
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
# Notes
|
| 137 |
-
|
| 138 |
-
### Dataset
|
| 139 |
-
- The models were trained on the HORM dataset.
|
| 140 |
-
- The geometries in the HORM dataset are sampled from Transition1x and RGD1.
|
| 141 |
-
- All sampled geometries were recomputed by GPU4PYSCF at the $\omega$B97X/6-31G* level of theory to obtain energies, forces, and Hessian
|
| 142 |
-
- T1x: 9,000 reactions to the training set and the remaining 1,073 reactions to the validation set. From these, 1,725,362 geometries corresponding to the training reactions and 50,844 geometries from the validation reactions were used to train the models.
|
| 143 |
-
- RGD1: From approximately 950,000 available reactions, we randomly selected 80,000 and sampled up to 15 geometries per reaction along their IRC trajectories. From this pool, 60,000 geometries were randomly chosen.
|
| 144 |
-
|
| 145 |
-
### Training
|
| 146 |
-
- The Hessian was computed from the forces via autograd.
|
| 147 |
-
- Randomly sample a subset of two columns from each Hessian matrix during training.
|
| 148 |
-
- Training was done on an unknown number of A30 (24 GB) and H20 (96 GB) GPUs
|
| 149 |
-
|
| 150 |
-
For EquiformerV2:
|
| 151 |
-
|
| 152 |
-
Layers HiddenDim Heads NHR LearningRate BatchSize \
|
| 153 |
-
4 128 4 2 3e-4 128
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
# License
|
| 157 |
-
This project is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0). For more details, please refer to the [CC BY-NC-SA 4.0 License](https://creativecommons.org/licenses/by-nc-sa/4.0/).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
docs/rgd1.md
DELETED
|
@@ -1,79 +0,0 @@
|
|
| 1 |
-
# RGD1
|
| 2 |
-
https://www.nature.com/articles/s41597-023-02043-z
|
| 3 |
-
|
| 4 |
-
## TL;DR
|
| 5 |
-
|
| 6 |
-
After filtering we get 140_673 triplets of (transition state, reactant, product), where each reactant-product pair appears only once.
|
| 7 |
-
|
| 8 |
-
- train split: 112538 reactions, 8249716 total atoms
|
| 9 |
-
- val split: 14067 reactions, 1031949 total atoms
|
| 10 |
-
- test split: 14068 reactions, 1031144 total atoms
|
| 11 |
-
|
| 12 |
-
## Train/val/test split
|
| 13 |
-
|
| 14 |
-
Use the same validation strategy as OA-ReactDiff and React-OT:
|
| 15 |
-
Train on all of RGD1, validate on part of Transition1x:
|
| 16 |
-
partitioned Transition1x randomly, with 9,000 reactions used in training and validation,
|
| 17 |
-
and the remaining 1,073 reactions as set-aside test set
|
| 18 |
-
|
| 19 |
-
It is not guaranteed that all molecules in test reactions are unseen by a trained model
|
| 20 |
-
due to the overlapping structures in different reactions.
|
| 21 |
-
However, each elementary reaction is unique, so atmost either the reactant or product,
|
| 22 |
-
but not both, is seen in the training set.
|
| 23 |
-
|
| 24 |
-
## RGD1 dataset info
|
| 25 |
-
We attempted ~760k reactions at the xtb level,
|
| 26 |
-
but after filtering unintended transition states
|
| 27 |
-
(i.e., those classified to not correspond to the reactant and product that were used in the double-ended search)
|
| 28 |
-
we were left with ~176k transition states.
|
| 29 |
-
Most of the RGD-1 data at the DFT level is on the filtered ~176k intended TSs.
|
| 30 |
-
React-OT pretrained on the full set of intended and unintended at the xtb level (~760k).
|
| 31 |
-
|
| 32 |
-
The dataset is composed of 176,992 organic reactions possessing:
|
| 33 |
-
at least one validated TS, activation energy, heat of reaction, reactant and product geometries, frequencies, and atom-mapping.
|
| 34 |
-
For 33,032 reactions, more than one TS was discovered by conformational sampling.
|
| 35 |
-
Note: here 'reaction' refers to a reaction-product pair, not a transition state.
|
| 36 |
-
I.e. the number of reactions is smaller than the number of transition states.
|
| 37 |
-
|
| 38 |
-
## RGD1 file structure
|
| 39 |
-
- RGD1_CHNO.h5 contains the geometry information of the transition states. 176_992 entries.
|
| 40 |
-
- RGD1CHNO_AMsmiles.csv contains atom-mapped SMILES, activation energies, and enthalpies of formation for each reaction. Only 176_898 entries?
|
| 41 |
-
- RandP_smiles.txt is a dictionary to map the reactant and product smiles appear in RGD1_CHNO.h5 to a molecule index (molX).
|
| 42 |
-
- RGD1_RPs.h5 provides xtb and DFT optimized geometries of each individual reactant/product molecules. 123_088 entries, because some reactants and products are identical. But 836 are missing?
|
| 43 |
-
- 3D ML models can be trained by combining RGD1_RPs.h5, RGD1_CHNO.h5, and RandP_smiles.txt
|
| 44 |
-
- DFT_reaction_info.csv is supplied to reproduce figures in the article. Ignore.
|
| 45 |
-
|
| 46 |
-
In the RGD1_CHNO.h5 file:
|
| 47 |
-
Property | Key | Units
|
| 48 |
-
-------------------------------------|---------|--------
|
| 49 |
-
Reactant smiles | Rsmiles | -
|
| 50 |
-
Product smiles | Psmiles | -
|
| 51 |
-
Reactant single point energy | R_E | Hartree
|
| 52 |
-
Reactant enthalpy | R_H | Hartree
|
| 53 |
-
Reactant Gibbs free energy | R_F | Hartree
|
| 54 |
-
Product single point energy | P_E | Hartree
|
| 55 |
-
Product enthalpy | P_H | Hartree
|
| 56 |
-
Product Gibbs free energy | P_F | Hartree
|
| 57 |
-
Transition state single point energy | TS_E | Hartree
|
| 58 |
-
Transition state enthalpy | TS_H | Hartree
|
| 59 |
-
Transition state Gibbs free energy | TS_F | Hartree
|
| 60 |
-
Reactant geometry | RG | Å
|
| 61 |
-
Product geometry | PG | Å
|
| 62 |
-
Transition state geometry | TSG | Å
|
| 63 |
-
|
| 64 |
-
In the .csv file:
|
| 65 |
-
Column | Description
|
| 66 |
-
---------|--------------------------------------------------
|
| 67 |
-
Rind | Reaction index
|
| 68 |
-
Rsmiles | Atom-mapped smiles of reactant(s)
|
| 69 |
-
Psmiles | Atom-mapped smiles of product(s)
|
| 70 |
-
DE_F | Activation energy of the forward reaction
|
| 71 |
-
DE_B | Activation energy of the backward reaction
|
| 72 |
-
DG_F | Free energy of activation of the forward reaction
|
| 73 |
-
DG_B | Free energy of activation of the backward reaction
|
| 74 |
-
DH | Enthalpy of reaction (forward reaction)
|
| 75 |
-
|
| 76 |
-
The Rind refers to the reaction index with a format of MR_XXX_X
|
| 77 |
-
|
| 78 |
-
The RGD1-xTB-760k dataset that React-OT used is here:
|
| 79 |
-
https://transfer.rcac.purdue.edu/file-manager?origin_id=1cc8429c-f64c-11ed-9bb7-c9bb788c490e&path=%2F
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
docs/training.md
DELETED
|
@@ -1,77 +0,0 @@
|
|
| 1 |
-
# Training HORM EquiformerV2 on Eigen dataset
|
| 2 |
-
|
| 3 |
-
Extra prediction heads for the Hessian eigenvalues and eigenvectors.
|
| 4 |
-
|
| 5 |
-
## Start job
|
| 6 |
-
|
| 7 |
-
Killarney
|
| 8 |
-
```bash
|
| 9 |
-
salloc -A aip-aspuru -t 60:00:00 -D /project/aip-aspuru/aburger/gad-ff --gres=gpu:l40s:1 --mem=128GB
|
| 10 |
-
source gadenv/bin/activate
|
| 11 |
-
source .env
|
| 12 |
-
```
|
| 13 |
-
|
| 14 |
-
## Training
|
| 15 |
-
|
| 16 |
-
Verify the training script and environment are working
|
| 17 |
-
```bash
|
| 18 |
-
python scripts/train_eigen.py experiment=debug
|
| 19 |
-
sbatch scripts/killarney.sh scripts/train_eigen.py experiment=debug
|
| 20 |
-
```
|
| 21 |
-
|
| 22 |
-
Verify that we can overfit to the tiny dataset (using one L40s)
|
| 23 |
-
```bash
|
| 24 |
-
sbatch scripts/killarney.sh scripts/train_eigen.py experiment=overfit100
|
| 25 |
-
sbatch scripts/killarney.sh scripts/train_eigen.py experiment=overfit100 training.loss_type_vec=cosine
|
| 26 |
-
```
|
| 27 |
-
|
| 28 |
-
Fit on the smaller training dataset (RGD1), test on TS1x
|
| 29 |
-
```bash
|
| 30 |
-
sbatch scripts/killarney_2xl40s.sh scripts/train_eigen.py experiment=rgd1 gpu=two
|
| 31 |
-
sbatch scripts/killarney_2xl40s.sh scripts/train_eigen.py experiment=rgd1 gpu=two training.lr_schedule_type=null
|
| 32 |
-
|
| 33 |
-
# smaller batch size instead
|
| 34 |
-
sbatch scripts/killarney.sh scripts/train_eigen.py experiment=rgd1 training.bz=64
|
| 35 |
-
sbatch scripts/killarney.sh scripts/train_eigen.py experiment=rgd1 training.bz=64 training.lr_schedule_type=null
|
| 36 |
-
|
| 37 |
-
# H100 instead
|
| 38 |
-
sbatch scripts/killarney_h100.sh scripts/train_eigen.py experiment=rgd1
|
| 39 |
-
```
|
| 40 |
-
|
| 41 |
-
Fit on the larger training dataset (TS1x), test on TS1x
|
| 42 |
-
```bash
|
| 43 |
-
sbatch scripts/killarney.sh scripts/train_eigen.py experiment=ts1x
|
| 44 |
-
sbatch scripts/killarney.sh scripts/train_eigen.py experiment=ts1x training.loss_type_vec=cosine
|
| 45 |
-
sbatch scripts/killarney.sh scripts/train_eigen.py experiment=ts1x training.loss_type_vec=cosine training.lr_schedule_type=null
|
| 46 |
-
```
|
| 47 |
-
|
| 48 |
-
Fit on both datasets (RGD1 and TS1x), test on TS1x
|
| 49 |
-
```bash
|
| 50 |
-
sbatch scripts/killarney_h100.sh scripts/train_eigen.py experiment=alldata
|
| 51 |
-
```
|
| 52 |
-
|
| 53 |
-
## Background
|
| 54 |
-
|
| 55 |
-
We have two training datasets and one validation dataset:
|
| 56 |
-
```bash
|
| 57 |
-
ls ~/.cache/kagglehub/datasets/yunhonghan/hessian-dataset-for-optimizing-reactive-mliphorm/versions/5
|
| 58 |
-
|
| 59 |
-
total 23G
|
| 60 |
-
1.1G RGD1.lmdb (60000 samples)
|
| 61 |
-
21G ts1x_hess_train_big.lmdb (1725362 samples)
|
| 62 |
-
620M ts1x-val.lmdb (50844 samples)
|
| 63 |
-
```
|
| 64 |
-
Plus a tiny subset for debugging
|
| 65 |
-
```bash
|
| 66 |
-
ls data
|
| 67 |
-
|
| 68 |
-
sample_100.lmdb
|
| 69 |
-
```
|
| 70 |
-
|
| 71 |
-
There are two kinds of nodes on our Killarney cluster:
|
| 72 |
-
|
| 73 |
-
Performance Tier | Nodes | Model | CPU | Cores | System Memory | GPUs per node | Total GPUs \
|
| 74 |
-
Standard Compute | 168 | Dell 750xa | 2 x Intel Xeon Gold 6338 | 64 | 512 GB | 4 x NVIDIA L40S 48GB | 672 \
|
| 75 |
-
Performance Compute | 10 | Dell XE9680 | 2 x Intel Xeon Gold 6442Y | 48 | 2048 GB | 8 x NVIDIA H100 SXM 80GB | 80
|
| 76 |
-
|
| 77 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|