3
\documentclass[11pt,a4paper]{report}
\usepackage{chemfig}
\usepackage{chemmacros}
\chemsetup{modules={all}}
\chemsetup{formula = mhchem}

\begin{document}

\chemname[2ex]{\chemfig{[:-150]*6(-(-OH)=(-OH)-=-(-([7]-OH)-[1]-NH([1]-CH_3))=)}}{Epinephrin}
\end{document}

enter image description here

Right now the Image looks like the above. I would like the Methyl-group (CH3) to branch off at the Nitrogen Atom (N).

I hope somebody can help me. Thanks in advance! :)

TheChemist
  • 63
  • 1
  • 4

2 Answers2

2

The third option of a chemical bond in Chemfig is which atom the bond goes to and fixes (if there is more than one atom). So if you write NH-[1,,1]CH_3 the CH3 will bond to nitrogen (the first atom of NH)

See page 20 of the manual Chemfig-1.6a_en.pdf

\documentclass[11pt,a4paper]{report}
\usepackage{chemfig}
\usepackage{chemmacros}
\chemsetup{modules={all}}
\chemsetup{formula = mhchem}

\begin{document}
    
    \chemname[2ex]{\chemfig{[:-150]*6(-(-HO)=(-HO)-=-(-(-[7]OH)-[1]-NH(-[1,,1]CH_3))=)}}{Epinephrin}
\end{document}

enter image description here

But the connection angle doesn't help much in the visualization.

Note: write "HO" instead of "OH" for the hydroxyl groups on the left side of the molecule.

CrocoDuck
  • 231
  • 1
  • 4
0

You could change the angle:

\documentclass[11pt,a4paper]{report}
\usepackage{chemfig}
\usepackage{chemmacros}
\chemsetup{modules={all}}
\chemsetup{formula = mhchem}

\begin{document}

\chemname[2ex]{\chemfig{[:-150]*6(-(-OH)=(-OH)-=-(-([7]-OH)-[1]-NH([2]-CH_3))=)}}{Epinephrin}
\end{document}

enter image description here

Or if you like the 45 degree angle, you could specify which atom should be the bonding partner:

\documentclass[11pt,a4paper]{report}
\usepackage{chemfig}
\usepackage{chemmacros}
\chemsetup{modules={all}}
\chemsetup{formula = mhchem}

\begin{document}

\chemname[2ex]{\chemfig{[:-150]*6(-(-OH)=(-OH)-=-(-([7]-OH)-[1]-NH([1,,1,]-CH_3))=)}}{Epinephrin}
\end{document}

enter image description here