From 9cccc0e12f421e69bef4d597516cf9981e42b8f2 Mon Sep 17 00:00:00 2001 From: nodemode-ai Date: Sat, 5 Dec 2026 22:36:08 -0500 Subject: [PATCH] docs(readme): the Form family README layout with live status and the feature tables as prose (0.14.1) Follows the released Form apps' README (FormCel, FormDeck, FormVis): a status badge of live, the formai.tools download link and a Download table, a four-cell summary, a Features grid of six pictures, Everything in the box and Formats as short lists in place of the 39-cell feature table and the gallery, then Agents, Extensions, Under the hood, Demo, Run it from source, Repository, Maintainers and License. The Important status block and the long Build it yourself section are gone (building is covered by the wiki Desktop page and the manual). No version change. Checked: counts --check in step, every linked file exists, no em dash or emoji. --- README.md | 264 ++++++++++++++++++++++++++---------------------------- 1 file changed, 126 insertions(+), 138 deletions(-) diff --git a/README.md b/README.md index f9822fdb..35fcf41d 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,10 @@

FormChem

- Chemistry; the structure drawing suite of the FormAI family.
- The family shell on a local engine, growing release by release into a drawing suite for molecules and reactions,
- with an MCP server so an agent works in the same window you see. Local-first, no account.

+ Chemistry; the structure drawing suite of the Form family.
+ Draw molecules and reactions, check and analyse them, predict spectra and turn them in 3D,
+ in one window with no account. Agents draw in the same window over MCP. +

version 0.14.1 @@ -13,152 +14,159 @@ Python and FastAPI macOS, Windows, Linux License: Apache-2.0 - Status: in development + Status: live

- Download FormChem on formai.tools · Run it from source + Download FormChem on formai.tools · + Run it from source

+
+

- Features · Gallery · Demos · Agents · Extensions · Under the hood · Run from source · Build it yourself + The FormChem window in the dark theme: paclitaxel (Taxol) drawn on a dark page with its wedges and hashed bonds, the tool rail on the left, and the Analysis panel on the right showing the name paclitaxel from the dictionary, the formula C47H51NO14, molecular weight 853.92 g/mol, exact mass, m/z, elemental analysis, cLogP, tPSA, donors, acceptors, rotatable bonds, two rule-of-five violations and the isotope pattern +
+ Paclitaxel on the dark page, with its name, formula, masses and properties in the Analysis panel.

- The FormChem window in the dark theme: paclitaxel (Taxol) drawn on a dark page with its wedges and hashed bonds, the tool rail on the left, and the Analysis panel on the right showing the name paclitaxel from the dictionary, the formula C47H51NO14, molecular weight 853.92 g/mol, exact mass, m/z, elemental analysis, cLogP, tPSA, donors, acceptors, rotatable bonds, two rule-of-five violations and the isotope pattern + Features · + In the box · + Agents · + Under the hood · + Download · + Run from source


-## Features - -FormChem draws structures and reactions: draw on the canvas with the mouse or the keyboard, annotate with arrows, brackets, shapes, tables and TLC plates, and the chemistry engine checks every change, reads reaction schemes, maps their atoms, works out the amounts, labels stereochemistry and computes properties with the method behind each number. Drawings go out as chemistry files and as pictures that open again as the drawing, through the clipboard to other programs, and whole files convert on the command line. Names turn into structures and structures into names, offline; 1H and 13C NMR spectra are predicted with the method and version beside every number; and measured spectra open from JCAMP-DX files with their peaks linked to atoms. Structures turn in 3D: built from the drawing with their stereo checked, with conformers, minimisation, dihedral scans, measurements and surfaces, placed on the page as 3D views, and proteins open from PDB and mmCIF files with their ligands. Compounds live in structure databases (one `.fcdb` file each) that you search by structure, formula and your own fields, browse as a table, gallery, form or plot, and fill from or write to SD, SMILES and CSV files, with a lab notebook of signed experiment entries beside them. A structure copied into another Form app stays a FormChem drawing and comes back editable, through a shared structure library every Form app reads. Everything can be drawn and read from the keyboard, with each atom spoken and the whole structure summarised, in element colours that stay apart for low vision and colour blindness. Peptides and nucleic acids come in and go out as HELM, and xtb and CREST run when you have installed them. Agents draw in the same window: they draw and edit structures and reactions, from names and HELM too, predict and read spectra, build in 3D, run xtb, search and fill databases and keep the structure library through 77 MCP tools, check their work with a picture of what you see, and every call is one undo step you can review, undo or stop. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + +

Drawings

.fchem documents kept by the engine, with undo per drawing (one step per gesture, command or agent call), autosave, Save, Save As, Save a Copy and Recent on Home. Files from other programs open as new drawings with a report of anything that changed on the way in, or File > Import adds them to the open drawing.

Canvas and tools

A tool rail with selection and lasso, fourteen bond kinds, chains, benzene, cyclopentadiene, rings of 3 to 8 and chairs, templates that attach to an atom or fuse onto a bond with a click, atom labels, text, eraser, hand and zoom. Structures render in the 1996 journal style with bundled Arimo, and the canvas patches only what changed.

Hover keys

Point at an atom or a bond and press a key: elements and two-letter symbols, charges, radicals, chains of 1 to 9 carbons, rings, phenyl, bond orders, wedges, hashes and double-bond placement. Arrow keys and Enter draw without the mouse.

Chemistry engine

RDKit in the engine works out canonical SMILES, CXSMILES, InChI, InChIKey, formula and masses after each change, flags valence problems on the canvas, and powers Clean Up, Lay Out, Standardise and Check Structure. The 2D layout scores several candidates and swings crowded groups apart, so Taxol's labels no longer touch.

Analysis panel

Formula, CIAAW 2024 masses, seven adducts and elemental analysis with your found values, plus cLogP, TPSA, molar refractivity, donors, acceptors, rotatable bonds, Lipinski, Veber and Ghose, each with its method, the isotope pattern, polymer formulas, and predicted 1H, 13C, IR and MS tables. Copy Analysis takes it all as text.

Arrange and style

Duplicate, flip, rotate by any angle, align and distribute, smart guides and nested groups; journal styles applied to a drawing you already have or a selection, style files, per-character text formatting and an emphasis red.

