Skip to content

charnley/smarts101

Repository files navigation

SMARTS 101

Screenshot

Interactively build, test and debug SMARTS queries and reactions. Static-file web application with live results. Like regex101.com but for SMARTS.

Features

  • Quires write SMARTS patterns and see highlighted matches across multiple molecules in real-time
  • Reactions query reactions with separate reactant/product highlights and per-fragment
  • Syntax explanation tree-sitter powered breakdown atom, bond, and recursive expression
  • Molecule examples druglike compounds, amino acids, peptides, RNA/DNA bases, ChEMBL, macrocycles examples
  • and self-hostable (no backend, no data storage)

Quick Start

git clone
make
make build-wasm
make dev PORT=5173

Open http://localhost:5173/ and start typing SMARTS.

Deploy

Build the static site, then serve with any web server

make build-wasm build
# output in build/

Or use ./docker/Dockerfile to build and host the application.

Dependencies

You need emscripten to compile the tree-sitter SMARTS grammar

# For debian-based
sudo apt install emscripten

Technical Overview

Package Purpose
rdkit RDKit WASM molecule rendering and SMARTS substructure search
paper.js Vector graphics for highlight outlines
tree-sitter SMARTS grammar powers the syntax explain panel
codemirror Code editor with syntax highlighting and inline error markers
sveltekit + svelte Web framework, compiles to a static website
tailwindcss + shadcn-svelte + lucide UI Components

About

An interactive browser-based app for SMARTS, a cheminformatics query language, for real-time molecule search and reactions

Topics

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

No releases published

Contributors