12

I'm looking for a method to draw molecules as skeleton structures via chemfig and include some atomic orbitals (i.e. s, p and d orbitals and some sp-hybrid orbitals too) into them (at positions where chemfig places atomlabels, i.e. at the ends of bonds). I give you an example:

enter image description here

The shapes needed for the different orbitals essentially boil down to the following

enter image description here

The right appearence would then be achieved by rotating and scaling these orbitals. This should ideally work with a simple command which tells chemfig to insert an orbital of a certain type (i.e. s, p, d, ...) at an atomic position and how this orbital shall be rotated, scaled or colored and which phase it should have. Is this doable? Or is there a package out there which provides such a functionality?

2 Answers 2

13

The chemmacros package offers s,p and sp-hybrid orbitals (based on TikZ), d orbitals are missing (for now). These are examples from the documentation:

\documentclass{article}
\usepackage{chemfig,chemmacros}

\begin{document}

 \setbondoffset{0pt}
 \chemsetup[orbital]{
   overlay ,
   opacity = .75 ,
   p/scale = 1.6 ,
   s/color = blue!50 ,
   s/scale = 1.6
 }
 \chemfig{\orbital{s}-[:-20]{\orbital[scale=2]{p}}{\orbital[half,angle=0]{p}}{\orbital[angle=170,half]{p}}{\orbital[angle=-150,half]{p}}(-[:-150]\orbital{s})-\orbital{s}}

\end{document}

enter image description here

\documentclass{article}
\usepackage{chemfig,chemmacros}

\begin{document}

 \chemsetup[orbital]{
   overlay,
   p/color = black!70
 }
 \setbondoffset{0pt}
 \chemfig{?\orbital{p}-[,1.3]{\orbital[phase=-]{p}}-[:30,1.1]\orbital{p}-[:150,.9]{\orbital[phase=-]{p}}-[4,1.3]\orbital{p}-[:-150,1.1]{\orbital[phase=-]{p}}?}

\end{document}

enter image description here

11
  • 1
    Thank you. That's an awesome package. That mostly solves my problem. There is only one tiny drawback: it includes s, p and sp-hybrid orbitals but no d orbitals. Is there also a solution for that? Or could you include them in a future version of chemmacros?
    – Philipp
    Jun 21, 2012 at 15:46
  • 1
    @Philipp I have that on my TODO list for a while now. Maybe I can put it a bit higher on my list, though.
    – cgnieder
    Jun 21, 2012 at 15:48
  • Sorry, I seem to have skipped the sentence where you alread wrote that there are no d orbitals included in the package. I guess I got distracted by the stunning pictures ;) It's nice to hear that it is already on your TODO list. Until then I will try to get by with ChemDraw when I have to draw something with d orbitals.
    – Philipp
    Jun 21, 2012 at 15:54
  • 1
    The only real problem is the d$_z$ orbital. The others could be modelled by using 4 times \orbital[half]{p} with appropriate angles and colors...
    – cgnieder
    Jun 21, 2012 at 16:38
  • I guess it is the torus contained in the $\mathrm{d}_{z^2}$ orbital which makes things complicated. Would it make things easier to build the orbital from two half p orbitals sandwiching an ellipse between them (like in the pictures contained in my question) or can't this be handled properly when it comes to rotation, scaling etc.?
    – Philipp
    Jun 22, 2012 at 11:29
1

Regarding the dz2 orbital problem, I found a poor's guy solution using tikz (I was not able to let the ball shading brighter, as in the chemmacros. I'm not a latex expert, just gather other people's stuff. Hopefully something better comes out):

\documentclass{standalone}

% tikz packages
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.15}
\usetikzlibrary{shapes}

% chemistry packages
\usepackage{chemfig,chemmacros}
\usechemmodule{all}
\chemsetup[orbital]{
   overlay,
   p/color = black!70
 }

% defining orbitals in boxes to put chemfig inside tikz environment
\newsavebox\UpBox
\sbox\UpBox{\orbital[half,angle=90,scale=3]{p}}
\newsavebox\DownBox
\sbox\DownBox{\orbital[half,angle=270,scale=3]{p}}

\begin{document}

\begin{tikzpicture}

%back axis
\draw[dashed] (0,0) -- (-2,0) node[anchor=north west] {};
\draw[dashed] (0,0) -- (0,-2.5) node[anchor=south east] {};
\draw[dashed] (0,0) -- (1.5,1.5) node[anchor=north west] {};


% orbital p (half) down
\draw (0,0) node {\usebox\DownBox};

% drawing simple torus
\fill[ball color=white] (0,0) ellipse (1 and .55);
\begin{scope}
  \clip (0,-.9) ellipse (1 and 1.1);
  \path[draw](0,1.1) ellipse (1 and 1.1);
\end{scope}

% orbital p (half) up
\draw (0,0) node {\usebox\UpBox};

%front axis
\draw[thick,->] (.85,0) -- (2,0) node[anchor=north west] {$x$};
\draw[thick,->] (0,1.4) -- (0,2.5) node[anchor=south east] {$z$};
\draw[thick,->] (-.4,-.4) -- (-1.5,-1.5) node[anchor=north west] {$y$};

\end{tikzpicture}

\end{document}

enter image description here

You must log in to answer this question.

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