Note that
mol2chemfigandpython -m mol2chemfigPy3are equivalent.
$ mol2chemfig --version
$ mol2chemfig -h
$ mol2chemfig -zw -i direct "C1=CC=C(C=C1)O"
which will give you
\chemfig{OH-[:180,,1]=_[:240]-[:180]=_[:120]-[:60]=_(-[:300])}
Sometimes, epam.indigo cannot correctly parse some aromatic compound that raises an error of ‘incorrect structure’, even though the molecular structure is correct. Or from time to time we want to draw molecules with uncommon valencies. In these cases, using flag -r can bypass the structural checking mechanism of epam.indigo.
For example,
$ mol2chemfig -zw -r -i direct "c1ccncc1"
$ mol2chemfig -zw -i direct "C1=CC=C(C=C1)O" > phenol-smi-terse.tex
which will write result to file phenol-smi-terse.tex
$ mol2chemfig -zw -i pubchem 996
$ mol2chemfig -zw peniciling.mol
⚠️ Since version 1.6 of ChemFig, the macro \lewis has been moved outside the main environment. If you got a chemfig code containing this macro, you need to download
and input it first to avoid errors, e.g.
%\input{lewis} % version 1.6
\input{chemfig-lewis} % version 1.6a+
\chemfig{...}