Skip to content

Live Structures

nodemode-ai edited this page Dec 5, 2026 · 1 revision

Live Structures

From 0.12.0 a structure you copy from FormChem into another Form app (FormDeck, FormTxt, form.md) stays a FormChem drawing: the picture carries the drawing inside, and FormChem opens it again for editing. The full guide is docs/LIVE-STRUCTURES.md; the contract sibling apps follow is docs/LIVE_STRUCTURES.md.

A live structure in three steps

  1. Select a structure and choose Edit > Copy As > Copy as Live Structure.
  2. Paste it into the other Form app. It shows the picture.
  3. To change it, the other app opens it in FormChem (a formai://formchem/edit link, ./formchem edit-live, or opening its picture). Edit, then press Mod+S: the picture is rewritten with a higher revision and the other app shows the new one.

The Structure Library

Window > Structure Library... shows every structure you starred, copied, saved as a template or placed as a live structure:

Tab How a structure gets there
Favourites Structure > Star Structure
Recent Copy as Live Structure, or inserting from the library (newest 50 kept)
Templates File > Save as Template to Library...
Live Copy as Live Structure

Search by name, formula or SMILES; Insert, Open, Copy as Live Structure, Unstar and Delete work on the chosen tile. The library is plain files in ~/formchem/Library/ (a library.json, and an SVG, PNG and molfile per item), so other Form apps read it without FormChem running.

A live drawing

  • The title bar shows "Live structure from [app]".
  • Save asks for no path; it saves to the library item. Closing with unsaved changes and choosing Save does the same.
  • Save As makes an ordinary .fchem copy.
  • A live structure from another computer joins your library with its own id; an older copy never overwrites a newer edit.

Dropping and pasting

Drop a FormChem picture or a live structure on the canvas to insert it there; hold Alt, or drop with no drawing open, to open it as its own drawing. Pasting one inserts the drawing inside it.

When a file changes outside FormChem

If the file of an open drawing changes on disk, a bar over the canvas offers Reload (undoable) or Keep Mine (your next save wins). FormChem's own saves never show it.

Not yet

  • No sibling app was run against this for 0.12.0; the files and the clipboard were checked against the contract.
  • The desktop app's own clipboard and a real formai:// link were not tried; from a browser window other apps get the HTML picture and the images.
  • Dragging a structure out of FormChem does not carry a live structure yet.

Clone this wiki locally