Skip to content

Commit 51b8536

Browse files
authored
omol lbfgs evals (#1488)
* lbfgs optimizer * Update leaderboard.md * Update leaderboard.md
1 parent 0ef3f22 commit 51b8536

3 files changed

Lines changed: 35 additions & 13 deletions

File tree

docs/molecules/leaderboard.md

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,22 @@ The leaderboard is broken into two different sections - "S2EF" and "Evaluations"
77
Structure to Energy and Forces (S2EF) is the most straightforward evaluation for MLIPs - given a structure, how well can you predict the total energy and per-atom forces.
88
Evaluations correspond to several chemistry relevant tasks (spin gap, ligand-strain, etc.) introduced in OMol25 to evaluate MLIPs beyond simple energy and force metrics (see the [paper](https://arxiv.org/pdf/2505.08762) for more details).
99

10-
The simplest way to get started is to have an ASE-compatible MLIP calculator that can make energy and force predictions.
10+
The simplest way to get started is to have an ASE-compatible MLIP calculator that can make energy and force predictions. Input data for the different benchmarks can be downloaded below.
11+
12+
## 💾 Download
13+
14+
| Benchmarks | URL |
15+
|----------|----------|
16+
| S2EF (Val/Test) | https://huggingface.co/facebook/OMol25/blob/main/DATASET.md#dataset-splits |
17+
| Evaluations | https://huggingface.co/facebook/OMol25/blob/main/DATASET.md#evaluation-data |
1118

1219
## S2EF
13-
The leadebroard supports S2EF evaluations for both the OMol25 "Validation" and "Test" sets. The download links for these datasets can be found [🔗 here](https://huggingface.co/facebook/OMol25/blob/main/DATASET.md#dataset-splits).
14-
Validation and Test sets should contain 2,762,021 and 2,805,046 samples, respectively.
20+
The leadebroard supports S2EF evaluations for both the OMol25 "Validation" and "Test" sets. Validation labels are already accessible in the released dataset for local benchmarking and debugging, so we highly encourage users to make Test submissions to fairly and accurately compare models. The size of each split is as follows:
21+
22+
| Split | Size |
23+
|----------|----------|
24+
| Val | 2,762,021 |
25+
| Test | 2,805,046 |
1526

1627
Predictions must be saved as ".npz" files and shall contain the following information:
1728
```
@@ -51,6 +62,7 @@ for idx in range(len(dataset)):
5162
energy.append(atoms.get_potential_energy())
5263
forces.append(atoms.get_forces())
5364

65+
### Do not forget this! Your submission will fail.
5466
forces = np.concatenate(forces)
5567

5668
np.savez_compressed(
@@ -74,18 +86,21 @@ The following evaluations are currently available on the OMol25 leaderboard:
7486
* Conformers: Identifying the lowest energy conformer is a crucial part of many biological and pharmaceutical tasks.
7587
* Protonation: As a proxy to pKa prediction, we evaluate energy differences of structures differing by one proton.
7688
* Distance scaling: Short range and long range intermolecular interactions are essential for observable properties like phase changes, density, etc.
89+
* IE/EA: The addition, removal, and transfer of electrons is central to many redox processes.
90+
* Spin gap: Differences between spin states can play a critical role of molecular optic devices and photactive catalysts.
7791

7892
For a detailed descripion of each task we refer people to the original [manuscript](https://arxiv.org/pdf/2505.08762).
79-
The download links for evaluation inputs can be found [🔗 here](https://huggingface.co/facebook/OMol25/blob/main/DATASET.md#evaluation-data).
8093

8194
To generate prediction files for the different tasks, we have released a set of [recipes](https://github.com/facebookresearch/fairchem/blob/main/src/fairchem/core/components/calculate/recipes/omol.py) to be used with ASE-compatible calculators.
8295
Each evaluation task has its own unique structure, a detailed description of the expected output is provided in the recipe docstrings. The following recipes should be used to evaluate the corresponding task:
8396

84-
* [Ligand pocket](https://github.com/facebookresearch/fairchem/blob/main/src/fairchem/core/components/calculate/recipes/omol.py#L321)
85-
* [Ligand strain](https://github.com/facebookresearch/fairchem/blob/main/src/fairchem/core/components/calculate/recipes/omol.py#L370)
86-
* [Conformers](https://github.com/facebookresearch/fairchem/blob/main/src/fairchem/core/components/calculate/recipes/omol.py#L138)
87-
* [Protonation](https://github.com/facebookresearch/fairchem/blob/main/src/fairchem/core/components/calculate/recipes/omol.py#L186)
88-
* [Distance scaling](https://github.com/facebookresearch/fairchem/blob/main/src/fairchem/core/components/calculate/recipes/omol.py#L437)
97+
* [Ligand pocket](https://github.com/facebookresearch/fairchem/blob/main/src/fairchem/core/components/calculate/recipes/omol.py#L323)
98+
* [Ligand strain](https://github.com/facebookresearch/fairchem/blob/main/src/fairchem/core/components/calculate/recipes/omol.py#L372)
99+
* [Conformers](https://github.com/facebookresearch/fairchem/blob/main/src/fairchem/core/components/calculate/recipes/omol.py#L140)
100+
* [Protonation](https://github.com/facebookresearch/fairchem/blob/main/src/fairchem/core/components/calculate/recipes/omol.py#L188)
101+
* [Distance scaling](https://github.com/facebookresearch/fairchem/blob/main/src/fairchem/core/components/calculate/recipes/omol.py#L439)
102+
* [IE/EA](https://github.com/facebookresearch/fairchem/blob/main/src/fairchem/core/components/calculate/recipes/omol.py#L237)
103+
* [Spin gap](https://github.com/facebookresearch/fairchem/blob/main/src/fairchem/core/components/calculate/recipes/omol.py#L284)
89104

90105
As an example:
91106

src/fairchem/core/components/calculate/recipes/omol.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from ase import Atoms
3535
from ase.calculators.calculator import Calculator
3636

37-
from fairchem.data.omol.orca.calc import TIGHT_OPT_PARAMETERS
37+
from fairchem.data.omol.orca.calc import EVAL_OPT_PARAMETERS
3838
from pymatgen.io.ase import MSONAtoms
3939
from tqdm import tqdm
4040

@@ -178,7 +178,7 @@ def conformers(input_data: dict[str, Any], calculator: Calculator) -> dict[str,
178178
for conformer in conformers:
179179
sid = conformer["sid"]
180180
initial_atoms = conformer["initial_atoms"]
181-
results = relax_job(initial_atoms, calculator, TIGHT_OPT_PARAMETERS)
181+
results = relax_job(initial_atoms, calculator, EVAL_OPT_PARAMETERS)
182182
conformer_results[sid] = results
183183

184184
all_results[molecule_family] = conformer_results
@@ -226,7 +226,7 @@ def protonation(input_data: dict[str, Any], calculator: Calculator) -> dict[str,
226226
states = input_data[molecule_family]
227227
for state in states:
228228
initial_atoms = states[state]["initial_atoms"]
229-
results = relax_job(initial_atoms, calculator, TIGHT_OPT_PARAMETERS)
229+
results = relax_job(initial_atoms, calculator, EVAL_OPT_PARAMETERS)
230230

231231
state_results[state] = results
232232

@@ -427,7 +427,7 @@ def ligand_strain(input_data: dict[str, Any], calculator: Calculator) -> dict[st
427427
# Gas-phase conformers parts
428428
conformer_prediction = {}
429429
for idx, initial_atoms in enumerate(ligand_system["conformers"]):
430-
results = relax_job(initial_atoms, calculator, TIGHT_OPT_PARAMETERS)
430+
results = relax_job(initial_atoms, calculator, EVAL_OPT_PARAMETERS)
431431

432432
conformer_prediction[idx] = results
433433
complex_results["gas_phase"] = conformer_prediction

src/fairchem/data/omol/orca/calc.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
from ase import Atoms
1515
from ase.calculators.orca import ORCA, OrcaProfile
16+
from ase.optimize import LBFGS
1617
from sella import Sella
1718

1819
# ECP sizes taken from Table 6.5 in the Orca 5.0.3 manual
@@ -164,6 +165,12 @@
164165
"internal": True,
165166
},
166167
}
168+
EVAL_OPT_PARAMETERS = {
169+
"optimizer": LBFGS,
170+
"fmax": 0.01,
171+
"max_steps": 500,
172+
"optimizer_kwargs": {},
173+
}
167174

168175

169176
class Vertical(Enum):

0 commit comments

Comments
 (0)