Skip to content

Repository files navigation

Chemvas — 2D chemical structure drawing canvas

CI PyPI Python 3.12+ License: MIT

English · 한국어

Chemvas is a lightweight PyQt6 app for drawing 2D chemical structures and reaction schemes — ACS 1996 defaults, ChemDraw-compatible shortcuts, and publication-ready figure export. Draw fast, export exactly.

Chemvas — a C–P bond cleavage reaction scheme (KOtBu / THF) drawn on the canvas

Statement of need

Sketching a scheme for a lab notebook or paper should not require a commercial suite — and automating edits should not mean trusting an LLM with your drawing. Chemvas keeps the interactive canvas small and fast, and exposes headless CLI contracts for rendering, inspection, editing, and calculation handoff: document edits bind to the exact source hash and unsupported input fails closed. Agents propose, validation decides.

Quickstart

pip install chemvas              # core (PyQt6 included)
pip install "chemvas[rdkit]"     # + SMILES import, formula/weight, calculation handoff, 3D
chemvas

Pick a tool from the toolbar and click/drag on the canvas. Type a SMILES string and press Insert to preview and place it (RDKit). Open examples/template2.chemvas via File ▸ Open to explore the document shown above.

What it does

Capability Use it for Details
Drawing bonds, rings, arrows, lines, brackets, atom labels — with ChemDraw-compatible shortcuts REFERENCE
Figure export plain SVG / PDF / PNG / TIFF, outlined glyphs, deterministic physical sizing REFERENCE
Chemistry I/O SMILES import, .mol interchange, 2D→3D .xyz, Molecule Info (RDKit) REFERENCE
Agent CLI headless compose / layout-check / render / inspect / hash-gated Graph Patch, no Qt window AGENT_CLI
Calculation handoff elementary steps, reviewed precomplexes, one machine.json per step (RDKit) AGENT_CLI

Documents are .chemvas files (JSON, version 7 contract) with autosave and crash recovery; everything except the marked (RDKit) features runs without RDKit.

Development, testing, and full docs

  • make check runs the whole local gate — lint, formatting, mypy, the file-isolated headless test suite, and the machine.json conformance check. Read CONTRIBUTING.md before moving code: the architecture boundaries are enforced by tests.
  • Docs index: REFERENCE · AGENT_CLI · ARCHITECTURE · CHANGELOG · RELEASING
  • Known gaps (SDF interchange, one-file binaries, multi-molecule 3D export) → roadmap

License

MIT License

About

A lightweight PyQt6 app for drawing 2D chemical structures and reaction schemes.

Topics

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages