Skip to content

Commit 228be00

Browse files
committed
rm frontmatter.yml after consolidating with citation.cff
pnpm i -D js-yaml fix link to landing page overlapping with nav add image to Wrenformer model card
1 parent fd8355d commit 228be00

File tree

9 files changed

+67
-38
lines changed

9 files changed

+67
-38
lines changed

citation.cff

+21-16
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,38 @@
1-
cff-version: 1.2.0
2-
title: Matbench Discovery
1+
# cff-version: 1.2.0
32
message: If you use this software, please cite it as below.
3+
title: Matbench Discovery
4+
subtitle: Can machine learning identify stable crystals?
45
authors:
5-
- family-names: Riebesell
6-
given-names: Janosh
6+
- given-names: Janosh
7+
family-names: Riebesell
78
affiliation: University of Cambridge, Lawrence Berkeley National Laboratory
89
910
orcid: https://orcid.org/0000-0001-5233-3462
1011
corresponding: true
11-
- family-names: Goodall
12-
given-names: Rhys
12+
affil_key: 1, 2
13+
- given-names: Rhys
14+
family-names: Goodall
1315
affiliation: University of Cambridge
1416
orcid: https://orcid.org/0000-0002-6589-1700
15-
- family-names: Jain
16-
given-name: Anubhav
17+
affil_key: 1
18+
- given-names: Anubhav
19+
family-names: Jain
1720
orcid: 0000-0001-5893-9967
1821
affiliation: Lawrence Berkeley National Laboratory
19-
- family-names: Persson
20-
given-name: Kristin
22+
affil_key: 2
23+
- given-names: Kristin
24+
family-names: Persson
2125
orcid: 0000-0003-2495-5509
2226
affiliation: Lawrence Berkeley National Laboratory
23-
- family-names: King-Smith
24-
given-name: Emma
25-
orcid: 0000-0002-2999-0955
26-
affiliation: University of Cambridge
27-
- family-names: Lee
28-
given-name: Alpha
27+
affil_key: 2
28+
- given-names: Alpha
29+
family-names: Lee
2930
orcid: 0000-0002-9616-3108
3031
affiliation: University of Cambridge
32+
affil_key: 1
33+
affiliations:
34+
- Cavendish Laboratory, University of Cambridge, UK
35+
- Lawrence Berkeley National Laboratory, Berkeley, USA
3136
license: MIT
3237
license-url: https://github.com/janosh/matbench-discovery/blob/main/license"
3338
repository-code: https://github.com/janosh/matbench-discovery

models/cgcnn/metadata.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@
2525
Ensemble Size: 10
2626

