andreasburger commited on
Commit
28df314
·
verified ·
1 Parent(s): 8f6bf0a

Update HIP

Browse files
Files changed (1) hide show
  1. README.md +15 -69
README.md CHANGED
@@ -1,83 +1,29 @@
1
- # Molecular Hessians Without Derivatives
2
 
3
- See https://github.com/BurgerAndreas/gad-ff
 
4
 
5
 
6
  ## Available checkpoints
7
 
8
- - `hesspred_v1`: Used for the paper. Trained to predict Hessians. Can be used for energies, forces, learned and autograd Hessians.
9
- - `hesspred_v2`: Potentially better Hessian prediction, less tested. Trained with MAE.
10
- - `hesspred_v3`: Potentially better Hessian prediction, less tested. Trained for longer.
11
- - `ckpt/eqv2.ckpt`: HORM EquiformerV2 finetuned on the HORM Hessian dataset. Not trained to predict Hessians! Can be used for energies, forces, and autograd Hessian.
12
-
13
 
14
  ## Use our model
15
 
16
- Use our model, that
17
- ```bash
18
- # download checkpoints from HuggingFace
19
- cd gadff/ckpt/
20
- wget https://huggingface.co/andreasburger/heigen/resolve/main/ckpt/hesspred_v1.ckpt?download=true -O hesspred_v1.ckpt
21
- ```
22
-
23
- ```python
24
- import os
25
- import torch
26
- from gadff.equiformer_torch_calculator import EquiformerTorchCalculator
27
- from gadff.equiformer_ase_calculator import EquiformerASECalculator # also try this
28
- from gadff.inference_utils import get_dataloader
29
- from gadff.frequency_analysis import analyze_frequencies_torch
30
-
31
-
32
- device = "cuda" if torch.cuda.is_available() else "cpu"
33
-
34
- # you might need to change this
35
- project_root = os.path.dirname(os.path.dirname(__file__))
36
- checkpoint_path = os.path.join(project_root, "ckpt/hesspred_v1.ckpt")
37
- calculator = EquiformerTorchCalculator(
38
- checkpoint_path=checkpoint_path,
39
- hessian_method="predict",
40
- )
41
-
42
- # Example 1: load a dataset file and predict the first batch
43
- dataset_path = os.path.join(project_root, "data/sample_100.lmdb")
44
- dataloader = get_dataloader(
45
- dataset_path, calculator.potential, batch_size=1, shuffle=False
46
- )
47
- batch = next(iter(dataloader))
48
- results = calculator.predict(batch)
49
- print("\nExample 1:")
50
- print(f" Energy: {results['energy'].shape}")
51
- print(f" Forces: {results['forces'].shape}")
52
- print(f" Hessian: {results['hessian'].shape}")
53
-
54
- print("\nGAD:")
55
- gad = calculator.get_gad(batch)
56
- print(f" GAD: {gad['gad'].shape}")
57
-
58
- # Example 2: create a random data object with random positions and predict
59
- n_atoms = 10
60
- elements = torch.tensor([1, 6, 7, 8]) # H, C, N, O
61
- pos = torch.randn(n_atoms, 3) # (N, 3)
62
- atomic_nums = elements[torch.randint(0, 4, (n_atoms,))] # (N,)
63
- results = calculator.predict(coords=pos, atomic_nums=atomic_nums)
64
- print("\nExample 2:")
65
- print(f" Energy: {results['energy'].shape}")
66
- print(f" Forces: {results['forces'].shape}")
67
- print(f" Hessian: {results['hessian'].shape}")
68
-
69
- print("\nFrequency analysis:")
70
- hessian = results["hessian"]
71
- frequency_analysis = analyze_frequencies_torch(hessian, pos, atomic_nums)
72
- print(f"eigvals: {frequency_analysis['eigvals'].shape}")
73
- print(f"eigvecs: {frequency_analysis['eigvecs'].shape}")
74
- print(f"neg_num: {frequency_analysis['neg_num']}")
75
- print(f"natoms: {frequency_analysis['natoms']}")
76
- ```
77
 
78
 
79
  ## Citation
80
 
81
  ```bibtex
82
- TODO
 
 
 
 
 
 
 
 
83
  ```
 
1
+ # HIP: Hessian Interatomic Potentials Without Derivatives
2
 
3
+ Code: https://github.com/BurgerAndreas/hip
4
+ Paper: https://arxiv.org/abs/2509.21624
5
 
6
 
7
  ## Available checkpoints
8
 
9
+ - `hip_v2`: Recommended. Trained end-to-end using `scripts/train.py lr=cos2`
10
+ - `hesspred_v1`: Used for the paper. Finetuned from HORM EquiformerV2 to predict Hessians
 
 
 
11
 
12
  ## Use our model
13
 
14
+ Please have a look at https://github.com/BurgerAndreas/hip
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
 
17
  ## Citation
18
 
19
  ```bibtex
20
+ @misc{burger2025hiphessian,
21
+ title={Shoot from the HIP: Hessian Interatomic Potentials without derivatives},
22
+ author={Andreas Burger and Luca Thiede and Nikolaj Rønne and Varinia Bernales and Nandita Vijaykumar and Tejs Vegge and Arghya Bhowmik and Alan Aspuru-Guzik},
23
+ year={2025},
24
+ eprint={2509.21624},
25
+ archivePrefix={arXiv},
26
+ primaryClass={cs.LG},
27
+ url={https://arxiv.org/abs/2509.21624},
28
+ }
29
  ```