Reactions

Perceive Reactions reads each arrow's reactants, products, reagents and conditions; Space Reaction lines a scheme up and wraps it, conditions follow their arrow, arrows stretch to fit, and steps get footnotes. Atom mapping with reacting centres and a check badge on the arrow, balance with drawn coefficients, and reaction SMILES and RXN in and out.

Annotations

Fifteen arrow types and anchored electron-pushing arrows, plus signs, brackets, shapes, lines, tables, TLC plates, orbitals, pictures and attached captions, with handles, stacking order and groups.

Stoichiometry and templates

A stoichiometry panel for moles, equivalents, the limiting reagent and yields, insertable as a table, with a density table and CSV export, and 260 whole molecules to start from, plus a glassware gallery. Several pages with headers and footers, Find and rulers with guides.

Stereochemistry

CIP labels from the new rules (R, S, r, s, E, Z), enhanced stereo groups (abs, AND, OR) and the chiral flag, Assign Wedges, M and P for atropisomers and allenes, and abbreviations from a library of 221 (with typed labels such as CH2CH2OH read as chemistry) that contract and expand without losing an atom.

Queries and R-groups

Atom lists, generic atoms and query bonds drawn as tags, Find Substructure by selection or SMARTS, SMARTS and V3000 query molfiles, and R-group definitions with Markush enumeration.

Structure check

A panel of errors, warnings and notes with a code each, from valence and charges to wedges, overlaps and R-group gaps. Click a row to select its atoms, or fix wedges and abbreviations in one step.

Chemistry files

Molfile V2000 and V3000, SD, RXN, RD, SMILES, CXSMILES, reaction SMILES, SMARTS, InChI and InChIKey, CML, CDXML and CDX in and out, each export with a report of exactly what the format could not keep.

Pictures and print

PNG up to 1200 dpi, TIFF, JPEG, WebP, one-bit line art, SVG with embedded fonts or outlines, PDF, PDF/A and EPS, with the editable drawing kept inside so the picture opens again as the drawing. Print with scale, tiling, crop marks and a preview.

Clipboard

Copy puts the drawing, SMILES and a picture on the clipboard at once; Copy As picks SMILES, CXSMILES, Molfile, InChI, InChIKey, SMARTS, SVG, PNG or CDXML; Paste reads all of them back, and Paste Special lets you choose.

Command line

./formchem convert, batch, descriptors and render work on whole files and folders (10,000 SD records to SMILES in about a second and a half), with optional standardising and a report of every record that failed; ./formchem db creates, fills, searches and exports databases.

Dark page and grids

A dark drawing page, on by default, that keeps element colours readable and never reaches exports. Line, dot, cross, isometric and hexagonal grids with their own spacing, kept per drawing, and Snap to Grid.

Size on the sheet

Drag a corner handle, or use Arrange > Scale, Scale Up and Scale Down, to make structures larger or smaller on the page by percent or bond length, with their labels and line widths or without.

Names

Insert > Structure from Name reads "aspirin" or "(2R)-butan-2-ol" offline as you type, from a dictionary of 629 common names or a systematic IUPAC parser, with a confidence and the reason when it refuses. Paste a name to draw it; the Analysis panel names your structure, and a systematic name is shown only when it reads back to the same structure.

NMR prediction

Predict 1H and 13C NMR spectra with FormChem's own increment method: shifts with a confidence and an uncertainty, multiplets with J values, integrals, and the increments behind each shift. The spectrum lands beside the structure, linked to its atoms, titled with the method, version and frequency (holdout error 0.09 ppm for 1H, 1.1 ppm for 13C).

Spectra

Open IR, Raman, UV-Vis, MS and NMR spectra from JCAMP-DX files in every compression form, kept byte for byte in the drawing. The Spectrum editor zooms, picks peaks, integrates and switches transmittance and absorbance; peaks, integrals and multiplets link to atoms, and hovering one lights the other.

3D View

Build 3D from 2D keeps every wedge and double bond as drawn and checks each stereocentre from the 3D model (Taxol keeps 11 of 11). Wire, stick, ball and stick, space filling and cartoon; van der Waals, solvent surfaces with areas and volumes, and ESP; colour schemes, labels and hydrogen bonds; live distances, angles and dihedrals and bond rotation; a live link from 2D; a 3D view placed on the page keeps its angle and style. PNG at any size, stereo pairs and glTF out.

Conformers and energies

Conformer searches within an energy window with Boltzmann populations, MMFF94, MMFF94s or UFF minimisation, and relaxed dihedral scans plotted with their barrier, each energy shown with its force field and version. Edit the structure and its conformers go in the same undo step.

Proteins and ligands

PDB and mmCIF files, from disk or by PDB id, open as cartoon with the ligand in focus and waters hidden, with models, alternate locations, assemblies and the binding site; small-molecule CIF packs its cell. Extract Ligand turns a ligand into an editable structure with its coordinates; 3D SD files keep theirs. Export as MOL, SD, PDB or XYZ with every hydrogen.

Databases

Structure databases in one SQLite file (.fcdb) that any SQLite browser opens: your own fields (numbers with units, dates, choices, files, links and computed descriptors), Add to Database with duplicate rules for stereo and salts, and table, gallery, form and plot views that scroll 10,000 records without a stall. Import SD, RD, SMILES, CSV and TSV with a preview and a report of every bad record; export to SD, SMILES or CSV.

Search and hit lists

Exact (stereo, salts, charges and tautomers matched or ignored), substructure, Tanimoto similarity with scores, formula ranges such as C6-8N1, and every field, combined in All of, Any of and None of groups. Each search is a hit list to keep, export or combine; saved queries live in folders. Benzene among 9,997 records in 145 ms.

Lab notebook

Experiment entries in the same database: a reaction scheme with its stoichiometry computed, procedure and observations, products linked to their records, files and tags, searchable by words and by substructure. Sign an entry with a SHA-256 hash of its content; a later change shows "Modified after signing" and keeps the signed version. Export as self-contained HTML or JSON.

Live structures

Copy as Live Structure puts a structure into FormDeck, FormTxt or form.md as a picture with the FormChem drawing inside. The sibling app opens it in FormChem again with a formai://formchem/edit link or ./formchem edit-live; Save writes the new picture back with a higher revision, no path asked.