2727
notes:
28-
description: Published in 2017, CGCNN was the first crystal graph convolutional neural network to directly learn 8 different DFT-computed material properties from a graph representing the atoms and bonds in a crystal. ![Illustration of the crystal graph convolutional neural networks](https://researchgate.net/profile/Tian-Xie-11/publication/320726915/figure/fig1/AS:635258345119746@1528468800829/Illustration-of-the-crystal-graph-convolutional-neural-networks-a-Construction-of-the.png)
29-
long: It showed that just like in other areas of ML, given large training sets, embeddings that outperform human-engineered features could be learned directly from the data.
28+
description: |
29+
Published in 2018, CGCNN was the first crystal graph convolutional neural network to directly learn 8 different DFT-computed material properties from a graph representing the atoms and bonds in a crystal.
30+
![Illustration of the crystal graph convolutional neural networks](https://researchgate.net/profile/Tian-Xie-11/publication/320726915/figure/fig1/AS:635258345119746@1528468800829/Illustration-of-the-crystal-graph-convolutional-neural-networks-a-Construction-of-the.png)
31+
long: CGCNN was among the first to show that just like in other areas of ML, given large enough training sets, neural networks can learn embeddings that reliably outperform all human-engineered structure features directly from the data.
3032

3133
- model_name: CGCNN+P
3234
model_version: 0.1.0 # the aviary version
@@ -60,5 +62,7 @@
6062
Perturbations: 5
6163

6264
notes:
63-
description: This work proposes simple structure perturbations to augment CGCNN's training data of relaxed structures with randomly perturbed ones resembling unrelaxed structures that are mapped to the same DFT final energy during training. ![Step function PES](https://media.springernature.com/full/springer-static/image/art%3A10.1038%2Fs41524-022-00891-8/MediaObjects/41524_2022_891_Fig1_HTML.png?as=webp)
65+
description: |
66+
This work proposes simple structure perturbations to augment CGCNN's training data of relaxed structures with randomly perturbed ones resembling unrelaxed structures that are mapped to the same DFT final energy during training.
67+
![Step function PES](https://media.springernature.com/full/springer-static/image/art%3A10.1038%2Fs41524-022-00891-8/MediaObjects/41524_2022_891_Fig1_HTML.png?as=webp)
6468
long: The model is essentially taught the potential energy surface (PES) is a step-function that maps each valley to its local minimum. The expectation is that during testing on unrelaxed structures, the model will predict the energy of the nearest basin in the PES. The authors confirm this by demonstrating a lowering of the energy error on unrelaxed structures.

models/wrenformer/metadata.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,9 @@ hyperparams:
3030
Ensemble Size: 10
3131

3232
notes:
33-
description: Wrenformer is a standard PyTorch Transformer Encoder trained to learn material embeddings from composition, space group, Wyckoff positions in a structure.
33+
description: |
34+
Wrenformer is a standard PyTorch Transformer Encoder trained to learn material embeddings from composition, space group, Wyckoff positions in a structure.
35+
![Model workings](https://science.org/cms/10.1126/sciadv.abn4117/asset/a29e0899-77d1-47c8-82e3-00ab87c3b8d5/assets/images/large/sciadv.abn4117-f1.jpg)
36+
A ML–powered materials discovery workflow using Wrenformer's Wyckoff string inputs to predict formation energies for candidate materials in an enumerated library of Wyckoff representations (shapes are used to denote different Wyckoff positions and colors to denote different element types). Predicted formation energies are then compared against the known convex hull of stability. Structures satisfying the required symmetries are relaxed for materials predicted to be stable.
37+
3438
long: It builds on [Roost](https://doi.org/10.1038/s41467-020-19964-7) and [Wren](https://doi.org/10.1126/sciadv.abn4117), by being a fast structure-free model that is still able to distinguish polymorphs through symmetry.

site/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"eslint": "^8.34.0",
2929
"eslint-plugin-svelte3": "^4.0.0",
3030
"hastscript": "^7.2.0",
31+
"js-yaml": "^4.1.0",
3132
"katex": "^0.16.4",
3233
"mdsvex": "^0.10.6",
3334
"prettier": "^2.8.4",

site/src/app.d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ declare module '*metadata.yml' {
1515
}
1616

1717
// paper metadata
18-
declare module '*frontmatter.yml' {
19-
const frontmatter: import('$lib').Frontmatter
20-
export = frontmatter
18+
declare module '*citation.cff' {
19+
const data: import('$lib').Citation
20+
export = data
2121
}
2222

2323
declare module '*references.yaml' {

site/src/lib/index.ts

+8-3
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,20 @@ export type Reference = {
7272
ISSN?: string
7373
}
7474

75-
export type Frontmatter = {
75+
export type Citation = {
7676
title: string
7777
subtitle?: string
78-
tags: string[]
7978
authors: {
8079
name: string
8180
affiliation: string
81+
affil_key: string
8282
orcid: string
8383
}[]
8484
affiliations: string[]
85-
date: string
85+
'date-released': string
86+
license: string
87+
'license-url': string
88+
'repository-code': string
89+
url: string
90+
version: string
8691
}

site/src/routes/+layout.svelte

+11-4
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,21 @@
4949
max-width: 50em;
5050
}
5151
a[href='/'] {
52-
font-size: 15pt;
53-
position: absolute;
54-
top: 2em;
55-
left: 2em;
52+
font-size: 14pt;
5653
background-color: rgba(255, 255, 255, 0.1);
5754
padding: 1pt 5pt;
5855
border-radius: 3pt;
5956
transition: 0.2s;
57+
width: max-content;
58+
box-sizing: border-box;
59+
margin: 1em 0 0 1em;
60+
}
61+
@media (min-width: 900px) {
62+
a[href='/'] {
63+
position: absolute;
64+
top: 1em;
65+
left: 1em;
66+
}
6067
}
6168
a[href='/']:hover {
6269
background-color: rgba(255, 255, 255, 0.2);
+3-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import fs from 'fs'
2+
import yml from 'js-yaml'
23
import type { LayoutServerLoad } from './$types'
34

45
export const load: LayoutServerLoad = async ({ route }) => {
56
const data = fs.readFileSync(`src/routes/${route.id}/+page.md`, `utf8`)
7+
const cff = fs.readFileSync(`../citation.cff`, `utf8`)
68

79
// Count the number of words using a regular expression
810
const word_count = data.match(/\b\w+\b/g)?.length ?? null
911

10-
return { word_count }
12+
return { word_count, ...yml.load(cff) }
1113
}

site/src/routes/paper/+layout.svelte

+8-7
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,25 @@
22
import { References } from '$lib'
33
import { pretty_num } from 'elementari/labels'
44
import type { LayoutServerData } from './$types'
5-
import { affiliations, authors, date, subtitle, title } from './frontmatter.yml'
65
import { references } from './references.yaml'
76
87
export let data: LayoutServerData
8+
9+
const authors = data.authors.map(
10+
(auth) => `${auth[`given-names`]} ${auth[`family-names`]}<sup>${auth.affil_key}</sup>`
11+
)
912
</script>
1013

11-
<h1>{title}<br /><small>{subtitle}</small></h1>
14+
<h1>{data.title}<br /><small>{data.subtitle}</small></h1>
1215

1316
<address>
1417
<span>
15-
{@html authors
16-
.map((author) => `${author.name}<sup>${author.affiliation}</sup>`)
17-
.join(`, `)}
18+
{@html authors.join(`, `)}
1819
</span>
1920
<span>
20-
{@html affiliations.map((affil, idx) => `${idx + 1}. ${affil}`).join(`<br/>`)}
21+
{@html data.affiliations.map((affil, idx) => `${idx + 1}. ${affil}`).join(`<br/>`)}
2122
</span>
22-
<span style="font-weight: lighter;">{date}</span>
23+
<span style="font-weight: lighter;">{data[`date-released`]}</span>
2324
</address>
2425

2526
<div>

0 commit comments

Comments
 (0)