johnsonolly456 downloadsLive calculation tables, lab snippet forms and a hazard header for a chemistry lab notebook.
Live calculation tables, lab snippet forms and a hazard header for a chemistry lab notebook in Obsidian.
Lab Kit turns a plain note into an experiment page: a hazard table built from your chemical notes, tables that calculate like a spreadsheet, and pop-up forms that write the tables you use every day (solutions, recipes, RAFT, sampling timetables, NMR / GPC / DLS sample tables). It started as a PhD lab notebook; the vocabulary is a chemistry lab's, but nothing stops you using it for anything that needs small calculations in a note.
[!note] Beta Version 1.0.0 is a beta: the planning kit and the multi-kit system are new and not yet tested by many people. Report problems on GitHub.
```calc blocks with Excel-style formulas (SUM, XLOOKUP, IF, …), references between tables, and MW() read from your chemical notes. Click a cell to edit; everything that depends on it updates, and the cells a formula points at are ringed while you type it.[[ in a calc cell and the reagent/solvent fields of the forms suggest them, by note name or by the names in a note's Names property.Needs Obsidian 1.14 or newer. For the snippet forms, also install Templater.
ABC0016-A). Until then the snippets use XX.The full walk-through, with every feature explained, is the tutorial. What changed in each version: changelog.
0016 - Batch esterification) with a hazard table, a data-folder button and five sections: Objectives, Apparatus, Procedure, Results / Analysis, Notes for next time.[[DCM]]). The hazard table fills in from each chemical note's H_Phrase list.raft, sol, nmr), press Enter, fill in the form, press Enter. The table appears in your note.A ```calc block holds a Markdown table that behaves like a small spreadsheet.
```calc
name: sol1
title: Stock solution
| Item | MW | mass (mg) | mmol |
|---|---|---|---|
| [[DCM]] | =MW(A2) | 250 | =C2/B2 |
```
sol1!D2, SUM(sol1!D2:D4)).SUM AVERAGE MIN MAX COUNT COUNTA PRODUCT SUMPRODUCT ROUND ROUNDUP ROUNDDOWN INT ABS SQRT POWER EXP LN LOG LOG10 MOD PI IF IFERROR AND OR NOT CONCAT MATCH INDEX XLOOKUP CLOCK MW PROP. MW("DCM") reads the molecular weight from a chemical note, PROP("PABTC", "Density") any property, CLOCK("10:30", 90) gives a clock time 90 minutes later.name, title, icon, decimals, sig, grid, copy. See the tutorial.excel_to_calc.py script turns the sheets of an .xlsx into calc blocks, formulas included (tutorial section 5).Set Chemical folder to the folder that holds your chemical notes (one note per chemical). Lab Kit then uses them in three places:
MW() and PROP() read the note's properties (MW from the property you choose in Molecular weight property, or MW, Mr, Molecular weight and similar).[[ in a calc cell, or in a reagent, solvent, monomer, CTA or initiator field of a form, suggests your notes by file name or by their Names property (a list or a single value). A name found through Names inserts [[Note|name]].H_Phrase property.Give a chemical a Chemical class (any text, or a list: solvent, monomer, initiator, CTA, or a class of your own). Form fields that ask for a class (Solvent, Monomer, CTA, Initiator) then suggest those chemicals first; switch on Only suggest chemicals of the asked class to hide the others. Reagents and solutes stay unfiltered.
A chemical note is an ordinary note with properties, for example:
---
Names:
- dichloromethane
- methylene chloride
MW: 84.93
Density: 1.33
H_Phrase:
- H315
- H336
---
Put the cursor where you want the table, press Alt+S, pick a snippet, fill in one form, press Enter. Forms start empty (grey placeholders show what to type), and submitting an untouched form inserts nothing.
| Snippet | Use it for |
|---|---|
| Solution prep | Making up a stock solution: a target per solute (M, mg/mL or g) or one total concentration split by a ratio, added in g or mL (mL uses the chemical note's Density), mmol and the concentration reached |
| Recipe by equivalents | Planning amounts from equivalents relative to any reagent; the first amount in mmol, g or M; solvent "rest" row; total mass and wt% |
| RAFT recipe generator | RAFT / PISA: monomer mass, DP, CTA:I, solids → every mass, solvent (and optional co-solvent), theoretical Mn |
| Variant naming matrix | A grid of conditions, with sample codes ABC0016-A, -B… |
| Sample list · Sampling timetable | Sample codes, with target clock times for kinetics (add the analysis tables below afterwards) |
| NMR / GPC / DLS samples · your own methods | Sample tables with machine, checklist and result columns |
| Combined results | One row per sample with the results of every method |
| Flow column prep · Residence times | Packing a column, reactor volume, flow rates |
| Blank calc table | Your own columns |
Choose which snippets you want in Manage files… (each has a Use toggle). Icons for the Alt+S menu are a setting.
One note per method in your Methods folder, with a Columns property, gives you a sample table of your own (mass spec, XRD, TGA, …), a Results property chooses what goes into Combined results, and one note per machine fills in defaults. Each method appears in the Alt+S menu by itself. NMR, GPC and DLS are built in. Details and an example: tutorial section 6.1.
A ```lab-header block shows, for the note it is in:
<data folder root>/<note name> and opens it (desktop only; set the root in Settings → Lab Kit → Lab header).It only redraws when this note's Chemicals or a linked chemical note changes. The command Insert lab header block adds one; the Lab Book template already has it. Every option is in Settings → Lab Kit → Hazards and can be overridden for one note with lines inside the block (layout: table, collapsed: false, …): see tutorial section 4.
The templates (Lab Book, Alt+S menu, one file per snippet), the Templater scripts and a CSS snippet are bundled inside the plugin. Updating the plugin brings the new kit, but your files only change when you say so:
The kit is split into two kits, each with its own files, state and switch: the lab kit (Lab Book template, snippets, scripts; on by default) and the planning kit (homepage, to-do board, projects, meetings, knowledge notes; preview, off until you switch it on). Review, Manage and Update work per kit.
The kits expect these folders. Each is a setting; empty means the default below, and a folder you rename inside Obsidian is followed by its setting.
| Folder (default) | Used by | Setting |
|---|---|---|
03 Lab Book/Notes |
lab kit: experiment notes | Lab notes folder |
05 Chemicals/Chemicals |
lab kit: chemical notes | Chemical folder |
| Methods folder (empty until set) | lab kit: analysis methods | Methods folder |
00 Inbox · 01 Daily Notes |
planning kit | Planning folders |
00 Planning (to-dos in 00 Planning/To-dos) |
planning kit | Planning folders |
02 Projects · 04 Literature · 06 Knowledge · 07 How-tos · 08 Meetings |
planning kit | Planning folders |
99 Archive (made when first needed) |
planning kit | Planning folders |
Extras/ (templates, scripts, fonts) |
both kits | Kit folders and setup |
A new vault can get this layout, the plugin list and the Templater settings from the generated starter (see Development).
Settings → Lab Kit is searchable and grouped:
| Group | What is in it |
|---|---|
| Built-in kit | Update available, Kit version (Manage files, Review update, Update all safe files), Planning kit (preview) switch and its files, What's new, update notice, Backup folder |
| Kit folders and setup | Check setup… (its Fix sets up Templater), Check hotkeys…, Templates folder, Scripts folder, Snippets folder, console log |
| Lab notebook | Initials, Chemical folder, Only suggest chemicals of the asked class, Lab notes folder, Molecular weight property, Methods folder |
| Planning folders (planning kit on) | Inbox, Daily notes, Planning, Projects, Literature, Knowledge, How-tos, Meetings, Archive (empty = the default, e.g. 02 Projects), Find moved folders…, Due-date countdown (Off / only to-dos with countdown: true / every to-do with a due date: days left on the board card) |
| Snippet menu → Snippet icons | A page with one row per snippet: the icon shown beside the box, a Choose… button with a searchable grid of Obsidian's icons, or type a Lucide name. Empty keeps the snippet's own icon |
| Lab header | Data folder root (one for Windows, one for macOS / Linux) |
| Hazards | Layout, property names, collapsed / legend / sorting options |
Folder settings left empty are detected; the data folder roots are empty until you set them. Rename or move folders inside Obsidian and the folder settings follow; a folder moved outside Obsidian (Finder, File Explorer, a sync tool) is found again with Find moved folders. Settings changed on another device (Obsidian Sync, iCloud, Dropbox, Syncthing, Git) are read again when they arrive.
Open the command palette and type Lab Kit. There are no default hotkeys.
| Command | Does |
|---|---|
| Insert empty calc block | Adds a small example calc table at the cursor |
| Insert lab header block | Adds the hazard / data-folder header at the cursor |
| New lab entry | A new experiment note from the Lab Book Template in your Lab notes folder (needs Templater) |
| New chemical | A new note from the Chemical database template in your Chemical folder, opened as Untitled (needs Templater) |
| Review kit files | Opens the update preview |
| Manage kit files | Opens the list of kit files |
| Show what's new | Opens the What's new popup for this version |
| Find moved folders | For each folder in the settings that no longer exists (moved outside Obsidian), suggests where it went; Apply changes only the settings |
| Check hotkeys | Reports the keys the Hotkeys note recommends for the kit's functions and what Obsidian has now (also a button in Settings → Lab Kit); sets nothing |
| Check setup | Lists what the kits need (plugins, Templater and its scripts, the homepage's read-only mode, CSS snippets, folders) with a Fix for each missing item; nothing changes until you confirm |
| Tidy up notes | Shows the notes of an existing vault that don't match the kit layout, before and after; Change notes… rewrites only what you tick, after a backup and a second confirmation. One rule, Hubs: bring the page up to the current template, rewrites the page of project, topic and meeting series hubs from the kit's templates (keeping a project's goal and Related text and a topic's intro) and is never ticked by default |
With the planning kit on (Settings → Lab Kit → Built-in kit), these are added. Open meeting deck is desktop only.
| Command | Does |
|---|---|
| New to-do | A to-do note in the Planning folder's To-dos |
| Quick capture | An empty note in the Inbox, opened |
| Add to shopping list | Adds comma-separated items to Shopping list.md in the Planning folder |
| Sort inbox | Opens each Inbox note in turn and asks where it goes; Esc or Stop ends it |
| Archive old to-dos | Moves to-dos finished more than 30 days ago into the Archive folder |
| New meeting series | Asks name, how often, day, date of the first meeting, the deck path and (optional) the name of your own meeting note template; makes the series folder under Meetings and its hub note. Also a button on the Meetings hub |
| New meeting · New one-off meeting · Extra meeting now | A note for a meeting series (asks which when there are several); a one-off meeting uses the smaller kit template One-off meeting; Extra meeting now (also a button on each series hub) adds a meeting on a date you give without moving the schedule. A series hub's template property names your own meeting note template |
| Open meeting deck | Opens the deck location of this computer: set in the series' note (deck_windows / deck_mac) as a folder with all the decks in, or the path to one deck file |
| New project · New project note | A project hub, or a note inside a project |
| New concept | A knowledge note: asks title and topic, files it in the Knowledge folder under the topic. The New concept button on a topic hub skips the topic question |
| New topic hub | The index note of a topic folder under Knowledge (kind: hub, named like the folder): pick a topic without one or a new topic; a text area for what the topic is about, then a list of its notes. Project, topic and series hubs start with a back link to the hub one folder up, which follows folder renames |
| Roll over to-dos now | Carries unfinished to-dos over to today |
lab-kit folder inside it), Templater's template folder when it is empty (Set up only), and the Alt+S template in Templater's hotkeys.<data folder root>/<note name> on your computer and opens it in your file manager, only when you press it. The root is empty until you set it in Settings → Lab Kit → Lab header. Nothing else reads or writes outside your vault.Calc tables, the hazard header and the built-in kit work on mobile. The data-folder button is desktop only: on mobile the header shows "Data folder: desktop only". Snippet forms need Templater.
| Problem | Fix |
|---|---|
| Alt+S does nothing, or the forms ask one question at a time | Install Templater, run Check setup… and Fix the Templater rows (Settings → Lab Kit → Kit folders and setup), and set the Alt+S hotkey |
#NOTE? in an MW cell |
No chemical note with that name: check the spelling, or type the MW over the formula |
#PROP? in an MW cell |
The note has no molecular weight property (set Molecular weight property) |
#REF! |
The formula points at a deleted row, or a table name that doesn't exist or is used twice |
| A calc table looks like plain code | Lab Kit isn't enabled |
| Hazard table empty | Chemicals property empty, or the chemical notes have no H_Phrase list |
| "Folder … not found", or homepage lists empty after moving folders outside Obsidian | Command Find moved folders (or Check setup → Find): pick where each folder went |
More in the tutorial.
Found a bug or want a feature? Open an issue and say what you did, what you expected and what happened (a screenshot of the table helps). Pull requests are welcome; run npm test and npm run lint first.
npm install
npm run dev # builds into test-vault/.obsidian/plugins/lab-kit/ and watches
npm test # vitest
npm run lint
npm run build
npm run starter # new-vault settings + plugin list, from the kits, into dist/starter/
npm run tidy-fixture writes test-vault-tidy/, a small vault of old-style notes (from tests/fixtures/) to try Tidy up notes on; open it as its own vault, never your real one.
npm run starter writes dist/starter/: empty contract folders, Obsidian settings (plugin list, CSS snippets, Alt+S, Templater folders) and install-plugins.sh / .ps1, generated from the kits so they can't drift. Copy it into an empty folder, run the install script with Obsidian open, then Check setup. Steps in GETTING-STARTED.
Open test-vault/ as a vault in Obsidian to try changes. Never develop in your real vault. The kit files live in kits/ and are embedded in main.js at build.
MIT, see LICENSE.