Structure library

Favourites, Recent, Templates and Live structures in a plain folder of SVG, PNG and molfiles that every Form app reads without FormChem running. Star a structure, save a template, insert or open from Window > Structure Library. A bar offers Reload or Keep Mine when a drawing's file changes on disk.

Biopolymers

Insert > Biopolymer from HELM reads peptides and nucleic acids as you type, disulfides and rings included, and Copy as HELM writes them back only when the HELM reads back to the same structure. 55 monomers written for FormChem from textbook structures.

Keyboard and screen readers

Focus Structure puts the focus on the drawing: Tab walks atoms, arrows follow bonds, Enter and an arrow draw a new bond. Every move is spoken ("Oxygen. 1 hydrogen. Single bond to Carbon."), and Describe Structure reads the formula, name, rings, functional groups and stereocentres.

Element colours

Standard, High contrast (every element at 7:1 or more on white) and Colour-blind safe (Okabe-Ito blue, vermillion, bluish green and reddish purple), applied to the canvas, pictures and the clipboard, switched without a flash.

xtb and CREST

GFN2-xTB or GFN-FF optimisations and single points with ALPB solvents, and CREST conformer searches, when you have installed the programs: energies in hartree and kcal/mol with the gap and the program's version. FormChem never ships or downloads them.

MCP server

104 tools over HTTP (with an agent token) and stdio: agents open and save drawings, draw from SMILES, reaction SMILES, molfiles or names, build and edit atom by atom by id, read structures back as SMILES, InChIKey, molfiles and names, render what you see, validate, predict NMR, open spectra and pick their peaks, build 3D conformers, scan and measure them, open PDB files and extract ligands, create, import into, search and export databases, add and find notebook entries, keep the structure library, draw from HELM, run xtb and CREST, convert files as the command line does, and run every menu command. Agent Activity lists each call with undo and Stop.

The family shell

Home, Preferences, twelve menus with full keyboard use (those that do not fit fold into More menus), Find a Command, the terminal and agent dock, Help and updates, in 26 interface languages.

Form extensions

Extensions installed by FormPortal run in a sandboxed frame from the Extensions menu and panel, and ask before they read or change a drawing.

Drawn like a journal

Structures and reactions in the 1996 journal style, with journal styles you can apply to a drawing you already have.

Chemistry that checks itself

RDKit and Indigo check every change and name the method and version behind every number shown.

Local-first

No account and no upload. Drawings and databases stay on your computer, and the engine listens on 127.0.0.1 only.

Agent-ready

104 MCP tools draw, edit and check in the window you see, each call one undo step you can review or stop.
-### Gallery +
+ +## Features - - + + - - + + - - + +
A reaction scheme on the dark page: salicylic acid plus acetic anhydride, with sulfuric acid over the arrow, giving aspirin plus acetic acid; below it the Stoichiometry panel at 10 mmol scale with masses, equivalents, the limiting reagent, a theoretical yield of 1802 mg and a yield of 81.0 percent
Reactions and stoichiometry. A scheme read into roles, with amounts, equivalents and the yield worked out as you type.
The 3D View panel beside a 2D drawing of paclitaxel: the molecule in ball and stick after an MMFF94 conformer search, with the list of conformers and their relative energies in kcal/mol, and the Measure tools for distance, angle and dihedral
3D View. Built from the drawing with every stereocentre kept, conformers with their energies, styles, surfaces and measurements.
+ A reaction scheme on the dark page: salicylic acid plus acetic anhydride, with sulfuric acid over the arrow, giving aspirin plus acetic acid; below it the Stoichiometry panel at 10 mmol scale with masses, equivalents, the limiting reagent, a theoretical yield of 1802 mg and a yield of 81.0 percent +
An aspirin synthesis read into roles, with its amounts and yield. +

Reactions and stoichiometry

+ Perceive Reactions reads reactants, products, reagents and conditions; Space Reaction lines a scheme up, conditions follow their arrow, and the stoichiometry panel works out moles, equivalents, the limiting reagent and yields. +
+ The 3D View beside a 2D drawing of paclitaxel: the molecule in ball and stick after an MMFF94 conformer search, with the list of conformers and their relative energies in kcal/mol, and the Measure tools for distance, angle and dihedral +
Paclitaxel in 3D, with its conformers and their energies. +

3D that fills the window

+ Build 3D from the drawing with every stereocentre kept, then turn, zoom and pan it across the whole window: conformers, minimisation, surfaces with ESP, measurements and proteins from PDB. +
The database workspace showing a structure database of 300 benzamide records as a gallery of structure cards with their numbers and formulas, the open databases, hit lists and saved queries in the left column, and Add Structure, Import and Export in the toolbar
Databases. One .fcdb file per database, 300 records imported from an SD file, searched by structure and shown as a gallery, table, form or plot.
A lab notebook entry titled Acetylation of salicylic acid with its date, author and tags, the reaction scheme drawn on white, the stoichiometry table computed from the scheme with its method, and the procedure text, with Sign, Export HTML and Export JSON buttons
Lab notebook. An experiment entry with its scheme, the stoichiometry computed from it, the procedure, and signing with a SHA-256 hash.
+ The database workspace showing a structure database of 300 benzamide records as a gallery of structure cards with their numbers and formulas, the open databases, hit lists and saved queries in the left column, and Add Structure, Import and Export in the toolbar +
A structure database of 300 records shown as a gallery. +

Structure databases

+ One .fcdb file per database, searched by structure, similarity, formula and your own fields, browsed as a table, gallery, form or plot. +
+ A lab notebook entry titled Acetylation of salicylic acid with its date, author and tags, the reaction scheme drawn on white, the stoichiometry table computed from the scheme with its method, and the procedure text, with Sign, Export HTML and Export JSON buttons +
A notebook entry with its scheme, stoichiometry and procedure. +

Lab notebook

