Skip to content

Chemistry kit

Cargo featurefeatures = ["chemistry"]

The chemistry kit is the chemistry feature of fframes-kit (fframes-kit = { .., features = ["chemistry"] }). It brings two crates: mendeleev for the element data and chematic to read SMILES strings and lay molecules out in 2D. Both build for wasm32, so every figure here also runs in the editor, except the 3D\nfigures, which need the 3d feature as well. Every entry names its scene in the components gallery (cargo run --release -p components-gallery -- strip <Scene> -n 8).

  • Placement. A figure is placed in units of ui.space (Manim’s frame: 8 units tall, y up, the origin in the middle). Its sizes are in pixels: shell gaps, tile sizes, bond lengths.
  • Elements are given by atomic number. symbol, name, atomic_weight, atomic_number (from a symbol), shells (electrons per shell) and table_cell are in fframes_kit::kits::chemistry. Category::of(number) gives the family, and its color tints the tiles.
  • Animation props. The fixed parts (rings, bonds) draw with enter. The rest (electrons, labels) fades with parts_enter. Tiles fade with enter.