在 chemfig 中添加偶极矩

在 chemfig 中添加偶极矩

除了使用 tikz 创建自定义箭头外,我在 chemfig 中找不到任何可以给我的分子添加偶极矩的方法,这比我目前想要的要复杂得多。有没有标准方法可以做到这一点?

答案1

这更像是一条评论,而不是答案,但我用它tikz arrow |->来克服我的问题。这不是我想要的,但暂时让我摆脱了困境。

\documentclass{minimal}
\usepackage{chemfig}
\usepackage{tikz}
\begin{document}
\chemfig{
        \chemabove[3pt]{C}{\scriptstyle\delta -}(-[::270,0.5,,,draw=none]@{a})-
        \chemabove[3pt]{H}{\scriptstyle\delta +}(-[::270,0.5,,,draw=none]@{b})
        }
\chemmove{
          \draw[|->, very thick] (b)--(a);
         } 
\qquad
\chemfig{
         \chemabove[3pt]{O}{\scriptstyle\delta -}(-[::270,0.5,,,draw=none]@{c})-
         \chemabove[3pt]{H}{\scriptstyle\delta +}(-[::270,0.5,,,draw=none]@{d})
        }
\chemmove{
          \draw[|->, very thick] (d)--(c);
          }
\end{document}

在此处输入图片描述

答案2

创建一个名为 name bond 的命令,如下所示:

\newcommand\namebond[4][5pt]{\chemmove{\path(#2)--(#3)node[midway,sloped,yshift=#1]{#4};}}

然后您就可以使用 textcomp 来实现正常的右箭头。

\usepackage{textcomp}

\chemfig{@{a}H-[1]@{b}\chemabove{N}{\uparrow}(<[6]@{c}H)-[7]@{d}H} 

\namebond{a}{b}{\textrightarrow}
\namebond{c}{b}{\textrightarrow}
\namebond{d}{b}{\textleftarrow}

结果

答案3

我使用以下代码:

\scalebox{1.25}{
\chemfig{C(-[:90]H(-[::270,0.5,,,draw=none]@{e}))
(-[:-150]H(-[::270,0.25,,,draw=none]@{c}))
(-[:-100]H(-[::90,0.60,,,draw=none]@{g}))
(-[:-30]H(-[::52,0.75,,,draw=none]@{a}))
(-[::-30,0.5,,,draw=none]@{h})
(-[::30,0.6,,,draw=none]@{f})
(-[::105,0.25,,,draw=none]@{d})
(-[::15,0.75,,,draw=none]@{b})
(-[::0,2.5,,,draw=none]@{j})}}
\chemmove{
      \draw[|->, very thick] (a)--(b);
      \draw[|->, very thick] (c)--(d);
      \draw[|->, very thick] (e)--(f);
      \draw[|->, very thick] (g)--(h);
      \node at (j) {$\mu = 0$};
     }
\qquad
\scalebox{1.25}{
\chemfig{@{x1}\lewis{2:,N}
(-[:-150]H(-[::270,0.25,,,draw=none]@{c}))
(-[:-100]H(-[::90,0.60,,,draw=none]@{g}))
(-[:-30]H(-[::52,0.75,,,draw=none]@{a})
(-[::0,1.25,,,draw=none]@{e}))
(-[::-30,0.5,,,draw=none]@{h})
(-[::105,0.25,,,draw=none]@{d})
(-[::15,0.75,,,draw=none]@{b})
(-[::0,2,,,draw=none]@{f})}}
\chemmove{
      \draw[|->, very thick] (a)--(b);
      \draw[|->, very thick] (c)--(d);
      \draw[|->, very thick] (g)--(h);
      \draw[|->, very thick] (e)--++(90:1.25) node [midway, right] {$\mu > 0$};
     }
\qquad
\scalebox{1.25}{
\chemfig{O(-[:210]H(-[::270,0.25,,,draw=none]@{c}))
(-[:-30]H(-[::52,0.75,,,draw=none]@{a})
(-[::0,1.25,,,draw=none]@{e}))
(-[::30,0.75,,,draw=none]@{b})
(-[::105,0.25,,,draw=none]@{d})
(-[::0,2,,,draw=none]@{f})}}
\chemmove{
      \draw[|->, very thick] (a)--(b);
      \draw[|->, very thick] (c)--(d);
      \draw[|->, very thick] (e)--++(90:1.25) node [midway, right] {$\mu > 0$};
     }

在此处输入图片描述

相关内容