+ Experiment entries beside the database, with the scheme's stoichiometry computed, products linked to records, and signing with a SHA-256 hash. +
The Structure Library dialog with tabs for Favourites, Recent, Templates and Live, showing twelve starred structures from aspirin and caffeine to quinine and vanillin with their formulas, and buttons to copy as a live structure, delete, unstar, open and insert
Structure library. Favourites, recent structures, templates and live structures in a plain folder every Form app reads.
FormChem's Home on the dark theme: a greeting, Start from a structure with New drawing, Open file and Paste SMILES or name, the file types it opens, recent drawings, and the Demos section with previews of aspirin, aspirin in two steps, the enantiomers, cholesterol in 3D and benzocaine with its NMR spectrum; the rail lists Templates with 260
Home. New drawings, files to open, recent drawings and the five demos, with the 260 whole-molecule templates, Databases, Trash and agent setup in the rail.
+ The Structure Library dialog with tabs for Favourites, Recent, Templates and Live, showing twelve starred structures from aspirin and caffeine to quinine and vanillin with their formulas, and buttons to copy as a live structure, delete, unstar, open and insert +
Favourites, recent structures, templates and live structures. +

Shared with the Form apps

+ A structure copied into FormDeck, FormTxt or form.md stays a FormChem drawing and comes back editable, through a structure library every Form app reads. +
+ FormChem's Home on the dark theme: a greeting, Start from a structure with New drawing, Open file and Paste SMILES or name, the file types it opens, recent drawings, and the Demos section with previews of aspirin, aspirin in two steps, the enantiomers, cholesterol in 3D and benzocaine with its NMR spectrum; the rail lists Templates with 260 +
Home, with the five demos and 260 whole-molecule templates. +

Start from a demo

