5

I haven't been able to find anything in chemfig for adding dipole moments to my molecules beyond creating custom arrows with tikz, which is more involved than I'd like at the moment. Is there some standard way to do this?

2
  • Potentially of interest. This doesn't help with the arrow situation to actually show the dipole however. Aug 11, 2015 at 18:01
  • Can you add an image what you want obtain?
    – skevin93
    Aug 11, 2015 at 20:46

3 Answers 3

5

This is more of a comment than an answer but I use the tikz arrow |-> to overcome my issue. It's not exactly what I want but gets me out of a bind for the moment.

\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}

enter image description here

1
  • 1
    Nice answer! Additionally, you can set padding for the vertical line at the beginning of the arrow with underscores (3 or 4), and also use chemfig's CF arrow head type: \draw[____|-CF, thick] (b)--(a); to mke it look more consistent and according to the common notation (result).
    – andselisk
    Oct 4, 2019 at 13:22
2

Create a command called name bond as such :

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

Then you can just use textcomp to implement a normal rightarrow.

\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}

The result

0

I use the following code:

\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$};
     }

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .