patonlab commited on
Commit
e579e7e
·
verified ·
1 Parent(s): 4d03010

initial release: TRIP50 v1.0.0 dataset, scripts, examples

Browse files
CITATION.cff ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cff-version: 1.2.0
2
+ message: "If you use the TRIP50 benchmark, please cite the original publication."
3
+ type: dataset
4
+ title: "TRIP50: a benchmark of triplet-state organic reactions"
5
+ authors:
6
+ - family-names: "Hughes"
7
+ given-names: "William B."
8
+ - family-names: "Popescu"
9
+ given-names: "Mihai V."
10
+ - family-names: "Paton"
11
+ given-names: "Robert S."
12
+ doi: "10.1021/acs.jctc.6c00144"
13
+ year: 2026
14
+ url: "https://huggingface.co/datasets/patonlab/trip50"
15
+ license: CC-BY-4.0
16
+ preferred-citation:
17
+ type: article
18
+ title: "Fundamental Study of Density Functional Theory Applied to Triplet State Reactivity: Introduction of the TRIP50 Data Set"
19
+ authors:
20
+ - family-names: "Hughes"
21
+ given-names: "William B."
22
+ - family-names: "Popescu"
23
+ given-names: "Mihai V."
24
+ - family-names: "Paton"
25
+ given-names: "Robert S."
26
+ journal: "Journal of Chemical Theory and Computation"
27
+ volume: 22
28
+ start: 3530
29
+ end: 3542
30
+ doi: "10.1021/acs.jctc.6c00144"
31
+ year: 2026
LICENSE ADDED
@@ -0,0 +1,396 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Attribution 4.0 International
2
+
3
+ =======================================================================
4
+
5
+ Creative Commons Corporation ("Creative Commons") is not a law firm and
6
+ does not provide legal services or legal advice. Distribution of
7
+ Creative Commons public licenses does not create a lawyer-client or
8
+ other relationship. Creative Commons makes its licenses and related
9
+ information available on an "as-is" basis. Creative Commons gives no
10
+ warranties regarding its licenses, any material licensed under their
11
+ terms and conditions, or any related information. Creative Commons
12
+ disclaims all liability for damages resulting from their use to the
13
+ fullest extent possible.
14
+
15
+ Using Creative Commons Public Licenses
16
+
17
+ Creative Commons public licenses provide a standard set of terms and
18
+ conditions that creators and other rights holders may use to share
19
+ original works of authorship and other material subject to copyright
20
+ and certain other rights specified in the public license below. The
21
+ following considerations are for informational purposes only, are not
22
+ exhaustive, and do not form part of our licenses.
23
+
24
+ Considerations for licensors: Our public licenses are
25
+ intended for use by those authorized to give the public
26
+ permission to use material in ways otherwise restricted by
27
+ copyright and certain other rights. Our licenses are
28
+ irrevocable. Licensors should read and understand the terms
29
+ and conditions of the license they choose before applying it.
30
+ Licensors should also secure all rights necessary before
31
+ applying our licenses so that the public can reuse the
32
+ material as expected. Licensors should clearly mark any
33
+ material not subject to the license. This includes other CC-
34
+ licensed material, or material used under an exception or
35
+ limitation to copyright. More considerations for licensors:
36
+ wiki.creativecommons.org/Considerations_for_licensors
37
+
38
+ Considerations for the public: By using one of our public
39
+ licenses, a licensor grants the public permission to use the
40
+ licensed material under specified terms and conditions. If
41
+ the licensor's permission is not necessary for any reason--for
42
+ example, because of any applicable exception or limitation to
43
+ copyright--then that use is not regulated by the license. Our
44
+ licenses grant only permissions under copyright and certain
45
+ other rights that a licensor has authority to grant. Use of
46
+ the licensed material may still be restricted for other
47
+ reasons, including because others have copyright or other
48
+ rights in the material. A licensor may make special requests,
49
+ such as asking that all changes be marked or described.
50
+ Although not required by our licenses, you are encouraged to
51
+ respect those requests where reasonable. More considerations
52
+ for the public:
53
+ wiki.creativecommons.org/Considerations_for_licensees
54
+
55
+ =======================================================================
56
+
57
+ Creative Commons Attribution 4.0 International Public License
58
+
59
+ By exercising the Licensed Rights (defined below), You accept and agree
60
+ to be bound by the terms and conditions of this Creative Commons
61
+ Attribution 4.0 International Public License ("Public License"). To the
62
+ extent this Public License may be interpreted as a contract, You are
63
+ granted the Licensed Rights in consideration of Your acceptance of
64
+ these terms and conditions, and the Licensor grants You such rights in
65
+ consideration of benefits the Licensor receives from making the
66
+ Licensed Material available under these terms and conditions.
67
+
68
+
69
+ Section 1 -- Definitions.
70
+
71
+ a. Adapted Material means material subject to Copyright and Similar
72
+ Rights that is derived from or based upon the Licensed Material
73
+ and in which the Licensed Material is translated, altered,
74
+ arranged, transformed, or otherwise modified in a manner requiring
75
+ permission under the Copyright and Similar Rights held by the
76
+ Licensor. For purposes of this Public License, where the Licensed
77
+ Material is a musical work, performance, or sound recording,
78
+ Adapted Material is always produced where the Licensed Material is
79
+ synched in timed relation with a moving image.
80
+
81
+ b. Adapter's License means the license You apply to Your Copyright
82
+ and Similar Rights in Your contributions to Adapted Material in
83
+ accordance with the terms and conditions of this Public License.
84
+
85
+ c. Copyright and Similar Rights means copyright and/or similar rights
86
+ closely related to copyright including, without limitation,
87
+ performance, broadcast, sound recording, and Sui Generis Database
88
+ Rights, without regard to how the rights are labeled or
89
+ categorized. For purposes of this Public License, the rights
90
+ specified in Section 2(b)(1)-(2) are not Copyright and Similar
91
+ Rights.
92
+
93
+ d. Effective Technological Measures means those measures that, in the
94
+ absence of proper authority, may not be circumvented under laws
95
+ fulfilling obligations under Article 11 of the WIPO Copyright
96
+ Treaty adopted on December 20, 1996, and/or similar international
97
+ agreements.
98
+
99
+ e. Exceptions and Limitations means fair use, fair dealing, and/or
100
+ any other exception or limitation to Copyright and Similar Rights
101
+ that applies to Your use of the Licensed Material.
102
+
103
+ f. Licensed Material means the artistic or literary work, database,
104
+ or other material to which the Licensor applied this Public
105
+ License.
106
+
107
+ g. Licensed Rights means the rights granted to You subject to the
108
+ terms and conditions of this Public License, which are limited to
109
+ all Copyright and Similar Rights that apply to Your use of the
110
+ Licensed Material and that the Licensor has authority to license.
111
+
112
+ h. Licensor means the individual(s) or entity(ies) granting rights
113
+ under this Public License.
114
+
115
+ i. Share means to provide material to the public by any means or
116
+ process that requires permission under the Licensed Rights, such
117
+ as reproduction, public display, public performance, distribution,
118
+ dissemination, communication, or importation, and to make material
119
+ available to the public including in ways that members of the
120
+ public may access the material from a place and at a time
121
+ individually chosen by them.
122
+
123
+ j. Sui Generis Database Rights means rights other than copyright
124
+ resulting from Directive 96/9/EC of the European Parliament and of
125
+ the Council of 11 March 1996 on the legal protection of databases,
126
+ as amended and/or succeeded, as well as other essentially
127
+ equivalent rights anywhere in the world.
128
+
129
+ k. You means the individual or entity exercising the Licensed Rights
130
+ under this Public License. Your has a corresponding meaning.
131
+
132
+
133
+ Section 2 -- Scope.
134
+
135
+ a. License grant.
136
+
137
+ 1. Subject to the terms and conditions of this Public License,
138
+ the Licensor hereby grants You a worldwide, royalty-free,
139
+ non-sublicensable, non-exclusive, irrevocable license to
140
+ exercise the Licensed Rights in the Licensed Material to:
141
+
142
+ a. reproduce and Share the Licensed Material, in whole or
143
+ in part; and
144
+
145
+ b. produce, reproduce, and Share Adapted Material.
146
+
147
+ 2. Exceptions and Limitations. For the avoidance of doubt, where
148
+ Exceptions and Limitations apply to Your use, this Public
149
+ License does not apply, and You do not need to comply with
150
+ its terms and conditions.
151
+
152
+ 3. Term. The term of this Public License is specified in Section
153
+ 6(a).
154
+
155
+ 4. Media and formats; technical modifications allowed. The
156
+ Licensor authorizes You to exercise the Licensed Rights in
157
+ all media and formats whether now known or hereafter created,
158
+ and to make technical modifications necessary to do so. The
159
+ Licensor waives and/or agrees not to assert any right or
160
+ authority to forbid You from making technical modifications
161
+ necessary to exercise the Licensed Rights, including
162
+ technical modifications necessary to circumvent Effective
163
+ Technological Measures. For purposes of this Public License,
164
+ simply making modifications authorized by this Section 2(a)
165
+ (4) never produces Adapted Material.
166
+
167
+ 5. Downstream recipients.
168
+
169
+ a. Offer from the Licensor -- Licensed Material. Every
170
+ recipient of the Licensed Material automatically
171
+ receives an offer from the Licensor to exercise the
172
+ Licensed Rights under the terms and conditions of this
173
+ Public License.
174
+
175
+ b. No downstream restrictions. You may not offer or impose
176
+ any additional or different terms or conditions on, or
177
+ apply any Effective Technological Measures to, the
178
+ Licensed Material if doing so restricts exercise of the
179
+ Licensed Rights by any recipient of the Licensed
180
+ Material.
181
+
182
+ 6. No endorsement. Nothing in this Public License constitutes or
183
+ may be construed as permission to assert or imply that You
184
+ are, or that Your use of the Licensed Material is, connected
185
+ with, or sponsored, endorsed, or granted official status by,
186
+ the Licensor or others designated to receive attribution as
187
+ provided in Section 3(a)(1)(A)(i).
188
+
189
+ b. Other rights.
190
+
191
+ 1. Moral rights, such as the right of integrity, are not
192
+ licensed under this Public License, nor are publicity,
193
+ privacy, and/or other similar personality rights; however, to
194
+ the extent possible, the Licensor waives and/or agrees not to
195
+ assert any such rights held by the Licensor to the limited
196
+ extent necessary to allow You to exercise the Licensed
197
+ Rights, but not otherwise.
198
+
199
+ 2. Patent and trademark rights are not licensed under this
200
+ Public License.
201
+
202
+ 3. To the extent possible, the Licensor waives any right to
203
+ collect royalties from You for the exercise of the Licensed
204
+ Rights, whether directly or through a collecting society
205
+ under any voluntary or waivable statutory or compulsory
206
+ licensing scheme. In all other cases the Licensor expressly
207
+ reserves any right to collect such royalties.
208
+
209
+
210
+ Section 3 -- License Conditions.
211
+
212
+ Your exercise of the Licensed Rights is expressly made subject to the
213
+ following conditions.
214
+
215
+ a. Attribution.
216
+
217
+ 1. If You Share the Licensed Material (including in modified
218
+ form), You must:
219
+
220
+ a. retain the following if it is supplied by the Licensor
221
+ with the Licensed Material:
222
+
223
+ i. identification of the creator(s) of the Licensed
224
+ Material and any others designated to receive
225
+ attribution, in any reasonable manner requested by
226
+ the Licensor (including by pseudonym if
227
+ designated);
228
+
229
+ ii. a copyright notice;
230
+
231
+ iii. a notice that refers to this Public License;
232
+
233
+ iv. a notice that refers to the disclaimer of
234
+ warranties;
235
+
236
+ v. a URI or hyperlink to the Licensed Material to the
237
+ extent reasonably practicable;
238
+
239
+ b. indicate if You modified the Licensed Material and
240
+ retain an indication of any previous modifications; and
241
+
242
+ c. indicate the Licensed Material is licensed under this
243
+ Public License, and include the text of, or the URI or
244
+ hyperlink to, this Public License.
245
+
246
+ 2. You may satisfy the conditions in Section 3(a)(1) in any
247
+ reasonable manner based on the medium, means, and context in
248
+ which You Share the Licensed Material. For example, it may be
249
+ reasonable to satisfy the conditions by providing a URI or
250
+ hyperlink to a resource that includes the required
251
+ information.
252
+
253
+ 3. If requested by the Licensor, You must remove any of the
254
+ information required by Section 3(a)(1)(A) to the extent
255
+ reasonably practicable.
256
+
257
+ 4. If You Share Adapted Material You produce, the Adapter's
258
+ License You apply must not prevent recipients of the Adapted
259
+ Material from complying with this Public License.
260
+
261
+
262
+ Section 4 -- Sui Generis Database Rights.
263
+
264
+ Where the Licensed Rights include Sui Generis Database Rights that
265
+ apply to Your use of the Licensed Material:
266
+
267
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right
268
+ to extract, reuse, reproduce, and Share all or a substantial
269
+ portion of the contents of the database;
270
+
271
+ b. if You include all or a substantial portion of the database
272
+ contents in a database in which You have Sui Generis Database
273
+ Rights, then the database in which You have Sui Generis Database
274
+ Rights (but not its individual contents) is Adapted Material; and
275
+
276
+ c. You must comply with the conditions in Section 3(a) if You Share
277
+ all or a substantial portion of the contents of the database.
278
+
279
+ For the avoidance of doubt, this Section 4 supplements and does not
280
+ replace Your obligations under this Public License where the Licensed
281
+ Rights include other Copyright and Similar Rights.
282
+
283
+
284
+ Section 5 -- Disclaimer of Warranties and Limitation of Liability.
285
+
286
+ a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
287
+ EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
288
+ AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
289
+ ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
290
+ IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
291
+ WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
292
+ PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
293
+ ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
294
+ KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
295
+ ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
296
+
297
+ b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
298
+ TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
299
+ NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
300
+ INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
301
+ COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
302
+ USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
303
+ ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
304
+ DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
305
+ IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
306
+
307
+ c. The disclaimer of warranties and limitation of liability provided
308
+ above shall be interpreted in a manner that, to the extent
309
+ possible, most closely approximates an absolute disclaimer and
310
+ waiver of all liability.
311
+
312
+
313
+ Section 6 -- Term and Termination.
314
+
315
+ a. This Public License applies for the term of the Copyright and
316
+ Similar Rights licensed here. However, if You fail to comply with
317
+ this Public License, then Your rights under this Public License
318
+ terminate automatically.
319
+
320
+ b. Where Your right to use the Licensed Material has terminated under
321
+ Section 6(a), it reinstates:
322
+
323
+ 1. automatically as of the date the violation is cured, provided
324
+ it is cured within 30 days of Your discovery of the
325
+ violation; or
326
+
327
+ 2. upon express reinstatement by the Licensor.
328
+
329
+ For the avoidance of doubt, this Section 6(b) does not affect any
330
+ right the Licensor may have to seek remedies for Your violations
331
+ of this Public License.
332
+
333
+ c. For the avoidance of doubt, the Licensor may also offer the
334
+ Licensed Material under separate terms or conditions or stop
335
+ distributing the Licensed Material at any time; however, doing so
336
+ will not terminate this Public License.
337
+
338
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
339
+ License.
340
+
341
+
342
+ Section 7 -- Other Terms and Conditions.
343
+
344
+ a. The Licensor shall not be bound by any additional or different
345
+ terms or conditions communicated by You unless expressly agreed.
346
+
347
+ b. Any arrangements, understandings, or agreements regarding the
348
+ Licensed Material not stated herein are separate from and
349
+ independent of the terms and conditions of this Public License.
350
+
351
+
352
+ Section 8 -- Interpretation.
353
+
354
+ a. For the avoidance of doubt, this Public License does not, and
355
+ shall not be interpreted to, reduce, limit, restrict, or impose
356
+ conditions on any use of the Licensed Material that could lawfully
357
+ be made without permission under this Public License.
358
+
359
+ b. To the extent possible, if any provision of this Public License is
360
+ deemed unenforceable, it shall be automatically reformed to the
361
+ minimum extent necessary to make it enforceable. If the provision
362
+ cannot be reformed, it shall be severed from this Public License
363
+ without affecting the enforceability of the remaining terms and
364
+ conditions.
365
+
366
+ c. No term or condition of this Public License will be waived and no
367
+ failure to comply consented to unless expressly agreed to by the
368
+ Licensor.
369
+
370
+ d. Nothing in this Public License constitutes or may be interpreted
371
+ as a limitation upon, or waiver of, any privileges and immunities
372
+ that apply to the Licensor or You, including from the legal
373
+ processes of any jurisdiction or authority.
374
+
375
+
376
+ =======================================================================
377
+
378
+ Creative Commons is not a party to its public
379
+ licenses. Notwithstanding, Creative Commons may elect to apply one of
380
+ its public licenses to material it publishes and in those instances
381
+ will be considered the “Licensor.” The text of the Creative Commons
382
+ public licenses is dedicated to the public domain under the CC0 Public
383
+ Domain Dedication. Except for the limited purpose of indicating that
384
+ material is shared under a Creative Commons public license or as
385
+ otherwise permitted by the Creative Commons policies published at
386
+ creativecommons.org/policies, Creative Commons does not authorize the
387
+ use of the trademark "Creative Commons" or any other trademark or logo
388
+ of Creative Commons without its prior written consent including,
389
+ without limitation, in connection with any unauthorized modifications
390
+ to any of its public licenses or any other arrangements,
391
+ understandings, or agreements concerning use of licensed material. For
392
+ the avoidance of doubt, this paragraph does not form part of the
393
+ public licenses.
394
+
395
+ Creative Commons may be contacted at creativecommons.org.
396
+
README.md ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ pretty_name: TRIP50 Reaction-Energy Benchmark
4
+ size_categories:
5
+ - n<1K
6
+ task_categories:
7
+ - tabular-regression
8
+ tags:
9
+ - chemistry
10
+ - mlip
11
+ - benchmark
12
+ - dft
13
+ - coupled-cluster
14
+ - reaction-energy
15
+ - transition-state
16
+ - radical
17
+ - triplet
18
+ - ase
19
+ language:
20
+ - en
21
+ configs:
22
+ - config_name: species
23
+ data_files: data/species.parquet
24
+ - config_name: reactions
25
+ data_files: data/reactions.parquet
26
+ - config_name: aliases
27
+ data_files: data/aliases.parquet
28
+ ---
29
+
30
+ # TRIP50
31
+
32
+ TRIP50 is a 50-reaction benchmark for radical and triplet thermochemistry and forward/reverse barriers, with a DLPNO-CCSD(T) reference and 46 DFT method totals computed on the same geometries. The benchmark is small, well-curated, and chemically diverse — designed to evaluate methods on **relative** energetics: reaction energies (ΔE_rxn), forward barriers (ΔE‡_fwd), and reverse barriers (ΔE‡_rev).
33
+
34
+ This release packages the structures and reference energies as a single Hugging Face dataset for use evaluating **machine-learning interatomic potentials (MLIPs)** alongside conventional DFT.
35
+
36
+ > **No forces.** TRIP50 is a single-point energy benchmark on relaxed stationary points. MLIPs that require force training data should look elsewhere; MLIPs being evaluated on relative energetics work directly.
37
+
38
+ ## Contents
39
+
40
+ | File | Rows | Notes |
41
+ |---|---|---|
42
+ | `data/trip50.extxyz` | 156 frames | ASE-readable, all 47 method energies on the comment line |
43
+ | `data/species.parquet` | 156 | one row per canonical structure, full float64 precision |
44
+ | `data/reactions.parquet` | 50 | reaction definitions with reference Δs in **kcal/mol** |
45
+ | `data/aliases.parquet` / `aliases.csv` | 30 | logical alias map (no duplicate xyz files shipped) |
46
+ | `data/methods.json` | – | slug ↔ display-name mapping for the 47 method columns |
47
+ | `data/MANIFEST.sha256` | – | digest of every payload file |
48
+
49
+ ## Schemas
50
+
51
+ ### `species.parquet`
52
+
53
+ | column | type | notes |
54
+ |---|---|---|
55
+ | `species_id` | string | canonical name, e.g. `1-R1`, `26-TS` |
56
+ | `rxn_id` | int32 | 1..50 |
57
+ | `role` | string | `R1` / `R2` / `TS` / `P1` / `P2` |
58
+ | `n_atoms` | int32 | |
59
+ | `atomic_numbers` | list&lt;int8&gt; | length `n_atoms` |
60
+ | `positions` | list&lt;list&lt;float64, 3&gt;&gt; | Cartesian, **Å** |
61
+ | `charge` | int8 | always `0` |
62
+ | `multiplicity` | string | `singlet` / `doublet` / `triplet` |
63
+ | `spin_multiplicity` | int8 | `1` / `2` / `3` |
64
+ | `energy_dlpno_ccsd_t` | float64 | reference, **Hartree** |
65
+ | `energy_<slug>` × 46 | float64 | DFT methods, Hartree (slugs in `methods.json`) |
66
+
67
+ ### `reactions.parquet`
68
+
69
+ | column | type | notes |
70
+ |---|---|---|
71
+ | `rxn_id` | int32 | 1..50 |
72
+ | `category` | string | one of `C-C`, `C-O`, `C-S`, `HAT`, `Si-X`, `C-Hal`, `N-X` (Figure 2 of the source paper) |
73
+ | `r1_species_id`, `r2_species_id`, `ts_species_id`, `p1_species_id`, `p2_species_id` | string (nullable) | post-alias canonical IDs; `null` = unimolecular leg (contributes 0 H) |
74
+ | `is_unimolecular_reactant`, `is_unimolecular_product` | bool | |
75
+ | `dE_rxn_kcal_dlpno` | float64 | E(P1)+E(P2) − E(R1)−E(R2), **kcal/mol** |
76
+ | `dE_fwd_kcal_dlpno` | float64 | E(TS) − E(R1)−E(R2), kcal/mol |
77
+ | `dE_rev_kcal_dlpno` | float64 | E(TS) − E(P1)−E(P2), kcal/mol |
78
+
79
+ ### `aliases.parquet`
80
+
81
+ | column | type | notes |
82
+ |---|---|---|
83
+ | `alias` | string | non-canonical species id seen in the rxn definitions |
84
+ | `canonical` | string | the species_id actually present in `species.parquet` |
85
+
86
+ Aliases are **logical only** — the dataset ships one xyz per canonical structure. A consumer evaluating reaction `50` should look up `p1_species_id = "48-R1"` (which is the same molecule as `50-P1`).
87
+
88
+ ## Conventions
89
+
90
+ - **Units**. Total energies in `species.parquet` and `trip50.extxyz` are in **Hartree**. Reference reaction-level Δ values in `reactions.parquet` are in **kcal/mol** (1 Hartree = 627.5094740631 kcal/mol).
91
+ - **Charge & spin**. Every species is neutral. Multiplicities span singlet / doublet / triplet. Spin-unaware MLIPs will incur unavoidable error on the radical and triplet species — a known limitation of the dataset for such models.
92
+ - **Unimolecular legs**. Reactions with a single reactant or product have the corresponding `R2` / `P2` field set to `null` in `reactions.parquet`, and the missing partner contributes 0 H to ΔE sums. This convention is inherited from the source paper.
93
+ - **Alias resolution**. Always go through `reactions.parquet` (which already stores post-alias canonical IDs). Never assume `{rxn}-{role}.xyz` exists for every (rxn, role).
94
+ - **Precision**. The Parquet artefacts are full float64. The `trip50.extxyz` representation rounds positions to ASE's default 8-decimal format (≈ 5 × 10⁻⁹ Å — far below physical precision). Use `species.parquet` if exact byte-identity matters.
95
+
96
+ ## Usage
97
+
98
+ ### Hugging Face `datasets`
99
+
100
+ ```python
101
+ from datasets import load_dataset
102
+
103
+ species = load_dataset("patonlab/trip50", "species", split="train")
104
+ reactions = load_dataset("patonlab/trip50", "reactions", split="train")
105
+
106
+ print(species[0]["species_id"], species[0]["energy_dlpno_ccsd_t"], "Hartree")
107
+ print(reactions[0]["dE_fwd_kcal_dlpno"], "kcal/mol")
108
+ ```
109
+
110
+ ### ASE
111
+
112
+ ```python
113
+ from ase.io import read
114
+
115
+ frames = read("hf://datasets/patonlab/trip50/data/trip50.extxyz", index=":")
116
+ e_dlpno = frames[0].info["energy_dlpno_ccsd_t"] # Hartree
117
+ mult = frames[0].info["multiplicity"] # 'singlet' | 'doublet' | 'triplet'
118
+ ```
119
+
120
+ A reference MLIP evaluator that prints a per-method MAE table is in [`examples/evaluate_mlip.py`](examples/evaluate_mlip.py).
121
+
122
+ ## Limitations
123
+
124
+ - **No forces or gradients.** Relative reaction energetics only.
125
+ - **Single geometries.** No conformer ensembles; no thermochemical corrections (ΔH / ΔG); no solvent corrections.
126
+ - **Reference is DLPNO-CCSD(T)**, not experiment. Methods that systematically agree with the reference may still disagree with experiment.
127
+ - **Spin-aware models recommended.** Roughly half the species are open-shell.
128
+
129
+ ## Citation
130
+
131
+ Please cite the original TRIP50 publication when using this dataset. See `CITATION.cff` for a machine-readable record.
132
+
133
+ ```bibtex
134
+ @article{trip50,
135
+ title = {Fundamental Study of Density Functional Theory Applied to Triplet State
136
+ Reactivity: Introduction of the {TRIP50} Data Set},
137
+ author = {Hughes, William B. and Popescu, Mihai V. and Paton, Robert S.},
138
+ journal = {Journal of Chemical Theory and Computation},
139
+ volume = {22},
140
+ pages = {3530--3542},
141
+ year = {2026},
142
+ doi = {10.1021/acs.jctc.6c00144}
143
+ }
144
+ ```
145
+
146
+ ## License
147
+
148
+ [Creative Commons Attribution 4.0 International (CC-BY-4.0)](LICENSE).
data/MANIFEST.sha256 ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ ca6180cfdfafb26998694109e3d7bb9f712942f82ec5705962dd452e77386982 aliases.csv
2
+ 0495a12e261c75e32b912d1a52df5bc851262ea3f9e3ddd1d1ab9097f4bb96ee aliases.parquet
3
+ 88a0fe83e5a6b0367a36c852004d24ac0db7e1aef938956c9d95e19e7453282d methods.json
4
+ bf5c6e285994b669ef757c542189a6736d06008ffa5494051bd85ff5d264be2d reactions.parquet
5
+ 76c07dc80c72983c0304b290d8efd8465c69a3e50ba1fbad33625357e37b98de species.parquet
6
+ f90e616177ad8de1f712f49b4ec62afa203db5f9ccc9e49fcb73d18b68a6ab4b trip50.extxyz
data/aliases.csv ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ alias,canonical
2
+ 13-R1,10-R1
3
+ 16-R2,15-R2
4
+ 17-R2,15-R1
5
+ 18-R1,8-R1
6
+ 19-R2,18-R2
7
+ 2-R1,1-P1
8
+ 25-P2,10-P2
9
+ 26-P1,25-P1
10
+ 26-R1,25-R1
11
+ 28-P1,27-P1
12
+ 28-P2,10-P2
13
+ 28-R1,25-R2
14
+ 28-R2,27-R1
15
+ 29-P1,27-P1
16
+ 29-R2,27-R1
17
+ 30-P1,27-P1
18
+ 30-R2,27-R1
19
+ 39-P2,38-P2
20
+ 4-R1,3-R1
21
+ 40-P1,38-P1
22
+ 41-P1,38-P1
23
+ 42-R2,15-R2
24
+ 44-R1,43-P1
25
+ 46-P1,44-P1
26
+ 46-R1,45-P1
27
+ 47-P1,44-P1
28
+ 48-P1,44-P1
29
+ 49-P1,44-P1
30
+ 50-P1,48-R1
31
+ 6-R1,5-R1
32
+ 6-R2,5-R2
data/aliases.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0495a12e261c75e32b912d1a52df5bc851262ea3f9e3ddd1d1ab9097f4bb96ee
3
+ size 2021
data/methods.json ADDED
@@ -0,0 +1,286 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "energy_columns": [
3
+ {
4
+ "slug": "energy_dlpno_ccsd_t",
5
+ "display_name": "DLPNO-CCSD(T)",
6
+ "is_reference": true,
7
+ "units": "hartree"
8
+ },
9
+ {
10
+ "slug": "energy_b2gp_plyp_d4",
11
+ "display_name": "B2GP-PLYP-D4",
12
+ "is_reference": false,
13
+ "units": "hartree"
14
+ },
15
+ {
16
+ "slug": "energy_b2plyp_d4",
17
+ "display_name": "B2PLYP-D4",
18
+ "is_reference": false,
19
+ "units": "hartree"
20
+ },
21
+ {
22
+ "slug": "energy_b3lyp_d4",
23
+ "display_name": "B3LYP-D4",
24
+ "is_reference": false,
25
+ "units": "hartree"
26
+ },
27
+ {
28
+ "slug": "energy_b3pw91_d4",
29
+ "display_name": "B3PW91-D4",
30
+ "is_reference": false,
31
+ "units": "hartree"
32
+ },
33
+ {
34
+ "slug": "energy_b97_d3_op",
35
+ "display_name": "B97-D3(op)",
36
+ "is_reference": false,
37
+ "units": "hartree"
38
+ },
39
+ {
40
+ "slug": "energy_b97m_v",
41
+ "display_name": "B97M-V",
42
+ "is_reference": false,
43
+ "units": "hartree"
44
+ },
45
+ {
46
+ "slug": "energy_blyp_d4",
47
+ "display_name": "BLYP-D4",
48
+ "is_reference": false,
49
+ "units": "hartree"
50
+ },
51
+ {
52
+ "slug": "energy_cam_b3lyp_d4",
53
+ "display_name": "CAM-B3LYP-D4",
54
+ "is_reference": false,
55
+ "units": "hartree"
56
+ },
57
+ {
58
+ "slug": "energy_hf_d4",
59
+ "display_name": "HF-D4",
60
+ "is_reference": false,
61
+ "units": "hartree"
62
+ },
63
+ {
64
+ "slug": "energy_kappapr2scan50_d4",
65
+ "display_name": "\u03baPr2SCAN50-D4",
66
+ "is_reference": false,
67
+ "units": "hartree"
68
+ },
69
+ {
70
+ "slug": "energy_lc_omegapbe08_d3_bj",
71
+ "display_name": "LC-\u03c9PBE08-D3(BJ)",
72
+ "is_reference": false,
73
+ "units": "hartree"
74
+ },
75
+ {
76
+ "slug": "energy_lrc_omegapbe_d3_bj",
77
+ "display_name": "LRC-\u03c9PBE-D3(BJ)",
78
+ "is_reference": false,
79
+ "units": "hartree"
80
+ },
81
+ {
82
+ "slug": "energy_lrc_omegapbeh_d3",
83
+ "display_name": "LRC-\u03c9PBEh-D3",
84
+ "is_reference": false,
85
+ "units": "hartree"
86
+ },
87
+ {
88
+ "slug": "energy_m05_2x_d3",
89
+ "display_name": "M05-2X-D3",
90
+ "is_reference": false,
91
+ "units": "hartree"
92
+ },
93
+ {
94
+ "slug": "energy_m06_d4",
95
+ "display_name": "M06-D4",
96
+ "is_reference": false,
97
+ "units": "hartree"
98
+ },
99
+ {
100
+ "slug": "energy_m06_2x_d3",
101
+ "display_name": "M06-2X-D3",
102
+ "is_reference": false,
103
+ "units": "hartree"
104
+ },
105
+ {
106
+ "slug": "energy_m06_hf_d3",
107
+ "display_name": "M06-HF-D3",
108
+ "is_reference": false,
109
+ "units": "hartree"
110
+ },
111
+ {
112
+ "slug": "energy_m06_l_d4",
113
+ "display_name": "M06-L-D4",
114
+ "is_reference": false,
115
+ "units": "hartree"
116
+ },
117
+ {
118
+ "slug": "energy_mn15_d3",
119
+ "display_name": "MN15-D3",
120
+ "is_reference": false,
121
+ "units": "hartree"
122
+ },
123
+ {
124
+ "slug": "energy_mpw2plyp_d4",
125
+ "display_name": "mPW2PLYP-D4",
126
+ "is_reference": false,
127
+ "units": "hartree"
128
+ },
129
+ {
130
+ "slug": "energy_o3lyp_d4",
131
+ "display_name": "O3LYP-D4",
132
+ "is_reference": false,
133
+ "units": "hartree"
134
+ },
135
+ {
136
+ "slug": "energy_olyp_d3_bj",
137
+ "display_name": "OLYP-D3(BJ)",
138
+ "is_reference": false,
139
+ "units": "hartree"
140
+ },
141
+ {
142
+ "slug": "energy_pbe_d4",
143
+ "display_name": "PBE-D4",
144
+ "is_reference": false,
145
+ "units": "hartree"
146
+ },
147
+ {
148
+ "slug": "energy_pbe0_d3_op",
149
+ "display_name": "PBE0-D3(op)",
150
+ "is_reference": false,
151
+ "units": "hartree"
152
+ },
153
+ {
154
+ "slug": "energy_pbe0_dh_d3_bj",
155
+ "display_name": "PBE0-DH-D3(BJ)",
156
+ "is_reference": false,
157
+ "units": "hartree"
158
+ },
159
+ {
160
+ "slug": "energy_pbe_qidh_d3_bj",
161
+ "display_name": "PBE-QIDH-D3(BJ)",
162
+ "is_reference": false,
163
+ "units": "hartree"
164
+ },
165
+ {
166
+ "slug": "energy_pr2scan50_d4",
167
+ "display_name": "Pr2SCAN50-D4",
168
+ "is_reference": false,
169
+ "units": "hartree"
170
+ },
171
+ {
172
+ "slug": "energy_pr2scan69_d4",
173
+ "display_name": "Pr2SCAN69-D4",
174
+ "is_reference": false,
175
+ "units": "hartree"
176
+ },
177
+ {
178
+ "slug": "energy_pb6b95_d3_bj",
179
+ "display_name": "PB6B95-D3(BJ)",
180
+ "is_reference": false,
181
+ "units": "hartree"
182
+ },
183
+ {
184
+ "slug": "energy_pw91_d4",
185
+ "display_name": "PW91-D4",
186
+ "is_reference": false,
187
+ "units": "hartree"
188
+ },
189
+ {
190
+ "slug": "energy_pwpb95_d4",
191
+ "display_name": "PWPB95-D4",
192
+ "is_reference": false,
193
+ "units": "hartree"
194
+ },
195
+ {
196
+ "slug": "energy_r2scan_d4",
197
+ "display_name": "r2SCAN-D4",
198
+ "is_reference": false,
199
+ "units": "hartree"
200
+ },
201
+ {
202
+ "slug": "energy_r2scan0_d4",
203
+ "display_name": "r2SCAN0-D4",
204
+ "is_reference": false,
205
+ "units": "hartree"
206
+ },
207
+ {
208
+ "slug": "energy_r2scan50_d4",
209
+ "display_name": "r2SCAN50-D4",
210
+ "is_reference": false,
211
+ "units": "hartree"
212
+ },
213
+ {
214
+ "slug": "energy_r2scanh_d4",
215
+ "display_name": "r2SCANh-D4",
216
+ "is_reference": false,
217
+ "units": "hartree"
218
+ },
219
+ {
220
+ "slug": "energy_rev_dsd_pbep86_d4",
221
+ "display_name": "rev-DSD-PBEP86-D4",
222
+ "is_reference": false,
223
+ "units": "hartree"
224
+ },
225
+ {
226
+ "slug": "energy_tpss_d4",
227
+ "display_name": "TPSS-D4",
228
+ "is_reference": false,
229
+ "units": "hartree"
230
+ },
231
+ {
232
+ "slug": "energy_tpssh_d4",
233
+ "display_name": "TPSSh-D4",
234
+ "is_reference": false,
235
+ "units": "hartree"
236
+ },
237
+ {
238
+ "slug": "energy_omegab97m_2_v",
239
+ "display_name": "\u03c9B97M(2)-V",
240
+ "is_reference": false,
241
+ "units": "hartree"
242
+ },
243
+ {
244
+ "slug": "energy_omegab97m_v",
245
+ "display_name": "\u03c9B97M-V",
246
+ "is_reference": false,
247
+ "units": "hartree"
248
+ },
249
+ {
250
+ "slug": "energy_omegab97x_d4",
251
+ "display_name": "\u03c9B97X-D4",
252
+ "is_reference": false,
253
+ "units": "hartree"
254
+ },
255
+ {
256
+ "slug": "energy_omegab97x_2_d3_bj",
257
+ "display_name": "\u03c9B97X-2-D3(BJ)",
258
+ "is_reference": false,
259
+ "units": "hartree"
260
+ },
261
+ {
262
+ "slug": "energy_omegab97x_v",
263
+ "display_name": "\u03c9B97X-V",
264
+ "is_reference": false,
265
+ "units": "hartree"
266
+ },
267
+ {
268
+ "slug": "energy_omegam06_d3",
269
+ "display_name": "\u03c9M06-D3",
270
+ "is_reference": false,
271
+ "units": "hartree"
272
+ },
273
+ {
274
+ "slug": "energy_omegar2scan_d4",
275
+ "display_name": "\u03c9r2SCAN-D4",
276
+ "is_reference": false,
277
+ "units": "hartree"
278
+ },
279
+ {
280
+ "slug": "energy_x3lyp_d4",
281
+ "display_name": "X3LYP-D4",
282
+ "is_reference": false,
283
+ "units": "hartree"
284
+ }
285
+ ]
286
+ }
data/reactions.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bf5c6e285994b669ef757c542189a6736d06008ffa5494051bd85ff5d264be2d
3
+ size 10594
data/species.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:76c07dc80c72983c0304b290d8efd8465c69a3e50ba1fbad33625357e37b98de
3
+ size 190123
data/trip50.extxyz ADDED
The diff for this file is too large to render. See raw diff
 
