4

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}

Resulting in

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.

Corrin

4

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=)}

enter image description here

Let's add the next ring:

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

enter image description here

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=)
}

enter image description here

The last ring:

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

enter image description here

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=)
}

enter image description here

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}

enter image description here


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=)
}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.