Skip to content

Commit 5f59a90

Browse files
committed
add @pbenner to citation.cff, /models page add color bar for ModelCard bg color
redesign site footer
1 parent afe6ce9 commit 5f59a90

File tree

6 files changed

+64
-32
lines changed

6 files changed

+64
-32
lines changed

citation.cff

+9
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,24 @@ authors:
1010
orcid: https://orcid.org/0000-0001-5233-3462
1111
corresponding: true
1212
affil_key: 1, 2
13+
github: https://github.com/janosh
1314
- given-names: Rhys
1415
family-names: Goodall
1516
affiliation: University of Cambridge
1617
orcid: https://orcid.org/0000-0002-6589-1700
1718
affil_key: 1
19+
github: https://github.com/comprhys
1820
- given-names: Anubhav
1921
family-names: Jain
2022
orcid: 0000-0001-5893-9967
2123
affiliation: Lawrence Berkeley National Laboratory
2224
affil_key: 2
25+
github: https://github.com/computron
26+
- given-names: Philipp
27+
family-names: Benner
28+
affiliation: German Federal Institute of Materials Research and Testing (BAM)
29+
affil_key: 3
30+
github: https://github.com/pbenner
2331
- given-names: Kristin
2432
family-names: Persson
2533
orcid: 0000-0003-2495-5509
@@ -30,6 +38,7 @@ authors:
3038
orcid: 0000-0002-9616-3108
3139
affiliation: University of Cambridge
3240
affil_key: 1
41+
github: https://github.com/alphaleegroup
3342
affiliations:
3443
- Cavendish Laboratory, University of Cambridge, UK
3544
- Lawrence Berkeley National Laboratory, Berkeley, USA

