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:
(Nicholas Freitas)[https://github.com/Nicholas-Freitas]
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file termol-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: termol-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e20ee5db6dadb59bd2f3b913e9ede1ae57bf7fb05458c76ddf880c649bc8545 |
|
MD5 | 673e143f1d054c0d372e5c702f8101c2 |
|
BLAKE2b-256 | 1cb14b620a5c75f0c97fca476948b04b418cac1fb311c02d673c5ceff2050d66 |