I have been working in the cylindrospermopsin structure using chemfig
. The structure is:
I draw it with te following code:
\documentclass[12pt, border={10pt 10pt 10pt 10pt}]{standalone}
\pagestyle{empty}
\usepackage{standalone}
\usepackage[utf8]{inputenc}%Para copiar caracteres especiais como ç, á, à
\usepackage[T1]{fontenc}%Para copiar caracteres especiais como ç, á, à
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{makeidx}
\usepackage{graphicx,graphics}
\usepackage[brazil]{babel}
\usepackage{chemfig}
\begin{document}
\chemfig{%
*6(-(-[:-72]?[a])(<[:-150]H)-N*6(-^{+}(-[:-108]NH2?[a])-NH1-(<[:90]H)(-[:30](<[:90]OH)-[:-30]*6(-M-(=[:-90]O)-NH-(=[:30]O)-=\phantom{L}))-?[b])-?[b](<[:90]H)--(<[:150]^{-}O_{3}SO)-)(<[:-150]H_3C)
}
\end{document}
The result is:
My questions:
- How can I put the positive charge out the structure, like the example?
- How can I draw the double bonds with one dashed line between N, NH1 and NH2?
- How can I link the NH2 atom correctly with the hydrogen outside?
- How can I put HN instead of M? I've been trying, but the bounds link in the H atom
Any help, indication, suggestion?
Best Answer
Just some small notes on each question. The very well-written package documentation goes into more details, I'll just point you to what's relevant.
with
-[7,0.2,,,draw=none]{\scriptstyle+}
: This draws a+
at the end of an invisible bond, drawn-45deg
from the C atom (that's what the7
means),0.2*bond length
away.with
-[,,,,ddbond={+/-}]
: this is taken from the chemfig documentation, pg 29. You need to use\usetikzlibrary{decorations.markings}
in the preamble for this to work, and add the relevant part in the preamble. Then just add theddbond={+}
orddbond={-}
option to the relevant bonds (after 4 commas in the optional argument).with
-[:-108,,,1]N?[a]H2
: This bond is drawn from the+
to the NH2, so set its arrival atom to1
explicitly, which is the N atom. (Try removing the1
in the argument, note what you get).with
-[,,,2]HN
instead of-M
Similar with question 3, set the arrival atom to the second atom (the N), by passing2
to the fourth optional argument.