I produced all of the amino acids for my thesis, but Proline and Histidin keep bugging me. I would like to place the -= bond that is now from H to H+ in Histidin from N to N and the bond – from C to H2 in Prolin from C to C …
This is the code I used:
\chemfig{C([:0]-C(=[:30]O)(-[:-30]O^{-}))([:180]-H_{3}
N^{+})([:-90]-H)([:90]-CH_{2}([:90]-([:60]*5(-NH-=NH^{+}-=))))}
\chemfig{C([:0]-C(=[:30]O)(-[:-30]O^{-}))([:-90]-H)*5([:135]-CH_2-CH_2-H_2C- H_{2}N^{+}-)}
Best Answer
All of
chemfig
's bonds have optional arguments which accept the following input:The third,
<dpt atom>
, and fourth ,<arr atom>
, are the important ones here: they specify from which atom of a group of atoms the bond departs and at which atom of a group of atoms the bond arrives. This is described in section 5 of part II in the manual (Departure and arrival atoms). These arguments are integers that refer to the position of the respective atom in the group (counted from the left). If they're not specifiedchemfig
determines the atom depending on the angle with which the bond departs or arrives. The specified atoms must exist otherwise an error is thrown. The following picture is taken from the documentation:Applying this to your code we get:
Further adjustments you could make to improve the looks of the molecules:
\chemabove{<atom>}{<above>}
andmathtools
'\mathrlap{<stuff>}
to get single atoms as far as the rings are concerned; the rings will look more even.O|^{-}
in the carboxyl groups (notice the|
); this will make sure that the additional height of the superscript is not taken into account when placing theO
the the bond; there are other places in the molecules where this syntax can come in handy, too. See section 1 of part III, Separating atoms, in the manual for details on this.Applying this to your examples this would be the result: