# How to draw a Corrin-ring with chemfig?

From modification of the porphyrine example i got to:

\documentclass[]{article}
\usepackage{chemfig}

\begin{document}
\chemfig{
a-?[a]=[::+63]*5(
-N?[b]=(
-(-[::63]d)=[::-54]*5(
-N?[c]-(
=(-[::63]g)-[::-54]*5(
-N?[d]-(
-[:180]*5([]
-N%(-[::-54,1.5]Fe?[b,,dotted]?[c]?[d,,dotted])
-[,,1]?[a]=-=
)
)
=-=
)
)
-=-
)
)
-=-
)
}
\end{document} Below is shown What I want, by 90 degrees turned. Note that my problem is the bond length and the angle of the fourth ring. The small differences like NH or double bonds I should be able to change myself. ## 1 Answer

Let's do this step by step. Let's also draw it like in the picture. We can rotate it later. Keeping this in mind we'll only use relative angles for the bonds, i.e., we'll use the ::<angle> notation.

First we need to decide where the baseline of the molecule should be because this determines where we need to start coding the molecule. Let's say the baseline should be the vertical center of the molecule. So we start at in the middle at the right-hand side:

\chemfig{-[::120]*5(----N=)} Let's add the next ring:

\chemfig{-[::120]*5(---(=^-[::48]*5(----N=))-N=)} Let's add the hook ? where we want this to be connected with the lower part.

\chemfig{-[::120]*5(---(=^-[::48]*5(---?-N=))-N=)}


Now for the lower part – since we'll start at the beginning again we'll code it as a branch, i.e., inside ():

\chemfig{
(=_[::-120]*5(-N=---))
-[::120]*5(---(=^-[::48]*5(---?-N=))-N=)
} The last ring:

\chemfig{
(=_[::-120]*5(-N=(-=_[::-48]*5(-[,,,1]NH----))---))
-[::120]*5(---(=^-[::48]*5(---?-N=))-N=)
} Note the -[,,,1]NH part where we use the “arrival” option for the bond before NH so it “arrives” at N instead of H.

Last piece: the second hook which connects to the first hook:

\chemfig{
(=_[::-120]*5(-N=(-=_[::-48]*5(-[,,,1]NH-?---))---))
-[::120]*5(---(=^-[::48]*5(---?-N=))-N=)
} Rotation by 90 degrees is easy by adding [:90] or [:-90] at the start of the molecule. Both variations need adjustments at the NH group:

• [:90]: -[,,,2]HN-[,,2]
• [:-90]: -[,,,1]NH-[,,1]

The complete code:

\documentclass{article}
\usepackage{chemfig}

\begin{document}

\chemfig{
[:90](=_[::-120]*5(-N=(-=_[::-48]*5(-[,,,2]HN-[,,2]?---))---))
-[::120]*5(---(=^-[::48]*5(---?-N=))-N=)
}

\bigskip

\chemfig{
[:-90](=_[::-120]*5(-N=(-=_[::-48]*5(-[,,,1]NH-[,,1]?---))---))
-[::120]*5(---(=^-[::48]*5(---?-N=))-N=)
}

\end{document} You can always adjust angles or other details later:

\chemfig{
[:90](=_[::-117]*5(-N=(-=_[::-54]*5(-[,,,2]HN-[,,2]?---))---))
-[::117]*5(---(=^-[::54]*5(---?-N=))-N=)
} 