Skip to content

Databases

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

Databases

From 0.11.0 FormChem keeps compounds in structure databases. A database is one .fcdb file (a SQLite file any SQLite browser opens), so copying the file copies everything: records, your fields, files, hit lists, saved queries, forms and the lab notebook. The full guide is docs/DATABASES.md; the file and its routes are defined in docs/DATABASE.md.

A database in three steps

  1. File > New Database..., give it a title (it goes to the Databases folder of the data folder unless you choose one).
  2. Database > Import Records..., pick an SD, SMILES, CSV or TSV file, check the column mapping, press Check to see the counts, then Import.
  3. Click Structure beside the search bar with a ring drawn in a drawing, choose Substructure, and the hits appear as a hit list. Database > Export Records... writes them to SD.

The workspace

Part What it does
Left column open databases, hit lists (newest first, with counts) and saved queries in folders
Search bar names, ids, formulas (C6-8N1) and SMILES; Structure searches with your drawing
Views Table, Gallery, Form, Plot and Notebook, sharing one selection
Toolbar buttons Import, Export, Add Structure, Advanced Search and the gear menu (settings, fields, Save Query, Combine Hit Lists, New Notebook Entry)

File > Databases (Ctrl+Shift+D, Cmd+Shift+D on a Mac) shows and hides the workspace; Home's Databases list opens one. In a browser window, File > Open of an .fcdb file or a drop on Home copies it into the Databases folder and opens it.

Records and fields

  • The table sorts by any column, resizes, hides and freezes columns, and edits a field in place (double-click; Enter saves, Escape cancels). It loads rows as you scroll, so 10,000 records scroll at once.
  • Database > Fields... adds your own fields: text, numbers with units, dates, yes or no, choices, structures, files, links to other records, and computed descriptors (cLogP, TPSA and others) that follow the structure and name their method.
  • Structure > Add to Database registers a structure from a drawing. The rules in Database > Database Settings... decide what a duplicate is (stereo matched or ignored, salts stripped or kept); a dialog then offers Open Existing, Add as New Batch or Add Anyway. Registration numbers are never reused.
  • Enter on a record shows its details and files; Open in Drawing opens it as a drawing.

Searching

Search How
Exact the same compound, stereo, salts, charges and tautomers matched or ignored
Substructure contains the drawn structure (or a SMARTS in Advanced Search)
Similarity Tanimoto on Morgan fingerprints at or above a threshold (0.7), each hit with its score
Formula element counts or ranges, C6-8H*N1O0-2
Fields text, numbers, dates, choices, empty or not

Advanced Search... combines terms in All of, Any of and None of groups and can search within the current hit list. Every search becomes a hit list: keep it, rename it, export it, or combine two by union, intersection or difference. Save Query... keeps a query in a folder to run again.

Plot

The Plot view draws a histogram of one field or a scatter of two with a least-squares line and R squared, coloured by a third field if you like. Drag a rectangle or lasso and choose Hit List from Selection.

Import and export

Import reads SD (V2000 and V3000), RD, SMILES, CSV and TSV files and .fchem drawings, maps columns to fields (or new fields), and runs as new records, appended records or a merge that updates matching records. Check counts what would happen first. A bad record never stops an import; the report lists each one with its number and a plain reason. Export writes SD (every field as a data item), SMILES or CSV; an SD file exported and imported again keeps every InChIKey and field value.

When a database is read-only

A database another FormChem (or the command line) has open opens read-only and says why; you can browse, search and export, but not change it.

Not yet

  • The desktop app's file choosers, Link File and dropping an .fcdb file on the desktop window were not tried for 0.11.0.
  • The workspace covers the in-window menu bar while it is open; its toolbar and gear menu carry the commands.
  • Record values, hit list names, saved query names and entry titles show as typed in every language; RDKit's own messages stay in English.

See also Lab Notebook, Command Line for ./formchem db, and Agents for the database tools.

Clone this wiki locally