matbench_discovery/data.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def load(
126126
if not isinstance(df[col].iloc[0], dict):
127127
continue
128128
try:
129-
# convert dicts to pymatgen Structures and ComputedStructureEntrys
129+
# convert dicts to pymatgen Structures and ComputedStructureEntries
130130
df[col] = [
131131
MontyDecoder().process_decoded(dct)
132132
for dct in tqdm(df[col], desc=col)

readme.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ So far, we've tested 8 models covering multiple methodologies ranging from rando
2323

2424
We welcome contributions that add new models to the leaderboard through GitHub PRs. See the [contributing guide](https://janosh.github.io/matbench-discovery/contribute) for details.
2525

26-
Anyone interested in joining this effort please [open a GitHub discussion](https://github.com/janosh/matbench-discovery/discussions) or [reach out privately](mailto:[email protected]?subject=Matbench%20Discovery).
26+
If you're interested in joining this work, feel free to [open a GitHub discussion](https://github.com/janosh/matbench-discovery/discussions) or [send an email](mailto:[email protected]?subject=Collaborate%20on%20Matbench%20Discovery).
2727

28-
For detailed results and analysis, check out our [preprint](https://janosh.github.io/matbench-discovery/preprint) and [SI](https://janosh.github.io/matbench-discovery/si).
28+
For detailed results and analysis, check out the [preprint](https://janosh.github.io/matbench-discovery/preprint) and [SI](https://janosh.github.io/matbench-discovery/si).

site/src/lib/Footer.svelte

+28-26
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,8 @@
88
let btn: HTMLButtonElement
99
1010
function close_if_outside_click(event: MouseEvent) {
11-
if (
12-
dialog &&
13-
show_tips &&
14-
!dialog.contains(event.target as Node) &&
15-
!btn.contains(event.target as Node)
16-
) {
11+
const is_outside = dialog && !dialog.contains(event.target as Node)
12+
if (show_tips && is_outside && !btn.contains(event.target as Node)) {
1713
show_tips = false
1814
}
1915
}
@@ -27,22 +23,25 @@
2723
<svelte:window on:click={close_if_outside_click} on:keydown={toggle} />
2824

2925
<footer>
30-
Questions/feedback?
31-
<a href="{repository}/issues"><Icon icon="octicon:mark-github" inline /></a>
32-
<a href="mailto:[email protected]?subject=Matbench Discovery">
33-
<Icon icon="mdi:email" inline />
34-
</a>
35-
<!-- open modal on clicking tips icon -->
36-
<button on:click={() => (show_tips = true)} bind:this={btn} title={tips_title}>
37-
<Icon icon="mdi:lightbulb-on-outline" inline />
38-
</button>
39-
40-
<p>
41-
<a href="/changelog">
42-
<Icon icon="octicon:history" inline />
43-
Changelog
44-
</a>
45-
</p>
26+
<nav>
27+
<a href="{repository}/issues">Issues</a>
28+
<a href="mailto:[email protected]?subject=Matbench Discovery">Contact</a>
29+
<a href="/changelog">Changelog</a>
30+
<button
31+
on:click={() => (show_tips = true)}
32+
bind:this={btn}
33+
title={tips_title}
34+
style="padding: 0; transform: scale(1.2);"
35+
>
36+
<Icon icon="mdi:lightbulb-on-outline" inline />
37+
</button>
38+
</nav>
39+
<img
40+
src="/favicon.svg"
41+
alt="Logo"
42+
width="30px"
43+
style="vertical-align:middle;"
44+
/>&emsp;Matbench Discovery
4645
</footer>
4746

4847
<dialog bind:this={dialog} open={show_tips}>
@@ -61,10 +60,13 @@
6160
background: #00061a;
6261
text-align: center;
6362
}
64-
footer > a {
65-
margin: 0 0 0 4pt;
63+
footer nav {
64+
display: flex;
65+
gap: 1em;
66+
justify-content: center;
67+
margin: 2em 0;
6668
}
67-
footer > button {
69+
footer > nav > button {
6870
background: none;
6971
color: var(--blue);
7072
}
@@ -85,7 +87,7 @@
8587
visibility: visible;
8688
opacity: 1;
8789
}
88-
dialog > * {
90+
dialog > :is(p, h3) {
8991
margin: 0;
9092
}
9193
p kbd {

site/src/lib/References.svelte

+8-2
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
&mdash;
2626
<small>
2727
{#if DOI}
28-
DOI: <a href="https://doi.org/{DOI}">{DOI}</a>
28+
<a href="https://doi.org/{DOI}">{DOI}</a>
2929
{:else if href}
30-
preprint: <a {href}>{href}</a>
30+
<a {href}>{href}</a>
3131
{/if}
3232
{#if issued}
3333
&mdash; {issued[0].year}
@@ -39,10 +39,16 @@
3939
{/key}
4040

4141
<style>
42+
ol {
43+
padding: 0 0 0 1em;
44+
}
4245
ol > li {
4346
margin: 1ex 0;
4447
}
4548
ol > li > strong {
4649
display: block;
4750
}
51+
ol > li > :is(small, span) {
52+
font-weight: lighter;
53+
}
4854
</style>

site/src/routes/models/+page.svelte

+16-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { ModelCard } from '$lib'
44
import Icon from '@iconify/svelte'
55
import { interpolatePuOr } from 'd3-scale-chromatic'
6+
import { ColorBar } from 'elementari'
67
import { RadioButtons, Tooltip } from 'svelte-zoo'
78
import { flip } from 'svelte/animate'
89
import { fade } from 'svelte/transition'
@@ -53,7 +54,7 @@
5354
$: order = lower_is_better.includes(sort_by) ? `asc` : `desc`
5455
5556
function bg_color(val: number, min: number, max: number) {
56-
return interpolatePuOr(1 - (val - min) / (max - min)).replace(`)`, `, 0.3)`)
57+
return interpolatePuOr(1 - (val - min) / (max - min)).replace(`)`, `, 0.4)`)
5758
}
5859
</script>
5960

@@ -84,6 +85,12 @@
8485
{/each}
8586
</ul>
8687

88+
<legend>
89+
best
90+
<ColorBar color_scale={interpolatePuOr} style="min-width: min(70vw, 400px);" />
91+
worst
92+
</legend>
93+
8794
<ol>
8895
{#each models.slice(0, Math.max(min_models, show_n_best)) as model (model.model_name)}
8996
<li
@@ -114,6 +121,14 @@
114121
</div>
115122

116123
<style>
124+
legend {
125+
display: flex;
126+
gap: 8pt;
127+
place-content: center;
128+
opacity: 0.8;
129+
margin: 2em auto;
130+
font-weight: lighter;
131+
}
117132
:is(ul, ol) {
118133
padding: 0;
119134
list-style: none;

0 commit comments

Comments
 (0)