+ New drawings, files to open, recent drawings and five demos, with templates that are whole starter and real molecules, never single parts. +
-### All fourteen phases are built - -0.14.0, the parity pass, is the last phase of the plan. It worked through the gaps [`docs/PARITY.md`](docs/PARITY.md) listed in the order a chemist would miss them, and now every v1 requirement of the specifications FormChem is measured against is either met (443 rows) or carries a written decision saying what FormChem does instead (117 rows): - -- Reaction schemes that hold together: Space Reaction, conditions that follow their arrow, stretched arrows, footnotes and wrapping, map numbers and reacting centres by hand, drawn coefficients and a check badge; a density table and CSV from the stoichiometry grid -- Typed condensed labels, a 221-entry abbreviation library you can add to, atom and bond properties on hover keys, atom numbers and a periodic table picker -- Ring and template fusion by clicking, new bond and ring tools, selection drill-down, smart guides and a fixed key map with its conflicts listed; journal styles on an existing drawing and per-character text formatting -- Journal-ready pictures and a Print dialog; FASTA, UTF-16, superatom Sgroups and CDXML styling; atropisomers and allenes, CIAAW weights, adducts and predicted spectra tables; 3D energy terms, constraints, surfaces, bond rotation, proteins by id and crystals; a periodic table and a constants window; pages, table and TLC editing and undo of agent changes; and a template library of whole molecules only -- A performance pass on large documents, a polish pass on dialogs and menus, and the 0.13.0 and 0.14.0 strings in all 25 languages - -### Try it without installing - -Three demos open by double-click from this repository, with no engine, install or network: [`demos/drawing`](demos/drawing/index.html) (the canvas, tool rail, hover keys, the formula and SVG and PNG export, on aspirin), [`demos/reactions`](demos/reactions/index.html) (a two-step aspirin synthesis with its curved-arrow mechanism and the stoichiometry grid) and [`demos/3d`](demos/3d/index.html) (aspirin, caffeine and cholesterol with styles, surfaces, conformers and measurements). In the app, Help > Demos opens five prepared drawings from Home. +Every feature in detail: [`docs/MANUAL.md`](docs/MANUAL.md). How FormChem compares, requirement by requirement, with the specifications it is measured against: [`docs/PARITY.md`](docs/PARITY.md). + +## Everything in the box + +- **Drawing:** `.fchem` drawings with undo per drawing, autosave and Recent; a tool rail with selection and lasso, fourteen bond kinds, chains, rings of 3 to 8 and chairs, templates that attach to an atom or fuse onto a bond with a click, atom labels, text, eraser, hand and zoom; hover keys for elements, charges, chains, rings and bonds, and arrow keys and Enter to draw without the mouse. +- **Annotations and layout:** fifteen arrow types and anchored electron-pushing arrows, plus signs, brackets, shapes, tables, TLC plates, orbitals, pictures and captions; duplicate, flip, rotate, align, distribute, smart guides and groups; several pages with headers and footers; a dark page on by default, five grid types and Snap to Grid; structures scaled on the sheet by percent or bond length. +- **Styles:** the 1996 journal style with bundled Arimo, journal styles applied to a drawing or a selection, style files, per-character text formatting and an emphasis red. +- **Chemistry engine:** canonical SMILES, CXSMILES, InChI, InChIKey, formula and masses after each change; valence problems flagged on the canvas; Clean Up, Lay Out, Standardise and a structure check that selects the atoms behind each issue. +- **Stereo and queries:** CIP labels from the new rules, enhanced stereo groups, M and P for atropisomers and allenes; 221 abbreviations, with typed labels such as CH2CH2OH read as chemistry; atom lists, query bonds, Find Substructure, SMARTS, and R-groups with Markush enumeration. +- **Reactions:** reaction roles, Space Reaction with wrapping, conditions that follow and stretch their arrow, footnoted steps, atom mapping with reacting centres and a check badge, balancing with drawn coefficients, and a stoichiometry panel with a density table and CSV export. +- **Analysis:** formula, CIAAW 2024 masses, seven adducts, elemental analysis with your found values, cLogP, TPSA, molar refractivity, donors, acceptors, rotatable bonds, Lipinski, Veber and Ghose, the isotope pattern, polymer formulas, and predicted 1H, 13C, IR and MS tables, each with its method. +- **Names and spectra:** Structure from Name offline from a dictionary of 629 names or a systematic IUPAC parser; names for what you draw when they read back the same; 1H and 13C NMR predicted by FormChem's own increment method; IR, Raman, UV-Vis, MS and NMR spectra from JCAMP-DX files, with peaks and integrals linked to atoms. +- **3D:** Build 3D from 2D with every stereocentre checked, wire, stick, ball and stick, space filling and cartoon, surfaces with areas, volumes and ESP, measurements and bond rotation, conformer searches with Boltzmann populations, MMFF94, MMFF94s and UFF minimisation, dihedral scans, PDB and mmCIF by file or PDB id with their ligands, crystal packing from CIF, and 3D views placed on the page. +- **Databases and the notebook:** `.fcdb` databases with your own fields, duplicate rules, import from SD, RD, SMILES, CSV and TSV with a report of every bad record, exact, substructure, similarity, formula and field searches, hit lists and saved queries, and a lab notebook with signed entries exported as HTML or JSON. +- **Family integration:** live structures in FormDeck, FormTxt and form.md that open again with a `formai://formchem/edit` link, a shared structure library, a bar that offers Reload or Keep Mine when a file changes on disk, and HELM for peptides and nucleic acids. +- **Accessibility:** a keyboard focus that walks atoms and bonds, every move spoken by screen readers, Describe Structure, and Standard, High contrast and Colour-blind safe element colours. +- **xtb and CREST:** GFN2-xTB and GFN-FF optimisations and single points with ALPB solvents, and CREST conformer searches, when you have installed the programs; FormChem never ships or downloads them. +- **Reference:** a periodic table window with sourced element data and isotopes, and a constants and unit converter with CODATA 2022 values. +- **The window:** Home, Preferences, twelve menus with full keyboard use, Find a Command, the terminal and agent dock, Help and updates, Form extensions from FormPortal, and 26 interface languages. + +### Formats + +- **Native:** `.fchem` drawings and `.fcdb` databases +- **Chemistry in and out:** Molfile V2000 and V3000, SD, RXN, RD, SMILES, CXSMILES, reaction SMILES, SMARTS, InChI and InChIKey, CML, CDXML and CDX, HELM and FASTA in, each export reporting what the format could not keep +- **3D:** PDB, mmCIF and CIF in; MOL, SD, PDB and XYZ out; glTF for the 3D view +- **Spectra:** JCAMP-DX in every compression form +- **Pictures:** PNG up to 1200 dpi, TIFF, JPEG, WebP, one-bit line art, SVG with fonts or outlines, PDF, PDF/A and EPS, each keeping the editable drawing inside; Print with scale, tiling, crop marks and a preview +- **Clipboard:** the drawing, SMILES and a picture at once, Copy As in each chemistry format, and Paste Special ## Built for agents -Claude Code, Codex, Cursor, Antigravity or any MCP client draws in the window you have open. `draw_from_smiles {"smiles": "CC(=O)Oc1ccccc1C(=O)O"}` lays aspirin out in free space on the page and answers with its ids, SMILES, InChIKey, formula and a picture drawn by the window's own renderer; `render`, `get_structure` and `validate` check the work; `get_atoms` and 14 edit tools (`add_atom`, `add_bond`, `set_charge`, `set_stereo`, `replace_substructure`, `move`, `scale`, `add_arrow`, `add_reaction` and more) build and change structures by id; `new_document`, `open_document`, `save_document` and `close_document` handle drawings; `convert` and `batch_convert` give the command line's exact output. From 0.9.0 `draw_from_name {"name": "caffeine"}` draws a name and says how it was read, `name_structure` names what is drawn, `predict_nmr` and `predict_spectrum` give predicted 1H and 13C NMR with their method and version, and `open_spectrum`, `spectrum_data`, `spectrum_peaks`, `spectrum_pick_peaks`, `spectrum_integrate` and `spectrum_export` work on JCAMP-DX spectra. From 0.10.0 `build_3d` builds a structure in 3D and says whether every stereo label was kept, `conformers_3d`, `minimise_3d`, `scan_dihedral` and `measure_3d` give energies and geometry with their force field and version, `open_3d_structure` opens PDB, mmCIF, SDF and MOL files, `extract_ligand` turns a bound ligand into a structure, and `export_3d` writes MOL, SDF, PDB or XYZ. From 0.11.0 `db_list`, `db_create` and `db_open` reach structure databases, `db_import` fills one and reports every bad record, `db_search {"smiles": "c1ccccc1"}` answers a hit list you see in the window too, `db_get_record`, `db_add_record` (which refuses a duplicate until the agent chooses) and `db_update_record` work on records, `db_export` writes SD, SMILES or CSV, and `nb_add_entry` and `nb_search` keep lab notebook entries, which only you sign. From 0.12.0 `library_list`, `library_add` and `live_structure_object` reach the shared structure library and the object a sibling app keeps, `draw_from_helm {"helm": "PEPTIDE1{G.G}$$$$"}` draws a peptide or nucleic acid, and `xtb_optimise` and `crest_conformers` run xtb and CREST when you have installed them. The window's commands (`list_commands`, `run_command`), Form extensions, handoffs and the reaction and analysis tools are there as before. - -Every change is one undo step, labelled with the tool in Edit > Undo. Reading is always open; the window asks before an outside agent changes anything, the title bar shows which agent is editing with a Stop button, and Window > Agent Activity lists every call with undo for the latest one. The HTTP endpoint needs the agent token, which `./formchem agents install` writes into the agent configs; stdio clients send it themselves. An agent set up for 0.7.0 over HTTP needs `./formchem agents install` once more. +The window, the command line and the MCP server call the same commands, so an agent draws in the window you have open. `draw_from_smiles {"smiles": "CC(=O)Oc1ccccc1C(=O)O"}` lays aspirin out on the page and answers with its ids, SMILES, InChIKey, formula and a picture from the window's own renderer. The 104 tools also draw from names and HELM, edit atom by atom by id, read structures back, predict spectra, build in 3D, search and fill databases, keep the structure library, run xtb and convert files as the command line does. ```sh -./formchem agents install # writes .mcp.json (with the agent token), .codex/config.toml, .cursor/mcp.json and Antigravity's ~/.gemini/config/mcp_config.json, installs the skills -./formchem agents token # prints the agent token for HTTP MCP (Authorization: Bearer ) +./formchem agents install # register FormChem with Claude Code, Codex, Cursor and Antigravity, and install the skills +./formchem agents token # print the agent token for HTTP MCP (Authorization: Bearer ) ./formchem mcp # MCP server on stdio for Claude Code, Codex, Cursor, Antigravity and Claude Desktop -./formchem cli list # the window's command catalogue; run needs the window open and counts as an outside agent (it asks there) +./formchem cli list # the window's command catalogue ``` -Every tool, its arguments and its result: [`docs/AGENTS.md`](docs/AGENTS.md). Instructions for coding agents in this repository: [`AGENTS.md`](AGENTS.md). +Every change is one undo step labelled with its tool. Reading is always open; the window asks before an outside agent changes anything, the title bar shows which agent is editing with a Stop button, and Window > Agent Activity lists every call. Every tool, its arguments and its result: [`docs/AGENTS.md`](docs/AGENTS.md). Instructions for coding agents in this repository: [`AGENTS.md`](AGENTS.md). ## Extensions -FormChem hosts Form extensions (Form Extension Contract, API 1): FormPortal installs them, form.ext runs them from a folder while you make them. They appear in the Extensions menu, the Extensions panel and the command palette, run in a sandboxed frame, and ask before they read or change a document. Agents reach them with the MCP tools `extensions_list` and `extension_command` or `./formchem cli extensions`. +FormChem hosts Form extensions (Form Extension Contract, API 1): FormPortal installs them and form.ext runs them from a folder while you make them. They run in a sandboxed frame from the Extensions menu and panel, and ask before they read or change a drawing. See [`docs/EXTENSIONS.md`](docs/EXTENSIONS.md). ## Under the hood -- **Engine:** a FastAPI service holds every document; each change is a JSON op with an inverse, broadcast to every window and agent. RDKit and Indigo are the chemistry core. -- **Window:** vanilla TypeScript and Vite, with an inline-SVG icon set and no UI framework. -- **Desktop:** a Tauri 2 shell around the same window, with the engine frozen by PyInstaller. On macOS it ships as a folder inside the app, so nothing is unpacked at launch (the one-file engine it replaces made the app take about 30 seconds to open); on Linux and Windows it is still a one-file sidecar. Files the system hands the app open as File > Open does, and the engine carries its whole data folder. -- **Pictures:** built from the drawing off screen, never from the canvas; PDF and EPS come from FormChem's own writer, with fontTools for the label fonts. -- **Agents:** the drawing and edit tools build JSON ops in the engine and apply them as one transaction, so they work with or without a window; pictures for agents come from the window's own renderer over the live channel, with an RDKit fallback when no window is open. One function logs every call for Agent Activity. -- **Names and spectra:** FormChem's own offline name engine, NMR increment predictor and JCAMP-DX reader, each behind a registry so that OPSIN or a data-backed predictor can be added later without changing the window or the tools. No name or shift database is copied; spectrum points are computed on request and never stored in the drawing. -- **3D:** RDKit's ETKDGv3, MMFF94 and UFF in the engine, FormChem's own PDB and mmCIF readers and glTF writer, and 3Dmol.js in the window, loaded only when a 3D view first opens. Conformers live in the drawing and drop in the same undo step when the structure they were built from changes, in the engine and in the window alike. -- **Databases:** one SQLite file per database with plain-English tables, specified in [`docs/DATABASE.md`](docs/DATABASE.md). Searches screen fingerprints held in memory as numpy arrays before RDKit confirms a match, imports and exports run as background jobs in batches, and the window pages records in blocks of 100 into pooled rows, so large tables never rebuild. -- **Family integration:** the shared structure library is plain files written atomically, specified for sibling apps in [`docs/LIVE_STRUCTURES.md`](docs/LIVE_STRUCTURES.md); a live drawing is an ordinary drawing linked to its library item, and the desktop shell registers `formai://` with tauri-plugin-deep-link. HELM is read and written by FormChem's own parser and monomer data, and xtb and CREST (LGPL-3.0) run only as separate programs you install. -- **Format:** `.fchem` is a zip package around `document.json`, specified in [`docs/FORMAT.md`](docs/FORMAT.md), which both the engine and the window implement. +- **Engine:** a FastAPI service on 127.0.0.1:8220 holds every document; each change is a JSON op with an inverse, broadcast to every window and agent. RDKit and Indigo are the chemistry core. +- **Window:** vanilla TypeScript and Vite, with inline SVG icons and no UI framework; the canvas patches only what changed. +- **Desktop:** a Tauri 2 shell with the engine frozen by PyInstaller and its whole data folder inside, registering FormChem's file types, document icons and the `formai://` link. +- **Names, spectra and 3D:** FormChem's own name engine, NMR increment predictor and JCAMP-DX reader behind registries; RDKit's ETKDGv3, MMFF94 and UFF in the engine and 3Dmol.js in the window, loaded only when a 3D view first opens. +- **Databases:** one SQLite file per database with plain-English tables, specified in [`docs/DATABASE.md`](docs/DATABASE.md); searches screen fingerprints in memory before RDKit confirms a match. +- **Format:** `.fchem` is a zip package around `document.json`, specified in [`docs/FORMAT.md`](docs/FORMAT.md). + +## Download + +| Platform | Download | Release | +|---|---|---| +| macOS | [Download FormChem for macOS](https://formai.tools/get/formchem/macos) | [FormChem releases on FormCompiler](https://github.com/nodemode-dev/formcompiler/releases?q=formchem-v&expanded=true) | +| Windows | [Download FormChem for Windows](https://formai.tools/get/formchem/windows) | [FormChem releases on FormCompiler](https://github.com/nodemode-dev/formcompiler/releases?q=formchem-v&expanded=true) | +| Linux | [Download FormChem for Linux](https://formai.tools/get/formchem/linux) | [FormChem releases on FormCompiler](https://github.com/nodemode-dev/formcompiler/releases?q=formchem-v&expanded=true) | + +All FormChem builds are compiled and released from [FormCompiler](https://github.com/nodemode-dev/formcompiler); this repo holds the source. + +## Demo + +Three demos open by double-click from this repository, with no engine, install or network: [`demos/drawing`](demos/drawing/index.html) (the canvas, tool rail, hover keys and export, on aspirin), [`demos/reactions`](demos/reactions/index.html) (a two-step aspirin synthesis with its curved-arrow mechanism and the stoichiometry grid) and [`demos/3d`](demos/3d/index.html) (aspirin, caffeine and cholesterol with styles, surfaces, conformers and measurements). In the app, Home and Help > Demos open five prepared drawings. ## Run it from source @@ -167,49 +175,29 @@ Prefer it in your browser, or want to contribute? Run the web UI straight from t **Requires:** Python 3.12+ and Node 20.19+. ```sh -git clone https://github.com/nodemode-dev/formchem.git +git clone git@github.com:nodemode-dev/formchem.git cd formchem ./formchem install # backend venv and frontend packages -./formchem # web UI at http://localhost:5220 +./formchem # engine on 127.0.0.1:8220, web UI at http://localhost:5220 ``` -`./formchem desktop dev` opens the desktop window instead. On Windows use `formchem.bat install` and `formchem.bat`. The engine listens on `127.0.0.1:8220` (MCP at `/mcp`); `FORMCHEM_DATA_DIR` moves the data folder from `~/formchem`. - -> [!IMPORTANT] -> **Status:** in development, in a public repository since 5 December 2026. This version draws, checks and analyses structures and reactions, with stereochemistry, query structures and calculated properties, from 0.7.0 reads and writes the common chemistry files, exports pictures, prints, copies and pastes, and converts files on the command line, from 0.8.0 lets agents draw, edit, check and convert directly, from 0.9.0 reads and writes chemical names, predicts NMR spectra and opens JCAMP-DX spectra, from 0.10.0 builds structures in 3D, searches conformers, opens PDB and mmCIF files and extracts their ligands, from 0.11.0 keeps structure databases and a lab notebook, from 0.12.0 shares live structures and a structure library with the other Form apps, works from the keyboard with spoken atoms, reads and writes HELM, and runs xtb and CREST you install, and from 0.13.0 opens the files the system hands the desktop app (databases, PDB, CIF, mmCIF and JCAMP-DX included) with document icons for `.fchem` and `.fcdb`, carries its whole data folder in the desktop app so names and HELM work there, and comes with demos, the manual and a parity score, and from 0.14.0, the parity pass, lays out reaction schemes, applies journal styles to drawings you have, fuses rings and templates by clicking, reads condensed labels, keeps several pages, exports journal-ready pictures, predicts IR, MS and NMR tables, and adds 3D energy terms, surfaces, proteins by id and crystal packing, a periodic table and 27 agent tools. 0.14.1 is the current release (0.14.0 with a 3D View that fills the window), and with it all fourteen phases of the plan are built. The 0.7.0 to 0.14.0 desktop apps have not been run on a Mac or on Windows yet (the 0.13.0 and 0.14.0 Linux packages were built through formcompiler and run), 0.8.0's agent tools were checked over stdio and HTTP, 0.9.0's and 0.10.0's in process and 0.11.0's and 0.12.0's over HTTP, not yet with a real Claude Code or Codex client, the NMR accuracy figures rest on approximate reference shifts, the 3D View ran on software WebGL only, no sibling app has opened a live structure yet, no real screen reader has been run, and xtb and CREST were checked with stand-in programs only. Nothing is built or released for download yet. - -**Contributing:** branch from `main`, keep changes to source here, and leave packaging and releases to FormCompiler. See [`CONTRIBUTING.md`](CONTRIBUTING.md), [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md), [`.docs/BRANCHING.md`](.docs/BRANCHING.md) and [`AGENTS.md`](AGENTS.md). Report security issues privately as [`SECURITY.md`](SECURITY.md) describes. - -## Build it yourself - -The desktop app builds from this repository on the system it is for. Released builds come from FormCompiler, which signs them; a build you make is unsigned and has no update key. - -**macOS and Linux.** `./build_app` (the same as `./formchem desktop build`) does everything from a fresh clone and writes `build_app.log`: - -1. Checks the system: the Xcode Command Line Tools on macOS; on Linux WebKitGTK 4.1 and the Tauri build packages, which it offers to install with apt-get (Fedora gets the dnf line). Then Python 3.12+, Node 20.19+, and Rust from rustup, which it offers to install when missing (`--yes` answers for you). It stops when rustc and cargo come from different installs or rustc builds for the wrong architecture. -2. Creates `backend/venv` and installs the engine's packages and PyInstaller (`requirements*.txt`, the macOS files on a Mac), and runs `npm ci` in `frontend/`; both are skipped when nothing changed since the last build (`--reinstall` forces them). It checks that the Tauri CLI and every Tauri plugin share major.minor with their crates in `Cargo.lock`. -3. Builds the window (`npm run build`) and freezes the engine with PyInstaller, with the built window, the notices, the template library and the engine's whole data folder (names, HELM monomers, demos) inside, and RDKit, Indigo and fontTools collected. On macOS the engine is a folder copied to `src-tauri/engine`, flattened so the bundle can carry it and signed when `APPLE_SIGNING_IDENTITY` is set; on Linux it is one file, `src-tauri/binaries/formchem-engine-`, which must pass `--selfcheck`. -4. Bundles with Tauri: `FormChem.app` and a `.dmg` on macOS (registered with Launch Services so `.fchem` and `.fcdb` files show their document icons), a `.deb`, `.rpm` and AppImage on Linux (the `.deb` and `.rpm` install FormChem's file types and document icons), under `src-tauri/target/release/bundle/`. `--bundles`, `--debug`, `--target`, `--clean` and `--config FILE|JSON` (extra Tauri config, as FormCompiler passes it) change that. - -The same steps one at a time: `./formchem install` (the venv with the engine's packages, plus the optional ones unless `--lite`, and `npm install`), `./formchem install-desktop` (PyInstaller into the venv, then it stops with the next step if Rust or WebKitGTK is missing, installs the Tauri CLI if needed and runs `./formchem desktop check`), and `./formchem desktop build`. - -**Windows.** `build_app.bat` does the same from a fresh clone (`--yes` installs Rust with winget, `--open` opens the output folder), logging to `build_app.log`. Step by step: `formchem.bat install`, `formchem.bat install-desktop` (PyInstaller and the Tauri CLI, then the toolchain check), and `formchem.bat desktop build`, which builds the window, freezes a one-file engine without a console window that must pass `--selfcheck`, and bundles an `.msi` and an NSIS `.exe` installer in `src-tauri\target\release\bundle`. +`./formchem desktop dev` opens the desktop window instead, and `./build_app` builds the desktop app (macOS and Linux; Rust is also needed). On Windows use `formchem.bat install`, `formchem.bat` and `build_app.bat`. `FORMCHEM_DATA_DIR` moves the data folder from `~/formchem`. The wiki's [Desktop](.docs/wiki/Desktop.md) page and the manual's [Troubleshooting](docs/MANUAL.md#troubleshooting) cover building in detail. -You need Python 3.12+, Node 20.19+ and Rust everywhere, plus Xcode's Command Line Tools on macOS, WebKitGTK 4.1 on Linux, and WebView2 on Windows (part of Windows 11). The first build compiles several hundred Rust crates. [`.docs/wiki/Desktop.md`](.docs/wiki/Desktop.md) explains the shell and the engine folder, and the manual's [Troubleshooting](docs/MANUAL.md#troubleshooting) and the wiki's [Troubleshooting](.docs/wiki/Troubleshooting.md) list every stop with its fix. +**Contributing:** branch from `main`, keep changes to source here, and leave packaging and releases to FormCompiler. See [`CONTRIBUTING.md`](CONTRIBUTING.md), [`.docs/BRANCHING.md`](.docs/BRANCHING.md) and [`AGENTS.md`](AGENTS.md). Report security issues privately as [`SECURITY.md`](SECURITY.md) describes. ## Repository | Path | What it is | |---|---| -| `backend/` | FastAPI engine: documents, chemistry, reactions and analysis, names, NMR prediction and spectra, 3D (conformers, force fields, PDB and mmCIF), structure databases and the lab notebook, the shared structure library and live structures, the file watch, the structure description, HELM, xtb and CREST jobs, file formats and pictures, the conversion command line and edit-live, templates, live channel, terminal dock, extensions, MCP and the agent tools, the agent call log | -| `frontend/` | Vanilla TypeScript and Vite window: the drawing canvas and tools, spectra and the Spectrum editor, the 3D View, the database workspace and the notebook, the Structure Library, keyboard focus and the screen reader announcer, the HELM and xtb dialogs, export, print and clipboard, shell, menus, Home, Preferences, dock | -| `setup/` | Install, boot, build, freeze, convert and agent setup scripts | -| `src-tauri/` | Desktop shell; it starts the engine folder on macOS and the engine sidecar elsewhere, registers the `formai://` link, FormChem's file types and document icons | -| `demos/` | Three offline browser demos (drawing, reactions, 3D) built from the window's code; each opens from its folder with no engine | +| `backend/` | FastAPI engine: documents, chemistry, reactions, analysis, names, spectra, 3D, databases, the structure library, formats and pictures, MCP and the agent tools | +| `frontend/` | Vanilla TypeScript and Vite window: canvas and tools, panels, the 3D View, the database workspace, shell, menus, Home, Preferences, dock | +| `src-tauri/` | Tauri 2 desktop shell | +| `setup/` | the scripts behind `./formchem` | +| `demos/` | three offline browser demos built from the window's code | Its size, in non-blank lines: about 55,500 of TypeScript, 2,600 of CSS, 42,900 of Python, 804 of Rust (product code, tests excluded, counted by `./formchem counts`; `./formchem counts --check` fails when this line drifts from the code). -Manual: [`docs/MANUAL.md`](docs/MANUAL.md) · Parity with the specifications: [`docs/PARITY.md`](docs/PARITY.md) · Docs: [`.docs/wiki`](.docs/wiki) · Extensions: [`docs/EXTENSIONS.md`](docs/EXTENSIONS.md) · Formats: [`docs/FORMATS.md`](docs/FORMATS.md) · Names: [`docs/NAMES.md`](docs/NAMES.md) · Spectra and NMR: [`docs/SPECTRA.md`](docs/SPECTRA.md) · 3D: [`docs/3D.md`](docs/3D.md) · Databases: [`docs/DATABASES.md`](docs/DATABASES.md) and the contract [`docs/DATABASE.md`](docs/DATABASE.md) · Live structures: [`docs/LIVE-STRUCTURES.md`](docs/LIVE-STRUCTURES.md) and the contract [`docs/LIVE_STRUCTURES.md`](docs/LIVE_STRUCTURES.md) · Accessibility: [`docs/ACCESSIBILITY.md`](docs/ACCESSIBILITY.md) · HELM: [`docs/HELM.md`](docs/HELM.md) · Command line: [`docs/CLI.md`](docs/CLI.md) · Agent tools: [`docs/AGENTS.md`](docs/AGENTS.md) · Agents: [`CLAUDE.md`](CLAUDE.md), [`AGENTS.md`](AGENTS.md) · Contributing: [`.docs/BRANCHING.md`](.docs/BRANCHING.md) +Docs: [`CHANGELOG.md`](CHANGELOG.md), [`docs/MANUAL.md`](docs/MANUAL.md), [`docs/PARITY.md`](docs/PARITY.md), [`docs/FORMATS.md`](docs/FORMATS.md), [`docs/3D.md`](docs/3D.md), [`docs/SPECTRA.md`](docs/SPECTRA.md), [`docs/NAMES.md`](docs/NAMES.md), [`docs/DATABASES.md`](docs/DATABASES.md), [`docs/LIVE-STRUCTURES.md`](docs/LIVE-STRUCTURES.md), [`docs/ACCESSIBILITY.md`](docs/ACCESSIBILITY.md), [`docs/HELM.md`](docs/HELM.md), [`docs/CLI.md`](docs/CLI.md), [`.docs/wiki`](.docs/wiki) · Agents: [`CLAUDE.md`](CLAUDE.md), [`AGENTS.md`](AGENTS.md)
@@ -226,6 +214,6 @@ Code owners are set in [`.github/CODEOWNERS`](.github/CODEOWNERS). ## License -FormChem is licensed under the Apache License 2.0 ([`LICENSE`](LICENSE), SPDX `Apache-2.0`). Copyright 2026 NodeAgentc, Inc. Third-party notices: [`NOTICE.md`](NOTICE.md). +FormChem is licensed under the Apache License 2.0 ([`LICENSE`](LICENSE), SPDX `Apache-2.0`). Copyright 2026 NodeAgentc, Inc. Third-party notices: [`NOTICE.md`](NOTICE.md) (what each component is and why) and [`THIRD-PARTY-NOTICES.txt`](THIRD-PARTY-NOTICES.txt) (their full licence texts). Other vendors' product names appear only to name file formats. FormChem is an independent project and is not affiliated with or endorsed by them.