Skip to main content

Chemvas — Draw interactively. Automate safely. Export exactly.

CI PyPI Python 3.12+ License: MIT

English · 한국어

Chemvas is an open-source desktop app for drawing molecules and reaction schemes, then exporting them for a paper. Draw on the canvas or use scripts to keep a set of figures at the same scale. Save the editable source as .cdxml and export the finished figure as SVG, PDF or PNG.

Drawing structures, labelling an arrow and aligning a reaction scheme in Chemvas

From a drawing to a paper

  • Draw structures and schemes. Place rings, bonds, reaction arrows and labels on the canvas, then align them. Autosave and session recovery help you pick up your work.
  • Revise the source and export again. Open, edit and save supported single-page CDXML files. Export figures at a journal column width such as 84 mm or 174 mm.
  • Keep figures at the same scale. The publication examples use fixed bond lengths and font sizes across a manuscript's figures.
  • Script repeated edits. Compose, inspect, patch and render documents from the command line. check-layout detects selected label collisions and content outside the sheet. The CLI guide covers its scope and the patch format.

Install

Runs on macOS, Windows and Linux with Python 3.12+.

pip install chemvas
chemvas

Standalone downloads for the first stable release are being prepared for the three-platform target matrix. Its native installation checks are still pending; the Python installation above remains available.

To build a Windows executable locally, follow the packaging guide.

Draw your first scheme

  1. Choose the Ring tool (J) and click the left side of the canvas to place benzene. Choose Bond (X), drag one bond out from a ring atom to a new carbon, then drag a second bond from that carbon to a terminal atom. Hover the terminal atom, press o, then press Enter and set the label to OH.
  2. Place a second benzene to the right. Drag one bond out from a ring atom to a new carbon, then drag a second bond from that carbon to a terminal atom. Hover the second bond and press 2 so only that bond becomes a double bond, then hover the terminal atom and press o. Select the Arrow tool, drag between the structures, and double-click the arrow to add condition labels.
  3. Select both molecules (Edit ▸ Select All) and align them (Edit ▸ Align ▸ Middle).
  4. Save the document (.cdxml). Export via File ▸ Export Figure… → Plain SVG, Fit 2-column (174 mm).

The first-scheme tutorial walks through each step and includes the finished drawing.

Edit and export with a script

chemvas compose-document scheme.json --output scheme.cdxml
chemvas inspect-document scheme.cdxml > inspection.json
chemvas apply-patch scheme.cdxml patch.json --dry-run
chemvas apply-patch scheme.cdxml patch.json --output revised.cdxml
chemvas check-layout revised.cdxml
chemvas render-document revised.cdxml --output scheme.svg --width-mm 174

scheme.json describes atoms, bonds, arrows and notes. patch.json contains the operations and the source_sha256 from inspection.json. A patch applies only to the file bytes it was prepared for and writes its result to a new file. Output commands refuse to overwrite existing files. check-layout returns exit code 1 when it finds warnings.

Patch validation checks document structure. Element symbols, valence and the chemical meaning of the finished figure need your review. See the CLI guide for input formats and a worked example.

File formats

  • Editable source: supported single-page .cdxml. Imported files use Chemvas drawing styles while native fragments, reaction references and vector objects retain their source XML. Edits that cannot preserve them are rejected before saving.
  • Structure import: supported 2D MOL V2000 with bond orders 1–3, wedge and hash bonds, charges and radicals.
  • Figure output: SVG, PDF and PNG. SVG is an output format; it cannot be reopened for editing. CDXML export is also available.
  • Unsupported input: binary CDX, multipage CDXML, SDF, RXN, and MOL files with 3D coordinates, isotopes, aromatic bond type 4 or V3000.

See the document compatibility policy and CDXML format scope for preservation details.

Explore

Found a rough edge or have an idea? Open a GitHub issue.

How this was built

I build Chemvas for use in chemistry research. I set the requirements, document formats and validation criteria, and use AI coding agents to write the code.

Design decisions live in ADRs, and the compatibility policy defines how saved drawings are preserved. Locally, make check runs lint, formatting, type checks and tests in separate processes for each test file. GitHub CI runs quality checks, a package smoke test and secret scanning.

Metadata

Release files for chemvas 0.29.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chemvas 0.29.1
File Size Uploaded Provenance Actions
chemvas-0.29.1.tar.gz 779.6 kB With provenance Details for chemvas-0.29.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for chemvas 0.29.1
File Interpreter ABI Platform Actions
chemvas-0.29.1-py3-none-any.whl Python 3 none any Details for chemvas-0.29.1-py3-none-any.whl

Total release size: 1.7 MB

Release files / chemvas-0.29.1.tar.gz

Download URL chemvas-0.29.1.tar.gz
Size 779.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1e08f377e55bb93c1912d45795d68ad9c7e74dc2236e4ae1fbc8b704a33d9033
BLAKE2b-256 checksum
How to use checksums
d35f512b0fceb39bd1d1c821637e0f84bbf9ea9913fc85799bb80795cb4c3e87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / chemvas-0.29.1-py3-none-any.whl

Download URL chemvas-0.29.1-py3-none-any.whl
Size 969.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4c7a1539c4ad95d96d52d28b0331fcb641e8c3f4879935f6f7f0be186c79df3
BLAKE2b-256 checksum
How to use checksums
b6b2247cc3f5ae1bbc3e78adfff68854853a9ef2b27d3030c003f72ae033e289
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Security for chemvas 0.29.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for chemvas-0.29.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.29.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page