examples/evaluate_mlip.py ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Reference MLIP evaluator for TRIP50.
2
+
3
+ Loads structures from `data/trip50.extxyz`, runs an ASE Calculator over every
4
+ frame, then computes per-reaction ΔE_rxn / ΔE_fwd / ΔE_rev (kcal/mol) using the
5
+ reaction definitions in `data/reactions.parquet`. Reports an MAE table against
6
+ the DLPNO-CCSD(T) reference.
7
+
8
+ Replace `make_calculator()` below with your MLIP. The placeholder uses
9
+ `ase.calculators.emt.EMT` so the script runs CPU-only out of the box; EMT
10
+ support spans only a small subset of the periodic table, so most species will
11
+ fall back to NaN and the MAE table will look terrible — that is expected. The
12
+ purpose of this file is to show the wiring.
13
+ """
14
+
15
+ from __future__ import annotations
16
+
17
+ from pathlib import Path
18
+
19
+ import numpy as np
20
+ import pandas as pd
21
+ from ase.calculators.calculator import Calculator
22
+ from ase.calculators.emt import EMT
23
+ from ase.io import read
24
+
25
+ EV_TO_HARTREE = 1.0 / 27.211386245988
26
+ HARTREE_TO_KCAL = 627.5094740631
27
+
28
+ DATA = Path(__file__).resolve().parent.parent / "data"
29
+
30
+
31
+ def make_calculator() -> Calculator:
32
+ """Replace with your MLIP's ASE Calculator."""
33
+ return EMT()
34
+
35
+
36
+ def species_total_energies(extxyz_path: Path, calc: Calculator) -> dict[str, float]:
37
+ """Run `calc` over every frame; return {species_id: total_energy in Hartree}."""
38
+ totals: dict[str, float] = {}
39
+ for atoms in read(extxyz_path, index=":"):
40
+ atoms.calc = calc
41
+ try:
42
+ e_ev = atoms.get_potential_energy()
43
+ totals[atoms.info["species_id"]] = e_ev * EV_TO_HARTREE
44
+ except Exception as exc:
45
+ print(f" {atoms.info['species_id']}: {type(exc).__name__}: {exc}")
46
+ totals[atoms.info["species_id"]] = float("nan")
47
+ return totals
48
+
49
+
50
+ def reaction_predictions(reactions: pd.DataFrame, totals: dict[str, float]) -> pd.DataFrame:
51
+ """Predict ΔE_rxn, ΔE_fwd, ΔE_rev (kcal/mol) per reaction. Missing partners
52
+ (unimolecular legs) contribute 0."""
53
+ def E(sid):
54
+ return 0.0 if sid is None else totals.get(sid, float("nan"))
55
+
56
+ out = reactions.copy()
57
+ R = out.r1_species_id.map(E) + out.r2_species_id.map(E)
58
+ P = out.p1_species_id.map(E) + out.p2_species_id.map(E)
59
+ TS = out.ts_species_id.map(E)
60
+ out["dE_rxn_kcal_pred"] = (P - R) * HARTREE_TO_KCAL
61
+ out["dE_fwd_kcal_pred"] = (TS - R) * HARTREE_TO_KCAL
62
+ out["dE_rev_kcal_pred"] = (TS - P) * HARTREE_TO_KCAL
63
+ return out
64
+
65
+
66
+ def mae(a: pd.Series, b: pd.Series) -> float:
67
+ diff = (a - b).dropna()
68
+ return float(diff.abs().mean())
69
+
70
+
71
+ def main() -> None:
72
+ extxyz = DATA / "trip50.extxyz"
73
+ reactions = pd.read_parquet(DATA / "reactions.parquet")
74
+
75
+ print(f"Loading {extxyz}")
76
+ calc = make_calculator()
77
+
78
+ print(f"Running {type(calc).__name__} over 156 frames…")
79
+ totals = species_total_energies(extxyz, calc)
80
+ n_ok = sum(1 for v in totals.values() if not np.isnan(v))
81
+ print(f" ok: {n_ok}/{len(totals)}")
82
+
83
+ pred = reaction_predictions(reactions, totals)
84
+ print(
85
+ f"\nMAE vs DLPNO-CCSD(T) (kcal/mol):\n"
86
+ f" ΔE_rxn = {mae(pred.dE_rxn_kcal_pred, pred.dE_rxn_kcal_dlpno):.2f}\n"
87
+ f" ΔE_fwd = {mae(pred.dE_fwd_kcal_pred, pred.dE_fwd_kcal_dlpno):.2f}\n"
88
+ f" ΔE_rev = {mae(pred.dE_rev_kcal_pred, pred.dE_rev_kcal_dlpno):.2f}"
89
+ )
90
+
91
+
92
+ if __name__ == "__main__":
93
+ main()
examples/verify_release.py ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Round-trip verification of the TRIP50 release artefacts.
2
+
3
+ Three checks, run in order:
4
+
5
+ 1. MANIFEST.sha256 matches every payload file's actual digest.
6
+ 2. Recomputed per-method MAE table from species.parquet reproduces the
7
+ published trip50_dft_mae.csv to within 0.005 kcal/mol per cell.
8
+ 3. Extended-XYZ round-trip: every frame's species_id, atomic_numbers, and
9
+ positions agree with species.parquet to within 1e-7 Å (extxyz default
10
+ 8-digit precision).
11
+
12
+ Run from the release root or the examples/ directory.
13
+ """
14
+
15
+ from __future__ import annotations
16
+
17
+ import hashlib
18
+ import sys
19
+ from pathlib import Path
20
+
21
+ import numpy as np
22
+ import pandas as pd
23
+ from ase.io import read
24
+
25
+ ROOT = Path(__file__).resolve().parent.parent
26
+ DATA = ROOT / "data"
27
+ PRODUCTION = Path("/Users/rpaton/TRIP50/production")
28
+
29
+ sys.path.insert(0, str(ROOT / "scripts"))
30
+ from trip50_core import reaction_quantities # noqa: E402
31
+
32
+ POSITION_TOL = 1e-7
33
+ MAE_TOL = 0.005 # kcal/mol; published table has 3-dp rounding
34
+
35
+
36
+ def check_manifest() -> int:
37
+ manifest = DATA / "MANIFEST.sha256"
38
+ failed = 0
39
+ for line in manifest.read_text().strip().splitlines():
40
+ digest, name = line.split(" ", 1)
41
+ actual = hashlib.sha256((DATA / name).read_bytes()).hexdigest()
42
+ ok = actual == digest
43
+ print(f" {'ok ' if ok else 'BAD'} {name}")
44
+ if not ok:
45
+ failed += 1
46
+ return failed
47
+
48
+
49
+ def _build_series(species: pd.DataFrame, slug_to_canonical: dict[str, str]) -> dict[str, pd.Series]:
50
+ """For every method slug, return a Series indexed by species_id (post-alias
51
+ canonical names) with energies in Hartree."""
52
+ out = {}
53
+ for slug, _display in slug_to_canonical.items():
54
+ out[slug] = species.set_index("species_id")[slug]
55
+ return out
56
+
57
+
58
+ def check_mae_table() -> int:
59
+ species = pd.read_parquet(DATA / "species.parquet")
60
+ methods = pd.read_json(DATA / "methods.json")["energy_columns"]
61
+ slug_to_display = {m["slug"]: m["display_name"] for m in methods}
62
+ aliases_df = pd.read_parquet(DATA / "aliases.parquet")
63
+ alias_map = dict(zip(aliases_df["alias"], aliases_df["canonical"]))
64
+
65
+ sp_indexed = species.set_index("species_id")
66
+ dlpno = sp_indexed["energy_dlpno_ccsd_t"]
67
+ ref_rxn, ref_fwd, ref_rev = reaction_quantities(dlpno, dlpno, alias_map)
68
+
69
+ pub_path = PRODUCTION / "trip50_dft_mae.csv"
70
+ if not pub_path.exists():
71
+ print(f" SKIP: {pub_path} not present (offline verification only)")
72
+ return 0
73
+ pub = pd.read_csv(pub_path).set_index("Theory")
74
+
75
+ failed = 0
76
+ for slug, display in slug_to_display.items():
77
+ if display == "DLPNO-CCSD(T)" or display not in pub.index:
78
+ continue
79
+ col = sp_indexed[slug]
80
+ t_rxn, t_fwd, t_rev = reaction_quantities(col, dlpno, alias_map)
81
+ keys = sorted(set(ref_rxn) & set(t_rxn))
82
+ mae_rxn = sum(abs(ref_rxn[k] - t_rxn[k]) for k in keys) / len(keys)
83
+ mae_fwd = sum(abs(ref_fwd[k] - t_fwd[k]) for k in keys) / len(keys)
84
+ mae_rev = sum(abs(ref_rev[k] - t_rev[k]) for k in keys) / len(keys)
85
+ diffs = [
86
+ abs(round(mae_rxn, 3) - pub.loc[display, "ΔE_rxn (P-R)"]),
87
+ abs(round(mae_fwd, 3) - pub.loc[display, "ΔE_fwd (TS-R)"]),
88
+ abs(round(mae_rev, 3) - pub.loc[display, "ΔE_rev (TS-P)"]),
89
+ ]
90
+ ok = max(diffs) < MAE_TOL
91
+ if not ok:
92
+ failed += 1
93
+ print(f" BAD {display}: max abs diff = {max(diffs):.4f} kcal/mol")
94
+ print(f" {'ok ' if failed == 0 else 'BAD'} MAE table reproduces "
95
+ f"trip50_dft_mae.csv (max tol {MAE_TOL})")
96
+ return failed
97
+
98
+
99
+ def check_extxyz_roundtrip() -> int:
100
+ frames = read(DATA / "trip50.extxyz", index=":")
101
+ species = pd.read_parquet(DATA / "species.parquet").set_index("species_id")
102
+ failed = 0
103
+ for atoms in frames:
104
+ sid = atoms.info.get("species_id")
105
+ if sid is None or sid not in species.index:
106
+ print(f" BAD frame missing/unknown species_id: {sid!r}")
107
+ failed += 1
108
+ continue
109
+ row = species.loc[sid]
110
+ if atoms.numbers.tolist() != list(row["atomic_numbers"]):
111
+ print(f" BAD {sid}: atomic_numbers mismatch")
112
+ failed += 1
113
+ continue
114
+ pos = np.asarray(row["positions"].tolist())
115
+ max_dev = float(np.abs(atoms.positions - pos).max())
116
+ if max_dev > POSITION_TOL:
117
+ print(f" BAD {sid}: positions max dev {max_dev:.2e} Å > {POSITION_TOL}")
118
+ failed += 1
119
+ print(f" {'ok ' if failed == 0 else 'BAD'} extxyz round-trip "
120
+ f"({len(frames)} frames, tol {POSITION_TOL} Å)")
121
+ return failed
122
+
123
+
124
+ def main() -> int:
125
+ print("MANIFEST")
126
+ f1 = check_manifest()
127
+ print("\nMAE table")
128
+ f2 = check_mae_table()
129
+ print("\nExtxyz round-trip")
130
+ f3 = check_extxyz_roundtrip()
131
+ total = f1 + f2 + f3
132
+ print(f"\n{'PASS' if total == 0 else 'FAIL'} ({total} failure(s))")
133
+ return total
134
+
135
+
136
+ if __name__ == "__main__":
137
+ sys.exit(main())
scripts/build_hf_release.py ADDED
@@ -0,0 +1,262 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Build the TRIP50 Hugging Face release artefacts under ../data/.
2
+
3
+ Reads from /Users/rpaton/TRIP50/production/:
4
+ - trip50_reference_energies.csv (DLPNO + 46 DFT totals, Hartree)
5
+ - trip50_species_aliases.csv (alias → canonical map)
6
+ - xyz_corrected/*.xyz (156 standard XYZ files; comment line = multiplicity)
7
+
8
+ Writes to ../data/:
9
+ - trip50.extxyz : 156 frames, ASE-readable, all energies in info dict
10
+ - species.parquet : per-species table with atomic_numbers/positions/energies
11
+ - reactions.parquet : 50 rxn rows, alias-resolved species ids + reference Δs (kcal/mol)
12
+ - aliases.parquet : alias map mirrored as parquet (CSV is also copied)
13
+ - aliases.csv : verbatim copy of source alias table
14
+ - methods.json : slug ↔ display-name mapping for the 46 DFT columns
15
+ - MANIFEST.sha256 : SHA-256 of every payload file (deterministic check)
16
+
17
+ The build is deterministic: sorted iteration, no timestamps in any payload.
18
+ """
19
+
20
+ from __future__ import annotations
21
+
22
+ import hashlib
23
+ import json
24
+ import shutil
25
+ from pathlib import Path
26
+
27
+ import numpy as np
28
+ import pandas as pd
29
+ import pyarrow as pa
30
+ import pyarrow.parquet as pq
31
+ from ase import Atoms
32
+ from ase.io import write as ase_write
33
+
34
+ from trip50_core import (
35
+ HARTREE_TO_KCAL,
36
+ ROLES,
37
+ lookup,
38
+ reaction_quantities,
39
+ slugify_method,
40
+ )
41
+
42
+ SRC = Path("/Users/rpaton/TRIP50/production")
43
+ OUT = Path(__file__).resolve().parent.parent / "data"
44
+ XYZ_DIR = SRC / "xyz_corrected"
45
+
46
+ REF_CSV = SRC / "trip50_reference_energies.csv"
47
+ ALIAS_CSV = SRC / "trip50_species_aliases.csv"
48
+
49
+ MULT_TO_INT = {"singlet": 1, "doublet": 2, "triplet": 3}
50
+
51
+ # Reaction categories from Figure 2 of Hughes, Popescu, Paton, JCTC 2026, 22, 3530.
52
+ RXN_CATEGORIES = (
53
+ ("C-C", range(1, 13)),
54
+ ("C-O", range(13, 18)),
55
+ ("C-S", range(18, 22)),
56
+ ("HAT", range(22, 31)),
57
+ ("Si-X", range(31, 38)),
58
+ ("C-Hal", range(38, 42)),
59
+ ("N-X", range(42, 51)),
60
+ )
61
+ RXN_CATEGORY = {r: name for name, rng in RXN_CATEGORIES for r in rng}
62
+ assert set(RXN_CATEGORY) == set(range(1, 51)), "category ranges must tile 1..50 exactly"
63
+
64
+
65
+ def parse_xyz(path: Path) -> tuple[Atoms, str]:
66
+ """Parse a TRIP50 standard-XYZ file. Returns (Atoms, multiplicity_label)."""
67
+ lines = path.read_text().splitlines()
68
+ n = int(lines[0].strip())
69
+ mult = lines[1].strip()
70
+ symbols, coords = [], []
71
+ for line in lines[2:2 + n]:
72
+ parts = line.split()
73
+ symbols.append(parts[0])
74
+ coords.append([float(x) for x in parts[1:4]])
75
+ atoms = Atoms(symbols=symbols, positions=np.asarray(coords, dtype=np.float64))
76
+ return atoms, mult
77
+
78
+
79
+ def species_id_from_filename(path: Path) -> str:
80
+ return path.stem # e.g. "1-R1.xyz" → "1-R1"
81
+
82
+
83
+ def split_rxn_role(species_id: str) -> tuple[int, str]:
84
+ rxn_str, role = species_id.split("-", 1)
85
+ return int(rxn_str), role
86
+
87
+
88
+ def build():
89
+ OUT.mkdir(parents=True, exist_ok=True)
90
+
91
+ # -------------------- inputs --------------------
92
+ ref = pd.read_csv(REF_CSV).set_index("Species")
93
+ aliases_df = pd.read_csv(ALIAS_CSV)
94
+ alias_map = dict(zip(aliases_df["alias"], aliases_df["canonical"]))
95
+ dlpno_col = "DLPNO-CCSD(T)"
96
+
97
+ # Method display names → slugs (DLPNO + 46 DFT)
98
+ method_columns = list(ref.columns)
99
+ slug_map = {col: ("energy_dlpno_ccsd_t" if col == dlpno_col
100
+ else f"energy_{slugify_method(col)}")
101
+ for col in method_columns}
102
+ # Verify uniqueness
103
+ if len(set(slug_map.values())) != len(slug_map):
104
+ dupes = [s for s in slug_map.values() if list(slug_map.values()).count(s) > 1]
105
+ raise RuntimeError(f"Slug collision: {set(dupes)}")
106
+
107
+ methods_meta = {
108
+ "energy_columns": [
109
+ {"slug": slug_map[col], "display_name": col,
110
+ "is_reference": col == dlpno_col,
111
+ "units": "hartree"}
112
+ for col in method_columns
113
+ ],
114
+ }
115
+ (OUT / "methods.json").write_text(json.dumps(methods_meta, indent=2) + "\n")
116
+
117
+ # -------------------- structures + per-species rows --------------------
118
+ xyz_paths = sorted(XYZ_DIR.glob("*.xyz"),
119
+ key=lambda p: split_rxn_role(p.stem))
120
+
121
+ species_rows = []
122
+ frames: list[Atoms] = []
123
+
124
+ for xyz_path in xyz_paths:
125
+ species_id = species_id_from_filename(xyz_path)
126
+ atoms, mult_label = parse_xyz(xyz_path)
127
+ rxn_id, role = split_rxn_role(species_id)
128
+
129
+ if mult_label not in MULT_TO_INT:
130
+ raise ValueError(f"Unknown multiplicity {mult_label!r} in {xyz_path}")
131
+ spin_mult = MULT_TO_INT[mult_label]
132
+
133
+ # Pull every method's total energy for this species (alias-resolved)
134
+ per_method = {}
135
+ for col in method_columns:
136
+ val = lookup(species_id, ref[col], alias_map)
137
+ if val is None:
138
+ raise RuntimeError(f"Missing {col} energy for {species_id}")
139
+ per_method[slug_map[col]] = float(val)
140
+
141
+ # Frame info dict — ASE will serialise this onto the comment line
142
+ info = {
143
+ "species_id": species_id,
144
+ "rxn": rxn_id,
145
+ "role": role,
146
+ "multiplicity": mult_label,
147
+ "spin_multiplicity": spin_mult,
148
+ "charge": 0,
149
+ "units_energy": "hartree",
150
+ **per_method,
151
+ }
152
+ atoms.info.update(info)
153
+ frames.append(atoms)
154
+
155
+ species_rows.append({
156
+ "species_id": species_id,
157
+ "rxn_id": rxn_id,
158
+ "role": role,
159
+ "n_atoms": len(atoms),
160
+ "atomic_numbers": atoms.numbers.tolist(),
161
+ "positions": atoms.positions.tolist(),
162
+ "charge": 0,
163
+ "multiplicity": mult_label,
164
+ "spin_multiplicity": spin_mult,
165
+ **per_method,
166
+ })
167
+
168
+ # -------------------- write extxyz --------------------
169
+ extxyz_path = OUT / "trip50.extxyz"
170
+ ase_write(extxyz_path, frames, format="extxyz")
171
+
172
+ # -------------------- write species.parquet --------------------
173
+ species_df = pd.DataFrame(species_rows)
174
+ species_schema = pa.schema([
175
+ ("species_id", pa.string()),
176
+ ("rxn_id", pa.int32()),
177
+ ("role", pa.string()),
178
+ ("n_atoms", pa.int32()),
179
+ ("atomic_numbers", pa.list_(pa.int8())),
180
+ ("positions", pa.list_(pa.list_(pa.float64(), 3))),
181
+ ("charge", pa.int8()),
182
+ ("multiplicity", pa.string()),
183
+ ("spin_multiplicity", pa.int8()),
184
+ *[(slug_map[col], pa.float64()) for col in method_columns],
185
+ ])
186
+ species_table = pa.Table.from_pandas(species_df, schema=species_schema, preserve_index=False)
187
+ pq.write_table(species_table, OUT / "species.parquet", compression="zstd")
188
+
189
+ # -------------------- reactions.parquet --------------------
190
+ dlpno_series = ref[dlpno_col]
191
+ dE_rxn, dE_fwd, dE_rev = reaction_quantities(dlpno_series, dlpno_series, alias_map)
192
+
193
+ reaction_rows = []
194
+ for r in range(1, 51):
195
+ present = {role: lookup(f"{r}-{role}", dlpno_series, alias_map) is not None
196
+ for role in ROLES}
197
+
198
+ def canonical(role):
199
+ sid = f"{r}-{role}"
200
+ return alias_map.get(sid, sid) if present[role] else None
201
+
202
+ reaction_rows.append({
203
+ "rxn_id": r,
204
+ "category": RXN_CATEGORY[r],
205
+ "r1_species_id": canonical("R1"),
206
+ "r2_species_id": canonical("R2"),
207
+ "ts_species_id": canonical("TS"),
208
+ "p1_species_id": canonical("P1"),
209
+ "p2_species_id": canonical("P2"),
210
+ "is_unimolecular_reactant": not present["R2"],
211
+ "is_unimolecular_product": not present["P2"],
212
+ "dE_rxn_kcal_dlpno": dE_rxn.get(r),
213
+ "dE_fwd_kcal_dlpno": dE_fwd.get(r),
214
+ "dE_rev_kcal_dlpno": dE_rev.get(r),
215
+ })
216
+
217
+ reactions_df = pd.DataFrame(reaction_rows)
218
+ reactions_schema = pa.schema([
219
+ ("rxn_id", pa.int32()),
220
+ ("category", pa.string()),
221
+ ("r1_species_id", pa.string()),
222
+ ("r2_species_id", pa.string()),
223
+ ("ts_species_id", pa.string()),
224
+ ("p1_species_id", pa.string()),
225
+ ("p2_species_id", pa.string()),
226
+ ("is_unimolecular_reactant", pa.bool_()),
227
+ ("is_unimolecular_product", pa.bool_()),
228
+ ("dE_rxn_kcal_dlpno", pa.float64()),
229
+ ("dE_fwd_kcal_dlpno", pa.float64()),
230
+ ("dE_rev_kcal_dlpno", pa.float64()),
231
+ ])
232
+ reactions_table = pa.Table.from_pandas(reactions_df, schema=reactions_schema, preserve_index=False)
233
+ pq.write_table(reactions_table, OUT / "reactions.parquet", compression="zstd")
234
+
235
+ # -------------------- aliases --------------------
236
+ shutil.copyfile(ALIAS_CSV, OUT / "aliases.csv")
237
+ aliases_table = pa.Table.from_pandas(aliases_df, preserve_index=False)
238
+ pq.write_table(aliases_table, OUT / "aliases.parquet", compression="zstd")
239
+
240
+ # -------------------- MANIFEST --------------------
241
+ payload = sorted([
242
+ OUT / "trip50.extxyz",
243
+ OUT / "species.parquet",
244
+ OUT / "reactions.parquet",
245
+ OUT / "aliases.parquet",
246
+ OUT / "aliases.csv",
247
+ OUT / "methods.json",
248
+ ])
249
+ manifest_lines = []
250
+ for path in payload:
251
+ digest = hashlib.sha256(path.read_bytes()).hexdigest()
252
+ manifest_lines.append(f"{digest} {path.name}")
253
+ (OUT / "MANIFEST.sha256").write_text("\n".join(manifest_lines) + "\n")
254
+
255
+ print(f"Wrote {len(species_df)} species frames, {len(reactions_df)} reactions to {OUT}")
256
+ for path in payload + [OUT / "MANIFEST.sha256"]:
257
+ size = path.stat().st_size
258
+ print(f" {path.name:30s} {size:>10,} B")
259
+
260
+
261
+ if __name__ == "__main__":
262
+ build()
scripts/trip50_core.py ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Core helpers for the TRIP50 dataset: alias resolution and reaction quantities.
2
+
3
+ Used by the release producer (`build_hf_release.py`), the round-trip verifier
4
+ (`examples/verify_release.py`), and the example MLIP evaluator
5
+ (`examples/evaluate_mlip.py`). Kept dependency-light so it ships with the
6
+ release without pulling in optional libraries.
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ HARTREE_TO_KCAL = 627.5094740631
12
+ ROLES = ("R1", "R2", "TS", "P1", "P2")
13
+
14
+
15
+ def lookup(species_name, source, alias_map):
16
+ """Energy for `species_name` in `source` (a Mapping or pandas Series indexed
17
+ by species id), with alias resolution. Returns None if not present."""
18
+ name = alias_map.get(species_name, species_name)
19
+ return source.get(name, None)
20
+
21
+
22
+ def required_roles(rxn_id, dlpno_source, alias_map):
23
+ """Roles that the rxn definition requires (i.e., DLPNO has a non-null value
24
+ for that species). Unimolecular legs (R2 and/or P2 absent) drop out."""
25
+ return {role for role in ROLES
26
+ if lookup(f"{rxn_id}-{role}", dlpno_source, alias_map) is not None}
27
+
28
+
29
+ def reaction_quantities(source, dlpno_source, alias_map):
30
+ """Compute ΔE_rxn, ΔE_fwd, ΔE_rev (kcal/mol) for every TRIP50 reaction
31
+ defined in `dlpno_source`. A reaction's quantity is included only when
32
+ every role required by the DLPNO definition is also resolvable in `source`.
33
+ Unimolecular legs (roles absent from DLPNO) contribute 0 H on both sides.
34
+
35
+ Returns three dicts {rxn_id: kcal_value}.
36
+ """
37
+ rxn, fwd, rev = {}, {}, {}
38
+ for r in range(1, 51):
39
+ req = required_roles(r, dlpno_source, alias_map)
40
+ e = {role: (lookup(f"{r}-{role}", source, alias_map) or 0.0) for role in ROLES}
41
+ ok = lambda needed: all((lookup(f"{r}-{role}", source, alias_map) is not None)
42
+ for role in (needed & req))
43
+ if {"R1", "P1"} <= req and ok({"R1", "R2", "P1", "P2"}):
44
+ rxn[r] = ((e["P1"] + e["P2"]) - (e["R1"] + e["R2"])) * HARTREE_TO_KCAL
45
+ if {"R1", "TS"} <= req and ok({"R1", "R2", "TS"}):
46
+ fwd[r] = (e["TS"] - (e["R1"] + e["R2"])) * HARTREE_TO_KCAL
47
+ if {"P1", "TS"} <= req and ok({"P1", "P2", "TS"}):
48
+ rev[r] = (e["TS"] - (e["P1"] + e["P2"])) * HARTREE_TO_KCAL
49
+ return rxn, fwd, rev
50
+
51
+
52
+ def slugify_method(name):
53
+ """Reversible slug for a method/theory name. Mapping is recorded in
54
+ methods.json at release time so consumers can recover the display name."""
55
+ s = name
56
+ s = s.replace("ω", "omega").replace("Ω", "omega")
57
+ s = s.replace("κ", "kappa").replace("Κ", "kappa")
58
+ s = s.lower()
59
+ out = []
60
+ for ch in s:
61
+ if ch.isalnum():
62
+ out.append(ch)
63
+ elif ch in "-/() ":
64
+ out.append("_")
65
+ # drop everything else
66
+ slug = "".join(out)
67
+ while "__" in slug:
68
+ slug = slug.replace("__", "_")
69
+ return slug.strip("_")