python3 version of mol2chemfig
Project description
mol2chemfigPy3
This is NOT an official version of mol2chemfig for python 3.
mol2chemfigPy3 is a translation from py2 to py3 based on old mol2chemfig version 1.5.
Install
install from PyPi
$ pip install -U mol2chemfigPy3
Usage
Use in command line
mol2chemfig
andpython -m mol2chemfigPy3
are equivalent.
1. getting version
$ mol2chemfig --version
2. getting help
$ mol2chemfig -h
3. some examples
3.1 converting SMILES
$ mol2chemfig -zw -i direct "C1=CC=C(C=C1)O"
it will give you
\chemfig{OH-[:180,,1]=_[:240]-[:180]=_[:120]-[:60]=_(-[:300])}
3.2 writing to an output file
$ mol2chemfig -zw -i direct "C1=CC=C(C=C1)O" > phenol-smi-terse.tex
it will write result to file phenol-smi-terse.tex
3.3 searching PubChem database
$ mol2chemfig -zw -i pubchem 996
3.4 reading from a file
$ mol2chemfig -zw peniciling.mol
Use as a python package (new add in to this python 3 version)
This is not included in the original Py2 version of mol2chemfig.
mol2chemfigPy3.mol2chemfig(content: str, *args: str, rotate: float = 0.0, aromatic: bool = True, marker: Optional[str] = None, name: Optional[str] = None, relative_angle: bool = False, show_carbon: bool = False, show_methyl: bool = False, inline: bool = False)
e. g.
from mol2chemfigPy3 import mol2chemfig
mol2chemfig('996') # search the PubChem database
mol2chemfig('C1=CC=C(C=C1)O') # transfer InChI/SMILES to chemfig
mol2chemfig('./methanol.smi') # from a file
Document
See official document mol2chemfig-doc.pdf (uwaterloo.ca)
The website seems down, so here is a mirror mol2chemfig Documentation Version 1.5
License
MIT license
Project details
Release history Release notifications | RSS feed
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 mol2chemfigPy3-1.5.8.tar.gz
.
File metadata
- Download URL: mol2chemfigPy3-1.5.8.tar.gz
- Upload date:
- Size: 32.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8165333358c8a7b29a9f6fd6370f05d9cfd4c781210fd9b6024836395b019775 |
|
MD5 | e4ddd6a6716777d1b0bf4c13a4bebb6d |
|
BLAKE2b-256 | e45ea1eee680dc4c900ad6687adad6bfe34802d2b03f8f09973efcf59537fccb |
File details
Details for the file mol2chemfigPy3-1.5.8-py3-none-any.whl
.
File metadata
- Download URL: mol2chemfigPy3-1.5.8-py3-none-any.whl
- Upload date:
- Size: 34.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | de1f056f5185c828465ce2b5e8e2d87aa75c2e2649c973edd25287759defef6d |
|
MD5 | 5bbccda98e1aaa4c7c8d44c5ab47d42b |
|
BLAKE2b-256 | c6824d6a119c710b9aca88c3d142a49b1c31f1fe6faebc476727946be6f2a9e5 |