A simple molecular renderer for the terminal using RDKit.
Project description
TerMol
A simple molecular renderer for the terminal using RDKit.
Table of Contents
Overview
This python package allows for the 2D or 3D rendering of molecules in the terminal, using RDKit and Curses.
Installation
After cloning the repo, install TerMol with:
pip install .
This will also install the requirements of RDKit and numpy. On Windows only, Curses must be installed manually.
Usage:
Import the package and call the draw function as shown:
import termol
smiles = "c1cc2c(cc1[N+](=O)[O-])[nH]nn2" # Nitrobenzotriazole
name = "Nitrobenzotriazole"
termol.draw(smiles, name=name)
The molecule input can be a smiles string or an RDKit-compatible filepath. Optional arguments for the draw function include a molecule name to be displayed, the width and height (in characters) of your preferred canvas, whether to render in animated 3D or static 2D, and whether to have RDKit add hydrogens to the molecule:
termol.draw(input_mol, name=None, width=80, height=40, three_d=True, add_hydrogens=False, timeout=None)
License:
This software is provided under the MIT License.
Contact:
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
Built Distribution
File details
Details for the file termol-0.1.1.tar.gz
.
File metadata
- Download URL: termol-0.1.1.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70843e284a6e4cfbabfd148e29950c535f7e24ea1a84e9047c343b0b67864ecc |
|
MD5 | 5adabd78a4645fbdbad72db05e9cb3e3 |
|
BLAKE2b-256 | 21d75a997f3c88c6a7cbe492d0d1e5d0bf184d5b720eecace7ba85e3cc461eb3 |
File details
Details for the file termol-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: termol-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5a5d521a9ee6739bb11a37a91fc7408a2a188443457f6eeca923f5e9880956a |
|
MD5 | 542ee62ef5279d1e745b78519a772d22 |
|
BLAKE2b-256 | c6709d6eb1e0534180eae6947815b52cef550a2d70edb280581393940be0201f |