Socket
Socket
Sign inDemoInstall

elementari

Package Overview
Dependencies
270
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    elementari

Interactive visualizations for materials science: periodic tables, Bohr atoms, nuclei, heatmaps, scatter plots.


Version published
Weekly downloads
5
decreased by-44.44%
Maintainers
1
Created
Weekly downloads
 

Changelog

Source

v0.2.3

15 January 2024

  • Add props and control sliders for ambient and directional lighting to Structure #45
  • Add SymmetryCard.svelte #42
  • add /molecule demo page with initial examples water, methane, benzene 71ce70b
  • fix find_image_atoms() for non-cuboid lattices 9138582
  • add lib/structure/bonding.ts with max_dist and nearest_neighbor bonding strategies f707cf2
  • add lib/math.ts 58cf060
  • Structure add fullscreen button + improve default initial camera_position bda2e5f
  • fix black text color on transparent ElementTiles 3ace071
  • add src/emmet_pydantic_to_ts.py to auto-convert emmet pydantic models to typescript types e4bcc92
  • add /api page to inspect AWS Open Data schema 83bc866
  • add similar structures and robocrys sections to mp-[slug] page d4dce4b
  • extract (demos)/periodic-table/+page.svelte from landing page, change landing +page.svelte to +page.md cd32144
  • fix duplicate bonds in max_dist and nearest_neighbor functions 14027e3
  • StructureScene add prop fov: number | undefined = undefined 770ffbf
  • rename prop site_labels -> show_site_labels, default to true + fix site site_labels rendering ff0336a
  • add largest MP structure mp-1204603 to demo 1b0bc6d
  • bump threlte to v6 official release 45e3dc2
  • periodic-table.test.ts don't iterate over full table, do random subset for speed be68b6a
  • fetch_zipped() only console.error, not raise if !response.ok f46cee0

Readme

Source

Logo
Elementari

Tests GH Pages pre-commit.ci status Open in StackBlitz

elementari is a toolkit for building interactive web UIs for materials science: periodic tables, 3d crystal structures (and molecules, though needs some improvements!), Bohr atoms, nuclei, heatmaps, scatter plots. It's under active development and not yet ready for production use but we appreciate any feedback from beta testers! 🙏

Screenshot of landing page

📦   Heatmap

This screenshot demonstrates the periodicity of elemental properties (i.e. why it's called periodic table). In this case, you're seeing recurring bumps and valleys in the first ionization energy as a function of atomic number.

Screenshot of periodic table heatmap

⚛️   3D Structure Viewer

3D Structure Viewer

⚛️   Element Details Pages

The details page for gold.

https://user-images.githubusercontent.com/30958850/186975855-8e0d94f9-e4e3-47a2-9354-9c012b37307c.mp4

🔨   Installation

npm install --dev elementari

📙   Usage

Import the PeriodicTable component and pass it some heatmap values:

<script>
  import PeriodicTable from 'elementari'

  const heatmap_values = { H: 10, He: 4, Li: 8, Fe: 3, O: 24 }
</script>

<PeriodicTable {heatmap_values} />

🎬   Events

PeriodicTable.svelte forwards the following events from each ElementTile:

  1. click
  2. mouseenter
  3. mouseleave
  4. keyup
  5. keydown

Each event is a Svelte dispatch event with the following detail payload:

detail: {
  element: ChemicalElement
  active: boolean // whether the event target tile is currently active
  dom_event: Event // the DOM event that triggered the Svelte dispatch
}

See DispatchPayload and PeriodicTableEvents in src/lib/index.ts

🧪   Coverage

StatementsBranchesLines
StatementsBranchesLines

🙏   Acknowledgements

This project would not have been possible as a one-person side project without many fine open-source projects. 🙏 To name just a few:

3D graphics2D graphicsDocsBundlerTesting
three.jsd3mdsvexviteplaywright
threltesharprehypesveltekitvitest

Keywords

FAQs

Last updated on 15 Jan 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc