Open
Conversation
This commit introduces the 2026 version of the Schrödinger sketcher, which for reasons of efficiency, ergonomics, and versatility is based on the curses library instead of Qt. It is a single-file Python script, with RDKit as its only dependency other than Python.
Collaborator
|
The next step is to get Live Design integration working via Pyodide |
Contributor
|
Can we support arrow key movement? Currently this is unusable for my non-vi trained fingers |
Contributor
Author
Done! I didn't add shift+arrow, however, because while the curses library supports shift+left and shift+right, it does not support shift+up or shift+down! There are some lower-level ways of getting those key combinations, but I didn't want to go down that road just yet. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Modern molecular sketchers have become bloated, relying on complex GUI
frameworks, GPUs, and the like. The time has come to reconsider our whole
approach and write a new sketcher from scratch.
Rather than risking a dependency on newfangled technologies such as Qt (1995)
or WebAssembly (2017), let's go back to the basics and build on top of the
curses library, which has been a standard part of Unix since the early 1980s.
In keeping with the Unix philosophy, the new sketcher can run as part of a
pipeline, taking an input SMILES from stdin and printing an output SMILES to
stdout. This allows it to integrate seamlessly with existing tools:
The new sketcher, being 100% keyboard-driven (with keybindings inspired by vi)
is more ergonomic and enables greater productivity. Because the molecules are
depicted in ASCII art, they can be copied, pasted, transmitted or stored as
plain text--the most versatile of file formats.
The video below shows a quick overview of the new sketcher in action:
Requirements
Testing done
Manual testing on Linux. Note: the new Sketcher does not work with the version
of Python that comes with the Schrödinger core suite, becase it's missing the
curses module for some reason! But it is easy enough to run using uv:
Unit tests left as an exercise to the reader.