![chemfig:彩色原子不排列,如何与电荷形成键?](https://linux22.com/image/283119/chemfig%EF%BC%9A%E5%BD%A9%E8%89%B2%E5%8E%9F%E5%AD%90%E4%B8%8D%E6%8E%92%E5%88%97%EF%BC%8C%E5%A6%82%E4%BD%95%E4%B8%8E%E7%94%B5%E8%8D%B7%E5%BD%A2%E6%88%90%E9%94%AE%EF%BC%9F.png)
所以我想展示分子和带电元素之间的离子相互作用。但是当我使用颜色突出显示分子的一部分时,键排列不再正确。第一个例子没问题,其他两个显示了问题。我尝试了两种不同的方法在钙和电荷(\ominus)之间画线,结果很奇怪。我使用的是 texlive 和 chemfig v1.0h 2013 年 11 月 28 日。
\documentclass{article}
\usepackage{chemfig,amsmath}
\newcommand{\gammach}{$\gamma$}
\begin{document}
\schemedebug{false}
\definesubmol{Glu}{
[:0,0.75]\phantom{X}-[:30]HN-
([:60]
--[:0]
(-[:60]COO^{\ominus}
)
)
(-[::-60]CO-[:0,0.5]\vphantom{X})
}
\schemestart
\chemname{ \chemfig{ !{Glu} }}{glutamic acid}
\arrow{->[\gammach-carboxylase]}
\chemname{\chemfig{
[:0,0.75]\phantom{X}-[:30]HN-
([:60]
--[:0]
(-[:60]COO^{\ominus}
(-[:-40,0.975,,,dotted]Ca^{2+}?[Cahook])
)
(-[:-60]COO^{\ominus}-[,0.2,,,draw=none]?[Cahook,1,dotted,red])
)
(-[:-60]CO-[:0,0.5]\phantom{X})
}}{\gammach-carboxylated glutamic acid}
\schemestop
\schemestart
\chemname{\chemfig{ !{Glu} }}{glutamic acid}
\arrow{->[\gammach-carboxylase][\+ \color{red}CO$_2$]}
\chemname{\chemfig{
[:0,0.75]\phantom{X}-[:30]HN-
([:60]
--[:0]
(-[:60]COO^{\ominus}
(-[:-40,0.975,,,dotted]Ca^{2+}?[Cahook])
)
(-[:-60]{\color{red}COO^{\ominus}}-[,0.2,,,draw=none]?[Cahook,1,dotted,red])
)
(-[:-60]CO-[:0,0.5]\phantom{X})
}}{\gammach-carboxylated glutamic acid}
\schemestop
\qquad
\schemestart
\chemname{\chemfig{ !{Glu} }}{glutamic acid}
\arrow{->[\gammach-carboxylase][\+ \color{red}CO$_2$]}
\chemname{\chemfig{
[:0,0.75]\phantom{X}-[:30]HN-
([:60]
--[:00]
(-[:60]COO^{\ominus{}}@{higherCOO}
(-[:-30,0.975,,,dotted,red]Ca^{2+}@{ca})
)
(-[:-60,,,,blue]{\color{red}COO^{\scriptstyle\ominus{}}
}@{lowerCOO}-[:30,0.975,,,green,dotted]
)
)
(-[:-60]CO-[:0,0.55])
}}{\gammach-carboxylated glutamic acid}
\schemestop
\chemmove{ \draw[red,dotted] (ca)--(lowerCOO); }
\end{document}
答案1
这是我的尝试:
\documentclass{article}
\usepackage{chemfig}
\newcommand\gammach{$\gamma$}
\begin{document}
\setbondstyle{thick}
\schemedebug{false}
\definesubmol{Glu}{[:0,0.75]-[:30]HN-([:60]--[:0](-[:60]COO^\ominus))(-[::-60]CO-[:0,0.5])}
\schemestart
\chemname{\chemfig{!{Glu}}}{glutamic acid}
\arrow{->[\gammach-carboxylase]}
\chemname{%
\chemfig{ [,0.75]%
-[:30]HN-([:60]--[:0](-[:60]COO|^\ominus(-[:-40,1,,,dotted]Ca?|^{2+}))%
(-[:-60]COO^\ominus?[,,dotted,red]))(-[:-60]CO-[:0,0.5])}}%
{\gammach-carboxylated glutamic acid}%
\schemestop
\bigbreak
\schemestart
\chemname{\chemfig{!{Glu}}}{glutamic acid}
\arrow{->[\gammach-carboxylase][\+ \color{red}CO$_2$]}
\chemname{%
\chemfig{ [,0.75]%
-[:30]HN-([:60]--[:0](-[:60]COO|^\ominus(-[:-40,1,,,dotted]Ca?|^{2+}))%
(-[:-60]{\color{red}C}|{\color{red}O}|{\color{red}O^\ominus}?[,,dotted,red]))(-[:-60]CO-[:0,0.5])}}%
{\gammach-carboxylated glutamic acid}%
\schemestop
\bigbreak
\schemestart
\chemname{\chemfig{!{Glu}}}{glutamic acid}
\arrow{->[\gammach-carboxylase][\+ \color{red}CO$_2$]}
\chemname{%
\chemfig{ [,0.75]%
-[:30]HN-([:60]--[:0](-[:60]COO|^\ominus(-[:-40,1,,,dotted]Ca?|^{2+}))%
(-[:-60,,,,blue]{\color{red}C}|{\color{red}O}|{\color{red}O^\ominus}?[,,dotted,green]))(-[:-60]CO-[:0,0.5])}}%
{\gammach-carboxylated glutamic acid}%
\schemestop
\end{document}