Skip to main content

Molecular sketcher for the terminally committed

Project description

CurseMol - Molecular sketcher for the terminally committed

Have you ever been working on a terminal with programs that use SMILES for input or output, and switching to your GUI sketcher is too annoying? (Not to mention reading or writing the SMILES by hand.)

Enter CurseMol, the curses-based molecular editor, with keybindings inspired by vi! The molecules are depicted using ASCII art (actually, not exactly; a few non-ASCII Unicode characters are used, as well.)

You can read in a SMILES string or start from a blank canvas, and when you exit, the final SMILES is printed to stdout, which can be useful for piping directly into other programs.

Screen recording of sketching naproxen

Controls:
  h, j, k, l       - Move cursor left/down/up/right (arrow keys supported too)
  H, J, K, L       - Move cursor faster (10 cells horizontal, 4 cells vertical)
  Space            - Snap cursor to nearest atom
  m                - Enter move mode (hjkl moves molecule, Esc to exit)
  s                - Enter a SMILES string to replace the current molecule
  S                - Toggle SMILES display
  i                - Insert/modify atom at cursor position
  a                - Append atoms from SMILES to atom or bond under cursor
                     (appending to a bond forms a ring by connecting the bond
                     atoms to the first and last atoms from the SMILES)
  c, n, o          - Insert/modify carbon/nitrogen/oxygen atom
  x                - Delete atom or bond
  D                - Delete fragment (all atoms connected to cursor atom)
  X                - Area delete (select rectangle)
  +, -             - Increase/decrease formal charge on atom
  <, >             - Zoom out/in
  b                - Add bond mode (add atom and move it, Enter to accept)
  1, 2, 3          - Add bond or change bond (order 1/2/3) between nearest atoms
  w, d             - Add/change to wedge or dash bond (press again to reverse)
  @                - Clear canvas (reset to blank slate)
  u, r             - Undo/redo
  Ctrl-L           - Clean up (regenerate coordinates)
  ?                - Show this help
  q                - Quit and print SMILES to stdout

Requirements

  • Python (tested with 3.11)
  • RDKit (tested with 2025.09.6)

History

This project originated as an April Fool's PR which proposed to replace the Schrödinger sketcher. Also for this reason, the version number for the first upload to PyPI was 4.1.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cursemol-4.1.1.tar.gz (394.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cursemol-4.1.1-py3-none-any.whl (25.3 kB view details)

Uploaded Python 3

File details

Details for the file cursemol-4.1.1.tar.gz.

File metadata

  • Download URL: cursemol-4.1.1.tar.gz
  • Upload date:
  • Size: 394.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.2

File hashes

Hashes for cursemol-4.1.1.tar.gz
Algorithm Hash digest
SHA256 5b33058d96ab168053dcbebd8f2f198b550340faad8b2b7ac07592c8621a8870
MD5 f2550b554c971e775fc69149da76f557
BLAKE2b-256 e035270f611d519ac115a8e03afb98dd308cc3eb41fa3b99de637ffb1c607b13

See more details on using hashes here.

File details

Details for the file cursemol-4.1.1-py3-none-any.whl.

File metadata

  • Download URL: cursemol-4.1.1-py3-none-any.whl
  • Upload date:
  • Size: 25.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.2

File hashes

Hashes for cursemol-4.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f4bf547e58e43d427d502b73b643078c704ad9489b15098316deef262dc89037
MD5 e6683819c27ca07305d88decc04bbc05
BLAKE2b-256 69fdeb02875988bc27db0ffaffec5d7cd92522fea570e5d3a3f4ffeb00682010

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page