Skip to main content

Show a molecule to a graphics terminal

Project description

molcat - print molecules to a graphics terminal

molcat is a utility script that simply read a structure file or SMILES and shows a 2D sketch of the molecule(s) to the terminal. It requires a terminal that supports the graphics protocol used by, among others, kitty, Ghostty, and iTerm2.

Example:

Screenshot of terminal showing efavirenz from SMILES using molcat

usage: molcat [-h] [-n N] [--all] [--idx | --zidx] [--keeph] [--size-x SIZE_X]
              [--size-y SIZE_Y] [--log-level LOG_LEVEL]
              [file_or_smiles]

Display a 2D sketch of a structure, from a SMILES or a file, to a terminal
that support graphics, such as kitty, Ghostty, and iTerm2.

positional arguments:
  file_or_smiles        structure input file or SMILES strings. If not
                        provided, SMILES will be read from stdin.

options:
  -h, --help            show this help message and exit
  -n N                  index of structure to display. May be a range ('-n 1-4')
                        Default: 1 (only show the first structure in the file)
  --all, -a             show all structures in the file
  --idx, -i             show atom indexes (1-based)
  --zidx, -z            show atom indexes (0-based)
  --keeph, -H           keep all hydrogen atoms
  --size-x SIZE_X, -x SIZE_X
                        X dimension in pixels; default=500
  --size-y SIZE_Y, -y SIZE_Y
                        X dimension in pixels; default is a function of -x
  --log-level LOG_LEVEL
                        RDKit log level; default="FATAL"

Requirements

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

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

molcat-0.1.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

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

molcat-0.1.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file molcat-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for molcat-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d5f3da6366bd00cc1231058603fa0f0adb3bedf01b2e860baa2f3eb74b2bcc16
MD5 1e655e22ff8afc6086397e28e523cdc6
BLAKE2b-256 b1c939ee699c686d2e35e652deefb87631adcfb0a72dfaac4eee2ea0df8dd45a

See more details on using hashes here.

File details

Details for the file molcat-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for molcat-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4cacc2a9e97a1426254ef29727b09b36bf5b6ce21f8751717f9f3b3e9ca52f73
MD5 7845aad66ced7e51a695851fab395f10
BLAKE2b-256 f9be22cbc5a305320529ce4aeb9add3ca9e42bb515d1e619065c09abbbaabf87

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