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.2.0.tar.gz (6.7 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.2.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for molcat-0.2.0.tar.gz
Algorithm Hash digest
SHA256 71cb95cc3d3aea412f80f26f548cee617846af6b34cd06d54881739a6595d616
MD5 9d0ed585a7df206540efc283aa0ba8b4
BLAKE2b-256 92d1e5a259b494e0735837e7f082a238773a70b2e05928ed55372051f060e0c5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for molcat-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 82775813e46b6658eead206b36cdb19156cf1c8d5fde124745e90010bf58f5e2
MD5 4a077a54f7769d11b741c29d2e8e5307
BLAKE2b-256 563e8abdf4deed3bafa7f4fbeb3aee6a2220699a7fce8b906981216663faf7e0

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