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.
$ pip install -U mol2chemfigPy3
mol2chemfig
andpython -m mol2chemfigPy3
are equivalent.
$ mol2chemfig --version
$ mol2chemfig -h
$ mol2chemfig -zw -i direct "C1=CC=C(C=C1)O"
it will give you
\chemfig{OH-[:180,,1]=_[:240]-[:180]=_[:120]-[:60]=_(-[:300])}
$ mol2chemfig -zw -i direct "C1=CC=C(C=C1)O" > phenol-smi-terse.tex
it will write result to file phenol-smi-terse.tex
$ mol2chemfig -zw -i pubchem 996
$ mol2chemfig -zw peniciling.mol
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
See official document mol2chemfig-doc.pdf (uwaterloo.ca)
The website seems down, so here is a mirror mol2chemfig Documentation Version 1.5
MIT license