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.3.0.tar.gz (7.6 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.3.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for molcat-0.3.0.tar.gz
Algorithm Hash digest
SHA256 d517ec905c57120e2ea6eba0f30f801a9840f81bc1b32b2190f6fe849ea38743
MD5 45d479166b0a35d89f450a64cb45df28
BLAKE2b-256 e6f702c7a645d9f5eef95df85697800cf25ea837963ddf2f8af90d344997cd28

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for molcat-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2a0af4e0ab2f0bec45099f0bbf2fffe7a718532cb0ab74d2e4e3c8008bc48703
MD5 d564b590953a84be94a43747ea34aed7
BLAKE2b-256 ba9e030282133a611895fffa49aa22406277db75c2241b3a5eb1a5e68f54c801

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