Select Structure from Dropdown
Bi2Zr2O7-Fm3m
Structure
Formula Bi2 O8 Zr2
Number of atoms 12
Volume 153.00 ų
Density 7.91 g/cm³
Lattice lengths a, b, c 5.35, 5.35, 5.35 Å
Lattice angles α, β, γ 90°, 90°, 90°
canvas width=0, height=0
Bismuth
Zirconium
Oxygen
<script>
import { Structure, StructureCard } from '$lib'
import { structures } from '$site'
import Select from 'svelte-multiselect'
let mp_id = `Bi2Zr2O7-Fm3m`
let width
let height
$: href = `https://materialsproject.org/materials/${mp_id}`
$: structure = structures.find((struct) => struct.id === mp_id) || {}
</script>
<form>
<label for="select">Select a structure:</label>
<Select
id="select"
options={structures.map((struct) => struct.id)}
selected={[mp_id]}
bind:value={mp_id}
maxSelect={1}
minSelect={1}
/>
<details>
<summary>JSON for structure {mp_id}</summary>
<pre>
<code>
{JSON.stringify(structure, null, 2)}
</code>
</pre>
</details>
</form>
<h3 align='center'><a {href}>{mp_id}</a></h3>
<StructureCard {structure} />
<p>canvas width=<span>{width}</span>, height=<span>{height}</span></p>
<Structure {structure} bind:width bind:height />
Structures in a grid
Just to show off you can load several without the page getting too slow.
mp-1
Cesiummp-2
Palladiummp-1234
LutetiumAluminiumBi2Zr2O7-Fm3m
BismuthZirconiumOxygenmp-1229155
SilverMercurySulfurBromineChlorinemp-1229168
AluminiumIronNickel
<script>
import { Structure } from '$lib'
import { structures } from '$site'
</script>
<ul>
{#each structures.filter(({sites}) => sites.length < 80) as structure}
{@const { id } = structure}
{@const href = `https://materialsproject.org/materials/${id}`}
<li>
<h2><a {href}>{id}</a></h2>
<Structure {structure} />
</li>
{/each}
</ul>