Skip to main content

mol2chemfigPy3

PyPI CI black Stand With Ukraine

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 and python -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: Union[str, int, pathlib.Path], *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) → Optional[str]

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

Metadata

Release files for mol2chemfigPy3 1.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mol2chemfigPy3 1.6.0
File Size Uploaded
mol2chemfigpy3-1.6.0.tar.gz 34.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mol2chemfigPy3 1.6.0
File Interpreter ABI Platform
mol2chemfigpy3-1.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 69.8 kB

Release files / mol2chemfigpy3-1.6.0.tar.gz

Download URL mol2chemfigpy3-1.6.0.tar.gz
Size 34.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7191ca4615e81a93e48b83b85bf5ae69b8c5db26dfcac14900ce43592d7d6543
BLAKE2b-256 checksum
How to use checksums
6b5faa4bcbf0e05ecf8d2c1fa288c825d822c889d98dd62268e6f4d0dfbda412
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / mol2chemfigpy3-1.6.0-py3-none-any.whl

Download URL mol2chemfigpy3-1.6.0-py3-none-any.whl
Size 35.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
59e69c08e48e81e15523510807b9532d25dfcdde775fc5db03394625beb434c5
BLAKE2b-256 checksum
How to use checksums
7d28fce8881710826b3ffbe1f502300d488ee87e407cf5093971f0849e454e1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release history Release notifications | RSS feed

This release

1.6.0 This release

2 release files

1.5.14

2 release files

1.5.13

2 release files

1.5.10

2 release files

1.5.9

2 release files

1.5.8

2 release files

1.5.7

2 release files

1.5.5

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.4

2 release files

1.4.3

1 release file

1.4.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page