1

As you can see in the below MWE, at the bottom of the molecule, a bond can be seen coming out of a hydrogen (H) atom where it should be coming out of the nitrogen atom (N). I was looking for a command along the lines of \chemleft (similar to \chemabove or \chembelow) to put the H on the left of the N while still having the bond come out of the N with no success. How do I do that?

\documentclass[10pt]{article}

\usepackage{amsmath,amssymb}
\usepackage[margin=1in]{geometry}
\usepackage{chemfig}

\begin{document}

\begin{center}

\chemfig{-[:-30]-[:30]-[:-30](=[-90]O)-[:30]\chemabove{N}{H}-[:-30](-[:30](=[:90]O)-[:-30]OH)-[:-90]-[:-150]-[:-90]-[:-150]HN-[:-90](-[:-150]H_2N)=[:-30]NH}

\end{center}

enter image description here

3
  • @Eridan, it is in section II.5 of the manual (v. 1.2d for me)
    – DRi
    Aug 31, 2016 at 15:37
  • @DRi Ah, I completely missed that when I went through the manual the first time. Thank you.
    – Arcturus
    Aug 31, 2016 at 18:41
  • @ Eridan, Thank clemens, I had forgotten these options too but found them back in the manual when he mentioned them and gave the simple and smart solution.
    – DRi
    Sep 1, 2016 at 5:40

1 Answer 1

4

The crucial part of the molecule is

-[:-150]HN-[:-90]

where the first bond ends at the N and the second starts at the H. Exactly for cases like this there are the parameters three and four of the bonds:

<bond>[<angle>,<length factor>,<departure>,arrival>,<tikz>]

They are described in section 5 Departure and arrival atoms of part II in the chemfig manual (v1.2d). <departure> and <arrival> are integer numbers referring to the corresponding atoms of the group of atoms where the bond starts (<departure>) or where the bond ends (<arrival>). In this case 1 would refer to the H and 2 would refer to the N:

\documentclass{article}
\usepackage{chemfig}
\begin{document}

\chemfig{-[:-150]HN-[:-90]}
\chemfig{-[:-150]HN-[:-90,,2]}
\chemfig{-[:-150,,,2]HN-[:-90,,2]}% just to be *really* safe

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .