Debian Codegraph @

texmf-dist/doc/latex/modiagram/modiagram_en.tex

raw
1 % arara: pdflatex
2 % arara: pdflatex
3 % --------------------------------------------------------------------------
4 % the MODIAGRAM package
5 %
6 % easy creation of molecular orbital diagrams
7 %
8 % --------------------------------------------------------------------------
9 % Clemens Niederberger
10 % Web: https://www.bitbucket.org/cgnieder/modiagram
11 % E-Mail: [email protected]
12 % --------------------------------------------------------------------------
13 % If you have any ideas, questions, suggestions or bugs to report, please
14 % feel free to contact me.
15 % --------------------------------------------------------------------------
16 % Copyright 2011--2020 Clemens Niederberger
17 %
18 % This work may be distributed and/or modified under the
19 % conditions of the LaTeX Project Public License, either version 1.3c
20 % of this license or (at your option) any later version.
21 % The latest version of this license is in
22 % http://www.latex-project.org/lppl.txt
23 % and version 1.3c or later is part of all distributions of LaTeX
24 % version 2008/05/04 or later.
25 %
26 % This work has the LPPL maintenance status `maintained'.
27 %
28 % The Current Maintainer of this work is Clemens Niederberger.
29 %
30 % This work consists of the files modiagram.sty, modiagram_en.tex,
31 % README and the derived file modiagram_en.pdf.
32 % --------------------------------------------------------------------------
33 \documentclass[load-preamble+]{cnltx-doc}
34
35 \usepackage{modiagram}
36
37 \setcnltx{
38 package = modiagram ,
39 authors = Clemens Niederberger ,
40 email = [email protected] ,
41 url = https://bitbucket.org/cgnieder/modiagram/ ,
42 add-cmds = {
43 AO,
44 atom,
45 connect,
46 EnergyAxis,
47 molecule,
48 setmodiagram
49 } ,
50 add-envs = { modiagram } ,
51 add-silent-cmds = {
52 ch,
53 draw,
54 chlewis,
55 node,
56 textcolor,
57 chemsigma,
58 chemSigma
59 } ,
60 abstract = {%
61 \begin{modiagram}[style=fancy,distance=7cm,AO-width=15pt,labels,names]
62 \atom[N]{left}{ 2p = {0;up,up,up} }
63 \atom[O]{right}{ 2p = {2;pair,up,up} }
64 \molecule[NO]{
65 2pMO = {1.8,.4;pair,pair,pair,up},
66 color = { 2piy*=red }
67 }
68 \end{modiagram}
69 }
70 }
71
72 \newpackagename\modiag{modiagram}
73
74 \defbibheading{bibliography}{\addsec{References}}
75
76 \usepackage{booktabs}
77
78 \usepackage{acro}
79 \DeclareAcronym{AO}{
80 short = AO ,
81 long = atomic orbital
82 }
83 \DeclareAcronym{MO}{
84 short = MO ,
85 long = molecular orbital
86 }
87
88 \makeatletter
89 \def\libertine@figurestyle{LF}
90 \RequirePackage{amsmath}
91 \undef\lvert \undef\lVert
92 \undef\rvert \undef\rVert
93 \RequirePackage[libertine]{newtxmath}
94 \def\libertine@figurestyle{OsF}
95 \makeatother
96
97 \usepackage{chemmacros,chemformula}
98 \chemsetup{
99 greek = newtx,
100 modules = units
101 }
102 \setchemformula{format=\libertineLF}
103
104 \NewDocumentCommand \AOinline { o m }
105 {%
106 \begingroup
107 \IfNoValueTF{#1}
108 {\setmodiagram{ style=square,AO-width=8pt }}%
109 {\setmodiagram{ style=square,AO-width=8pt , #1 }}%
110 \begin{modiagram}
111 \AO{s}{0;#2}
112 \end{modiagram}%
113 \endgroup
114 }
115
116 \newcommand*\TikZ{Ti\textit{k}Z}
117
118 \begin{document}
119
120 \section{Licence, Requirements}
121 \license
122
123 \modiag\ uses \bnd{l3kernel}~\cite{bnd:l3kernel} and
124 \bnd{l3packages}~\cite{bnd:l3packages}. It also uses \TikZ~\cite{pkg:pgf} and
125 the package \pkg{chemgreek}~\cite{pkg:chemgreek} bundle. Additionally the
126 \TikZ\ libraries \code{calc} and \code{arrows} are loaded. Knowledge of
127 \TikZ\ is helpful.
128
129 \section{Motivation}
130 This package has been written as a reaction to a question on
131 \url{http://tex.stackexchange.com/}. To be more precise: as a reaction to the
132 question
133 ``\href{http://tex.stackexchange.com/questions/13863/molecular-orbital-diagrams-in-latex}%
134 {Molecular orbital diagrams in LaTeX}.'' There it says
135 \begin{cnltxquote}
136 I'm wondering if anyone has seen a package for drawing (qualitative)
137 molecular orbital splitting diagrams in \LaTeX? Or if there exist any
138 packages that can be easily re-purposed to this task?
139
140 Otherwise, I think I'll have a go at it in \TikZ.
141 \end{cnltxquote}
142 The problem was solved using \TikZ, since no package existed for that purpose.
143 For one thing \modiag\ is intended to fill this gap. I also found it very
144 tedious, to make all this copying and pasting when I needed a second, third,
145 \ldots\ diagram. \modiag\ took care of that.
146
147
148 \section{Main Commands}
149 All molecular orbital (MO) diagrams are created using the environment
150 \env{modiagram}{}.
151
152 \subsection{The \cs*{atom} Command}
153 \begin{commands}
154 \command{atom}[\oarg{name}\Marg{\meta{left}|\meta{right}}\marg{AO-spec}]
155 Place an \acs{AO} in the diagram. \meta{name} is caption of the atom,
156 \meta{left} and \meta{right} determine the placement in the diagram,
157 \meta{AO-spec} is the specification of the \ac{AO}.
158 \end{commands}
159
160 Let's take a look at an example:
161 \begin{example}[side-by-side]
162 \begin{modiagram}
163 \atom{right}{
164 1s = { 0; pair} ,
165 2s = { 1; pair} ,
166 2p = {1.5; up, down }
167 }
168 \end{modiagram}
169 \end{example}
170
171 As you can see, the argument \meta{AO-spec} is essential to create the actual
172 orbitals and the electrons within. You can use these key/value pairs to specify
173 what you need:
174 \begin{options}
175 \keychoice{1s}{\{\meta{rel-energy}; \meta{el-spec}\}}
176 Energy level and electron specifications for the 1s orbital.
177 \keychoice{2s}{\{\meta{rel-energy}; \meta{el-spec}\}}
178 Energy level and electron specifications for the 2s orbital.
179 \keychoice{2p}{\{\meta{rel-energy}; \meta{x el-spec}{,} \meta{y el-spec}{,}
180 \meta{z el-spec}\}}
181 Energy level and electron specifications for the 2p orbitals.
182 \end{options}
183 \meta{el-spec} can have the values \code{pair}, \code{up} and \code{down} or
184 can be left empty. \meta{rel-energy} actually is the $y$ coordinate and shifts
185 the \ac{AO} vertically by \meta{rel-energy} \si{\centi\metre}.
186
187 The argument \meta{left}/\meta{right} is important, when p~orbitals are used.
188 For instance compare the following example to the one before:
189 \begin{example}[side-by-side]
190 \begin{modiagram}
191 \atom{left}{
192 1s = { 0; pair} ,
193 2s = { 1; pair} ,
194 2p = {1.5; up, down }
195 }
196 \end{modiagram}
197 \end{example}
198
199 When both variants are used one can also see, that the right atom is shifted to
200 the right (hence the naming). The right atom is shifted by \SI{4}{\centi\metre}
201 per default and can be adjusted individually, see page~\pageref{option:distance}.
202 \begin{example}
203 \begin{modiagram}
204 \atom{left}{
205 1s = { 0; pair} ,
206 2s = { 1; pair} ,
207 2p = {1.5; up, down }
208 }
209 \atom{right}{
210 1s = { 0; pair} ,
211 2s = { 1; pair} ,
212 2p = {1.5; up, down }
213 }
214 \end{modiagram}
215 \end{example}
216 With the command \cs{molecule} (section~\ref{ssec:molecule}) the reason for the
217 shift becomes clear.
218
219 Any of the arguments for the \ac{AO} can be left empty or be omitted.
220 \begin{example}[side-by-side]
221 Without argument: default height, full:\par
222 \begin{modiagram}
223 \atom{left}{1s, 2s, 2p}
224 \end{modiagram}
225 \end{example}
226
227 \begin{example}[side-by-side]
228 empty argument: default height, empty:\par
229 \begin{modiagram}
230 \atom{left}{1s=, 2s=, 2p=}
231 \end{modiagram}
232 \end{example}
233
234 \begin{example}[side-by-side]
235 using some values:\par
236 \begin{modiagram}
237 \atom{left}{1s, 2s=1, 2p={;,up} }
238 \end{modiagram}
239 \end{example}
240
241 \subsection{The \cs*{molecule} Command}\label{ssec:molecule}
242 \begin{commands}
243 \command{molecule}[\oarg{name}\marg{MO-spec}]
244 Place a \acs{MO} in the diagram. \meta{name} is caption of the molecule,
245 \meta{MO-spec} is the specification of the \ac{MO}.
246 \end{commands}
247
248 An example first:
249 \begin{example}[side-by-side]
250 \begin{modiagram}
251 \atom{left} { 1s = { 0; up } }
252 \atom{right}{ 1s = { 0; up } }
253 \molecule { 1sMO = {.75; pair } }
254 \end{modiagram}
255 \end{example}
256 The command \cs{molecule} connects the \acp{AO} with the bonding and
257 anti-bondung \acp{MO}. \cs{molecule} can only be used \emph{after} one has
258 set \emph{both} atoms since the orbitals that are to be connected must be
259 known.
260
261 The argument \meta{MO-spec} accepts a comma separated list of key/value pairs:
262 \begin{options}
263 \keychoice{1sMO}{\{\meta{energy gain}/\meta{energy loss}; \meta{s
264 el-spec}{,} \meta{s* el-spec}\}}
265 connects the \acp{AO} specified by \option{1s}.
266 \keychoice{2sMO}{\{\meta{energy gain}/\meta{energy loss}; \meta{s
267 el-spec}{,} \meta{s* el-spec}\}}
268 connects the \acp{AO} specified by \option{2s}
269 \keychoice{2pMO}{\{\meta{s energy gain}/\meta{s energy loss}{,} \meta{p
270 energy gain}/\meta{p energy loss}; \meta{s el-spec}{,} \meta{py
271 el-spec}{,} \meta{pz el- spec}{,} \meta{py* el-spec}{,} \meta{pz*
272 el-spec}{,} \meta{s* el-spec}\}}
273 connects the \acp{AO} specified by \option{2p}.
274 \end{options}
275
276 Obviously the regarding \acp{AO} must have been set in order to connect them.
277 This for example won't work:
278 \begin{sourcecode}
279 \begin{modiagram}
280 \atom{left} { 1s = 0 }
281 \atom{right}{ 1s = 0 }
282 \molecule { 2sMO = .75 }
283 \end{modiagram}
284 \end{sourcecode}
285 The value used in \meta{energy gain} determines how many \si{\centi\metre} the
286 bonding \ac{MO} lies below the lower \ac{AO} or how many \si{\centi\metre} the
287 anti-bondung \ac{MO} lies above the higher \ac{AO}.
288
289 \begin{example}[side-by-side]
290 same level:\par
291 \begin{modiagram}
292 \atom{left} { 1s = { 0; up } }
293 \atom{right}{ 1s = { 0; up } }
294 \molecule { 1sMO = {.75; pair } }
295 \end{modiagram}
296
297 different levels:\par
298 \begin{modiagram}
299 \atom{left} { 1s = { 0; up } }
300 \atom{right}{ 1s = { 1; up } }
301 \molecule { 1sMO = {.25; pair } }
302 \end{modiagram}
303 \end{example}
304
305 If you specify \meta{energy loss} you can create non-symmetrical splittings.
306 Then, the first value (\meta{energy gain}) is used for the bonding \ac{MO} and
307 the second value (\meta{energy loss}) is used for the anti-bonding \ac{MO}.
308 \begin{example}[side-by-side]
309 \begin{modiagram}
310 \atom{left} { 1s = { 0; up } }
311 \atom{right}{ 1s = { 0; up } }
312 \molecule { 1sMO = {.75/.25; pair } }
313 \end{modiagram}
314
315 \begin{modiagram}
316 \atom{left} { 1s = { 0; up } }
317 \atom{right}{ 1s = { 1; up } }
318 \molecule { 1sMO = {.25/.75; pair } }
319 \end{modiagram}
320 \end{example}
321
322 Please be aware, that you have to specify \emph{two} such values or pairs with
323 \option{2pMO}: the splitting of the \chemsigma\ orbitals and the splitting of
324 the \chempi\ orbitals.
325 \begin{example}
326 \begin{modiagram}
327 \atom{left} { 2p = { 0; up, up } }
328 \atom{right}{ 2p = { 1; up, up } }
329 \molecule { 2pMO = { 1.5, .75; pair, up, up } }
330 \end{modiagram}
331 \end{example}
332
333 The complete \ac{MO} diagram for triplett dioxygen now could look something
334 like that:
335 \begin{example}
336 \begin{modiagram}
337 \atom{left}{
338 1s, 2s, 2p = {;pair,up,up}
339 }
340 \atom{right}{
341 1s, 2s, 2p = {;pair,up,up}
342 }
343 \molecule{
344 1sMO, 2sMO, 2pMO = {;pair,pair,pair,up,up}
345 }
346 \end{modiagram}
347 \end{example}
348
349 \subsection{The Naming Scheme}\label{Namensgebung}
350 Since one wants to be able to put labels to the orbitals and since they are
351 nodes in a \env*{tikzpicture}, the internal naming scheme is important. It
352 closely follows the function:
353 \begin{center}
354 \begin{modiagram}[
355 distance = 6cm,
356 AO-width = 20pt,
357 labels-fs = \ttfamily\footnotesize,
358 labels-style = {yshift=10pt}
359 ]
360 \atom{left}{
361 1s = 0 ,
362 2s = 2 ,
363 2p = 5 ,
364 label = {
365 1sleft = {1sleft} ,
366 2sleft = {2sleft} ,
367 2pxleft = {2pxleft} ,
368 2pyleft = {2pyleft} ,
369 2pzleft = {2pzleft}
370 }
371 }
372 \atom{right}{
373 1s = 0 ,
374 2s = 2 ,
375 2p = 5 ,
376 label = {
377 1sright = {1sright} ,
378 2sright = {2sright} ,
379 2pxright = {2pxright} ,
380 2pyright = {2pyright} ,
381 2pzright = {2pzright}
382 }
383 }
384 \molecule{
385 1sMO = .5 ,
386 2sMO = .5 ,
387 2pMO = {1.5,.5} ,
388 label = {
389 1sigma = {1sigma} ,
390 1sigma* = {1sigma*} ,
391 2sigma = {2sigma} ,
392 2sigma* = {2sigma*} ,
393 2psigma = {2psigma} ,
394 2psigma* = {2psigma*} ,
395 2piy = {2piy} ,
396 2piy* = {2piy*} ,
397 2piz = {2piz} ,
398 2piz* = {2piz*}
399 }
400 }
401 \end{modiagram}
402 \end{center}
403
404 With these names it is possible to reference the orbitals with the known \TikZ
405 commands:
406 \begin{example}[side-by-side]
407 \begin{modiagram}
408 \atom{left} { 1s = 0 }
409 \atom{right}{ 1s = 0 }
410 \molecule { 1sMO = .75 }
411 \draw[<->,red,semithick]
412 (1sigma.center) -- (1sigma*.center) ;
413 \draw[red]
414 (1sigma*) ++ (2cm,.5cm) node {splitting} ;
415 \end{modiagram}
416 \end{example}
417
418 \begin{example}
419 \begin{modiagram}
420 \atom{left} { 1s = 0 }
421 \atom{right}{ 1s = 0 }
422 \molecule { 1sMO = .75 }
423 \draw[draw=blue,very thick,fill=blue!40,opacity=.5]
424 (1sigma*) circle (8pt);
425 \draw[<-,shorten <=8pt,shorten >=15pt,blue]
426 (1sigma*) --++(2,1) node {anti-bonding MO};
427 \end{modiagram}
428 \end{example}
429
430 \subsection{Placing AOs and MOs Arbitrarily}\label{ssec:AO_MO_irgendwo}
431 The standard orbitals are not always sufficient in order to draw a correct
432 \ac{MO} diagram. For example in the \ac{MO} diagram of \ch{XeF2} one would
433 need the part that illustrates the interaction between the bonding and
434 anti-bonding combination of two p orbitals of Flourine with one p orbital of
435 Xenon:
436
437 \begin{center}
438 \begin{modiagram}[names]
439 \atom[\chlewis{0.}{F}\hspace*{5mm}\chlewis{180.}{F}]{left}{
440 1s=.2;up,up-el-pos={1sleft=.5}
441 }
442 \atom[Xe]{right}{1s=1.25;pair}
443 \molecule[\ch{XeF2}]{1sMO={1/.25;pair}}
444 \AO(1cm){s}{0;up}
445 \AO(3cm){s}{0;pair}
446 \connect{ AO1 & AO2 }
447 \node[right,xshift=4mm] at (1sigma) {\footnotesize bonding};
448 \node[above] at (AO2.90) {\footnotesize non-bonding};
449 \node[above] at (1sigma*.90) {\footnotesize anti-bonding};
450 \end{modiagram}
451 \end{center}
452
453 To create diagrams like this there is the following command, which draws a single
454 \ac{AO}:
455 \begin{commands}
456 \command{AO}[\oarg{name}\darg{xshift}\marg{type}\oarg{options}\Marg{\meta{energy};
457 \meta{el-spec}}]
458 Place an \acs{AO} in the diagram. \meta{<name>} (optional) is the name of
459 the node; if not specified, \code{AO\#} is used where \code{\#} is a
460 consecutive number. \meta{xshift} is the vertical position of the orbital(s),
461 a \TeX\ dimension. \meta{type} can be \code{s} or \code{p}.
462 \meta{options} is a list of key/value pairs with which the \ac{AO} can be
463 customized, see section~\ref{ssec:AO_anpassen}. \meta{AO-spec} is the
464 specification of the \ac{AO}.
465 \end{commands}
466
467 Depending on the \meta{type} one s or three p orbitals are drawn.
468 \begin{example}[side-by-side]
469 \begin{modiagram}
470 \AO{s}{0;}
471 \AO(-20pt){p}{1;pair,up,down}
472 \end{modiagram}
473 \end{example}
474
475 If one wants to place such an \ac{AO} at the position of an atom, one has to
476 know their \meta{xshift}. They have predefined values (also see
477 section~\ref{orbital-positionen}):\label{xshift}
478 \begin{itemize}
479 \item atom left: \SI{1}{\centi\metre}
480 \item molecule: \SI{3}{\centi\metre}
481 \item atom right: \SI{5}{\centi\metre}
482 \end{itemize}
483
484 \begin{example}[side-by-side]
485 \begin{modiagram}
486 \atom{left} {1s=0}
487 \atom{right}{1s=0}
488 \molecule {1sMO=1}
489 \AO(1cm){s}{2}
490 \AO(3cm){s}{2}
491 \AO(5cm){s}{2}
492 \end{modiagram}
493 \end{example}
494
495 Within the p orbitals there is an additional shift by \SI{20}{pt} per orbital.
496 This is equivalent to a double shift by the length \code{AO-width} (see
497 section~\ref{option:AO-width}):
498 \begin{example}
499 \begin{modiagram}
500 \atom{left} {2p=0}
501 \atom{right}{2p=0}
502 % above the left atom:
503 \AO(1cm) {s}{ .5}
504 \AO(1cm-20pt){s}{ 1;up}
505 \AO(1cm-40pt){s}{1,5;down}
506 % above the right atom:
507 \AO(1cm) {s}{ .5}
508 \AO(5cm+20pt){s}{ 1;up}
509 \AO(5cm+40pt){s}{1.5;down}
510 \end{modiagram}
511 \end{example}
512
513 The \acp{AO} created with \cs{AO} also can be connected. For this you can use
514 the \TikZ\ command \cs*{draw}, of course. You can use the predefined node
515 names\ldots
516 \begin{example}
517 \begin{modiagram}
518 \AO{s}{0} \AO(2cm){s}{1}
519 \AO{s}{2} \AO(2cm){s}{1.5}
520 \draw[red] (AO1.0) -- (AO2.180) (AO3.0) -- (AO4.180);
521 \end{modiagram}
522 \end{example}
523 \ldots\ or use own node names
524 \begin{example}
525 \begin{modiagram}
526 \AO[a]{s}{0} \AO[b](2cm){s}{1}
527 \AO[c]{s}{2} \AO[d](2cm){s}{1.5}
528 \draw[red] (a.0) -- (b.180) (c.0) -- (d.180);
529 \end{modiagram}
530 \end{example}
531
532 The predefined names are \code{AO1}, \code{AO2} \etc for the type \code{s} and
533 \code{AO1x}, \code{AO1y}, \code{AO1z}, \code{AO2x} \etc\ for the type
534 \code{p}. Nodes of the type \code{p} get an \code{x}, \code{y} or \code{z} if
535 you specify your own name, too.
536 \begin{example}
537 \begin{modiagram}
538 \AO{p}{0}
539 \draw[<-,shorten >=5pt] (AO1y.-90) -- ++ (.5,-1) node {y};
540 \end{modiagram}
541 and
542 \begin{modiagram}
543 \AO[A]{p}{0}
544 \draw[<-,shorten >=5pt] (Ay.-90) -- ++ (.5,-1) node {y};
545 \end{modiagram}
546 \end{example}
547
548 However, if you want the lines to be drawn in the same style as the ones
549 created by \cs{molecule}\footnote{which can be customized, see
550 page~\pageref{option:lines}}, you should use the command \cs{connect}.
551 \begin{commands}
552 \command{connect}[\marg{AO-connect}]
553 Connects the specified \acp{AO}. \meta{AO-connect} is comma separated
554 list of node name pairs connected with \code{\&}.
555 \end{commands}
556 This command expects a comma separated list of node name pairs that are to be
557 connected. The names have to be connected with a \code{\&}:
558 \begin{example}[side-by-side]
559 \begin{modiagram}
560 \AO{s}{0;} \AO(2cm){s}{1;}
561 \AO{s}{2;} \AO(2cm){s}{1.5;}
562 \connect{ AO1 & AO2, AO3 & AO4 }
563 \end{modiagram}
564 \end{example}
565
566 Some things still need to be said: \cs{connect} adds the anchor \code{east} to
567 the first name and the anchor \code{west} to the second one. This means a
568 connection only makes sense from the left to the right. However, you can add
569 own anchors using the usual \TikZ\ way:
570 \begin{example}
571 \begin{tikzpicture}
572 \draw (0,0) node (a) {a} ++ (1,0) node (b) {b}
573 ++ (0,1) node (c) {c} ++ (-1,0) node (d) {d} ;
574 \connect{ a.90 & d.-90, c.180 & d.0 }
575 \end{tikzpicture}
576 \end{example}
577
578 \subsection{The Positioning Scheme}\label{orbital-positionen}
579 The figure below shows the values of the $x$ coordinates of the orbitals
580 depending on the values of \meta{distance} (\meta{dist}) and \meta{AO-width}
581 (\meta{AO}). In sections~\ref{option:distance} and \ref{option:AO-width} these
582 lengths and how they can be changed are discussed.
583 \begin{center}
584 \begin{modiagram}[
585 AO-width = 22pt ,
586 labels-fs = \ttfamily\tiny ,
587 labels-style = {text width=40pt,align=center,yshift=11pt}]
588 \atom{left}{
589 1s = 0 ,
590 2s = 2 ,
591 2p = 5.5 ,
592 label = {
593 1sleft = {1cm} ,
594 2sleft = {1cm} ,
595 2pxleft = {1cm - 4*\meta{AO}} ,
596 2pyleft = {1cm - 2*\meta{AO}} ,
597 2pzleft = {1cm}
598 }}
599 \atom{right}{
600 1s = 0 ,
601 2s = 2 ,
602 2p = 5.5 ,
603 label = {
604 1sright = {1cm + \meta{dist}} ,
605 2sright = {1cm + \meta{dist}} ,
606 2pxright = {1cm+ \meta{dist}} ,
607 2pyright = {1cm + \meta{dist} + 2*\meta{AO}} ,
608 2pzright = {1cm + \meta{dist} + 4*\meta{AO}}
609 }}
610 \molecule{
611 1sMO = .5 ,
612 2sMO = .5 ,
613 2pMO = {2,.75} ,
614 label = {
615 1sigma = {.5*\meta{dist} + 1cm} ,
616 1sigma* = {.5*\meta{dist} + 1cm} ,
617 2sigma = {.5*\meta{dist} + 1cm} ,
618 2sigma* = {.5*\meta{dist} + 1cm} ,
619 2psigma = {.5*\meta{dist} + 1cm} ,
620 2psigma* = {.5*\meta{dist} + 1cm} ,
621 2piy = {.5*\meta{dist} + 1cm - \meta{AO}} ,
622 2piy* = {.5*\meta{dist} + 1cm - \meta{AO}} ,
623 2piz = {.5*\meta{dist} + 1cm + \meta{AO}} ,
624 2piz* = {.5*\meta{dist} + 1cm + \meta{AO}}
625 }
626 }
627 \end{modiagram}
628 \end{center}
629
630 \subsection{Default Values}
631 If you leave the arguments (or better: values) for the specification of the
632 \ac{AO} or \ac{MO} empty or omit them, default values are used. The table below
633 shows you, which ones.
634 \begin{center}
635 \small
636 \begin{tabular}{l>{\ttfamily}l>{\ttfamily}l>{\ttfamily}l}
637 \toprule &
638 \normalfont\bfseries\ac{AO}/\ac{MO} &
639 \normalfont\bfseries omitted &
640 \normalfont\bfseries empty \\
641 \midrule
642 syntax:
643 & & 1s & 1s= \\
644 \midrule
645 & 1s & \{0;pair\} & \{0;\} \\
646 & 2s & \{2;pair\} & \{2;\} \\
647 & 2p & \{5;pair,pair,pair\} & \{5;,{},\} \\
648 \midrule
649 & 1sMO & \{.5;pair,pair\} & \{.5;,\} \\
650 & 2sMO & \{.5;pair,pair\} & \{.5;,\} \\
651 & 2pMO & \{1.5,.5;pair,pair,pair,pair,pair,pair\} & \{1.5,.5;{},{},{},{},{},\} \\
652 \bottomrule
653 \end{tabular}
654 \end{center}
655
656 This is similar for the \cs{AO} command (page~\pageref{ssec:AO_MO_irgendwo});
657 it needs a value for \meta{energy}, though.
658
659 \begin{center}
660 \small
661 \begin{tabular}{>{\ttfamily}l>{\ttfamily}l>{\ttfamily}l}
662 \toprule
663 \bfseries\meta{type} & \bfseries \meta{el-spec} \\
664 \midrule
665 s & pair \\
666 p & pair,pair,pair \\
667 \bottomrule
668 \end{tabular}
669 \end{center}
670
671 Compare these examples:
672 \begin{example}[side-by-side]
673 \begin{modiagram}
674 \atom{left} { 1s={0;pair} }
675 \atom{right}{ 1s }
676 \end{modiagram}
677
678 \hrulefill
679
680 \begin{modiagram}
681 \atom{left}{ 1s=1 }
682 \atom{right}{ 1s= }
683 \end{modiagram}
684 \end{example}
685
686 \section{Customization}
687 The options of the section~\ref{ssec:umgebungs_optionen} can be set global as
688 package option, \ie, with \cs*{usepackage}\oarg{options}\Marg{modiagram}, or
689 via the setup command \cs{setmodiagram}\marg{options}.
690
691 \subsection{Environment Options}\label{ssec:umgebungs_optionen}
692 There are some options with which the layout of the \ac{MO} diagrams can be
693 changed:
694 \begin{options}
695 \keyval{style}{type}
696 change the style of the orbitals and the connecting lines,
697 section~\ref{option:style}.
698 \keyval{distance}{dim}
699 distance betwen left and right atom,
700 section~\ref{option:distance}.
701 \keyval{AO-width}{dim}
702 change the width of orbitals,
703 section~\ref{option:AO-width}.
704 \keyval{el-sep}{num}
705 distance between the electron pair arrows,
706 section~\ref{option:electrons}.
707 \keyval{up-el-pos}{num}
708 position of the spin-up arrow,
709 section~\ref{option:electrons}.
710 \keyval{down-el-pos}{num}
711 position of the spin-down arrow,
712 section~\ref{option:electrons}.
713 \keyval{lines}{tikz}
714 change the \TikZ\ style of the connecting lines,
715 section~\ref{option:lines}.
716 \keybool{names}
717 add captions to the atoms and the molecule,
718 section~\ref{option:names}.
719 \keyval{names-style}{tikz}
720 change the \TikZ\ style of the captions,
721 section~\ref{option:names_style}.
722 \keyval{names-style-add}{tikz}
723 change the \TikZ\ style of the captions,
724 section~\ref{option:names_style}.
725 \keybool{labels}
726 add default labels to the orbitals,
727 section~\ref{option:labels}.
728 \keyval{labels-fs}{cs}
729 change the font size of the labels,
730 section~\ref{option:labels-fs}.
731 \keyval{labels-style}{tikz}
732 change the \TikZ\ style of the labels,
733 section~\ref{option:labels-style}.
734 \end{options}
735 They all are discussed in the following sections. If they're used as options
736 for the environment, they're set locally and only change that environment.
737 \begin{sourcecode}
738 \begin{modiagram}[options]
739 ...
740 \end{modiagram}
741 \end{sourcecode}
742
743 \subsubsection{Option \option*{style}}\label{option:style}
744 There are five different styles which can be chosen.
745 \begin{itemize}
746 \item\keyis{style}{plain} \AOinline[style=plain]{pair} (default)
747 \item\keyis{style}{square} \AOinline[style=square]{pair}
748 \item\keyis{style}{circle} \AOinline[style=circle]{pair}
749 \item\keyis{style}{round} \AOinline[style=round]{pair}
750 \item\keyis{style}{fancy} \AOinline[style=fancy]{pair}
751 \end{itemize}
752
753 Let's take the \ac{MO} diagram of \ch{H2} to illustrate the different styles:
754 \begin{example}[side-by-side]
755 % use package `chemmacros'
756 \begin{modiagram}[style=plain]% default
757 \atom[H]{left} { 1s = {;up} }
758 \atom[H]{right}{ 1s = {;up} }
759 \molecule[\ch{H2}]{ 1sMO = {.75;pair} }
760 \end{modiagram}
761 \end{example}
762
763 \begin{example}[side-by-side]
764 % use package `chemmacros'
765 \begin{modiagram}[style=square]
766 \atom[H]{left} { 1s = {;up} }
767 \atom[H]{right}{ 1s = {;up} }
768 \molecule[\ch{H2}]{ 1sMO = {.75;pair} }
769 \end{modiagram}
770 \end{example}
771
772 \begin{example}[side-by-side]
773 % use package `chemmacros'
774 \begin{modiagram}[style=circle]
775 \atom[H]{left} { 1s = {;up} }
776 \atom[H]{right}{ 1s = {;up} }
777 \molecule[\ch{H2}]{ 1sMO = {.75;pair} }
778 \end{modiagram}
779 \end{example}
780
781 \begin{example}[side-by-side]
782 % use package `chemmacros'
783 \begin{modiagram}[style=round]
784 \atom[H]{left} { 1s = {;up} }
785 \atom[H]{right}{ 1s = {;up} }
786 \molecule[\ch{H2}]{ 1sMO = {.75;pair} }
787 \end{modiagram}
788 \end{example}
789
790 \begin{example}[side-by-side]
791 % use package `chemmacros'
792 \begin{modiagram}[style=fancy]
793 \atom[H]{left} { 1s = {;up} }
794 \atom[H]{right}{ 1s = {;up} }
795 \molecule[\ch{H2}]{ 1sMO = {.75;pair} }
796 \end{modiagram}
797 \end{example}
798
799 \subsubsection{Option \option*{distance}}\label{option:distance}
800 Depending on labels and captions the \SI{4}{\centi\metre} by which the right
801 and left atom are separated can be too small. With \key{distance}{dim} the
802 length can be adjusted. This will change the position of the right atom to
803 \code{1cm + \meta{dim}} and the position of the molecule is changed to
804 \code{0.5*(1cm + \meta{dim})}, also see page~\pageref{xshift} and
805 section~\ref{orbital-positionen}.
806 \begin{example}[side-by-side]
807 % use package `chemmacros'
808 \begin{modiagram}[distance=6cm]
809 \atom[H]{left} { 1s = {;up} }
810 \atom[H]{right}{ 1s = {;up} }
811 \molecule[\ch{H2}]{ 1sMO = {.75;pair} }
812 \end{modiagram}
813 \end{example}
814
815 \subsubsection{Option \option*{AO-width}}\label{option:AO-width}
816 The length \option{AO-width} sets the length of the horizontal line in a
817 orbital displayed with the \code{plain} style. It's default value is
818 \SI{10}{pt}.
819 \begin{example}[side-by-side]
820 % use package `chemmacros'
821 \begin{modiagram}[AO-width=15pt]
822 \atom[H]{left} { 1s = {;up} }
823 \atom[H]{right}{ 1s = {;up} }
824 \molecule[\ch{H2}]{ 1sMO = {.75;pair} }
825 \end{modiagram}
826 \end{example}
827
828 \begin{example}[side-by-side]
829 % use package `chemmacros'
830 \begin{modiagram}[style=fancy,AO-width=15pt]
831 \atom[H]{left} { 1s = {;up} }
832 \atom[H]{right}{ 1s = {;up} }
833 \molecule[\ch{H2}]{ 1sMO = {.75;pair} }
834 \end{modiagram}
835 \end{example}
836 By changing the value of \option{AO-width} the positions of the p and the
837 \chempi\ orbitals also change, see section~\ref{orbital-positionen}.
838
839 \subsubsection{Optionen \option*{el-sep}, \option*{up-el-pos} und
840 \option*{down-el-pos}}
841 \label{option:electrons}
842
843 These three options change the horizontal positions of the arrows representing
844 the electrons in an \ac{AO}/\ac{MO}. The option \key{el-sep}{num} needs a
845 value between \code{0} and \code{1}. \code{0} means \emph{no} distance between
846 the arrows and \code{1} \emph{full} distance (with respect to the length
847 \option{AO-width}, see section~\ref{option:AO-width}).
848
849 \begin{example}[side-by-side]
850 % use package `chemmacros'
851 \begin{modiagram}[el-sep=.2]% default
852 \atom[H]{left} { 1s = {;up} }
853 \atom[H]{right}{ 1s = {;up} }
854 \molecule[\ch{H2}]{ 1sMO = {.75;pair} }
855 \end{modiagram}
856 \end{example}
857
858 \begin{example}[side-by-side]
859 % use package `chemmacros'
860 \begin{modiagram}[el-sep=0]
861 \atom[H]{left} { 1s = {;up} }
862 \atom[H]{right}{ 1s = {;up} }
863 \molecule[\ch{H2}]{ 1sMO = {.75;pair} }
864 \end{modiagram}
865 \end{example}
866
867 \begin{example}[side-by-side]
868 % use package `chemmacros'
869 \begin{modiagram}[el-sep=1]
870 \atom[H]{left} { 1s = {;up} }
871 \atom[H]{right}{ 1s = {;up} }
872 \molecule[\ch{H2}]{ 1sMO = {.75;pair} }
873 \end{modiagram}
874 \end{example}
875
876 The options \key{up-el-pos}{<num>} and \key{down-el-pos}{<num>} can be used
877 alternatively to place the spin-up and spin-down electron, respectively.
878 Again they need values between \code{0} and \code{1}. This time \code{0}
879 means \emph{on the left} and \code{1} means \emph{on the right}.
880
881 \begin{example}
882 % use package `chemmacros'
883 \begin{modiagram}[up-el-pos=.4,down-el-pos=.6]% default
884 \atom[H]{left} { 1s = {;up} }
885 \atom[H]{right}{ 1s = {;up} }
886 \molecule[\ch{H2}]{ 1sMO = {.75;pair} }
887 \end{modiagram}
888 \end{example}
889
890 \begin{example}
891 % use package `chemmacros'
892 \begin{modiagram}[up-el-pos=.333,down-el-pos=.667]
893 \atom[H]{left} { 1s = {;up} }
894 \atom[H]{right}{ 1s = {;up} }
895 \molecule[\ch{H2}]{ 1sMO = {.75;pair} }
896 \end{modiagram}
897 \end{example}
898
899 \begin{example}
900 % use package `chemmacros'
901 \begin{modiagram}[up-el-pos=.7,down-el-pos=.3]
902 \atom[H]{left} { 1s = {;up} }
903 \atom[H]{right}{ 1s = {;up} }
904 \molecule[\ch{H2}]{ 1sMO = {.75;pair} }
905 \end{modiagram}
906 \end{example}
907
908 \subsubsection{Option \option*{lines}}\label{option:lines}
909 The option \option{lines} can be used to modify the \TikZ\ style of the
910 connecting lines:
911 \begin{example}[side-by-side]
912 % use package `chemmacros'
913 \begin{modiagram}[lines={gray,thin}]
914 \atom[H]{left} { 1s = {;up} }
915 \atom[H]{right}{ 1s = {;up} }
916 \molecule[\ch{H2}]{ 1sMO = {.75;pair} }
917 \end{modiagram}
918 \end{example}
919
920 \subsubsection{Option \option*{names}}\label{option:names}
921 If you use the option \option{names} the atoms and the molecule get captions
922 provided you have used the optional \meta{name} argument of \cs{atom} and/or
923 \cs{molecule}.
924 \begin{example}[side-by-side]
925 % use package `chemmacros'
926 \begin{modiagram}[names]
927 \atom[H]{left} { 1s = {;up} }
928 \atom[H]{right}{ 1s = {;up} }
929 \molecule[\ch{H2}]{ 1sMO = {.75;pair} }
930 \end{modiagram}
931 \end{example}
932
933 \subsubsection{Options \option*{names-style} and \option*{names-style-add}}\label{option:names_style}
934 These options enable to customize the style of the captions of the atoms and
935 of the molecule. By default this setting is used:
936 \key{names-style}{anchor=base}\footnote{Please see ``\TikZ\ and PGF -- Manual
937 for Version 2.10'' p.\,183 section 16.4.4 (pgfmanual.pdf) for the meaning}.
938 \begin{example}[side-by-side]
939 % use package `chemmacros'
940 \begin{modiagram}[names,names-style={draw=blue}]
941 \atom[p]{left} { 1s = {;up} }
942 \atom[b]{right}{ 1s = {;up} }
943 \molecule[\ch{X2}]{ 1sMO = {.75;pair} }
944 \end{modiagram}
945 \end{example}
946
947 With this the default setting is overwritten. As you can see it destroys the
948 vertical alignment of the nodes. In order to avoid that you can for example
949 specify \code{text height} and \code{text depth} yourself \ldots
950 \begin{example}
951 % use package `chemmacros'
952 \begin{modiagram}[names,names-style={text height=1.5ex, text depth=.25ex, draw=blue}]
953 \atom[p]{left} { 1s = {;up} }
954 \atom[b]{right}{ 1s = {;up} }
955 \molecule[\ch{X2}]{ 1sMO = {.75;pair} }
956 \end{modiagram}
957 \end{example}
958
959 \ldots, add the \code{anchor} again \ldots
960 \begin{example}
961 % use package `chemmacros'
962 \begin{modiagram}[names,names-style={anchor=base, draw=blue}]
963 \atom[p]{left} { 1s = {;up} }
964 \atom[b]{right}{ 1s = {;up} }
965 \molecule[\ch{X2}]{ 1sMO = {.75;pair} }
966 \end{modiagram}
967 \end{example}
968
969 \ldots\ or use the option \key{names-style-add}. It doesn't overwrite the
970 current setting but appends the new declaration:
971 \begin{example}
972 % use package `chemmacros'
973 \begin{modiagram}[names,names-style-add={draw=blue}]
974 \atom[p]{left} { 1s = {;up} }
975 \atom[b]{right}{ 1s = {;up} }
976 \molecule[\ch{X2}]{ 1sMO = {.75;pair} }
977 \end{modiagram}
978 \end{example}
979
980 \begin{example}
981 % use package `chemmacros'
982 \setmodiagram{
983 names,
984 names-style = {
985 text height = 2.5ex,
986 text depth = .5ex,
987 draw = blue!80,
988 rounded corners
989 }
990 }
991 \begin{modiagram}
992 \atom[p]{left} { 1s = {;up} }
993 \atom[b]{right}{ 1s = {;up} }
994 \molecule[\ch{X2}]{ 1sMO = {.75;pair} }
995 \end{modiagram}
996 \begin{modiagram}[names-style-add={fill=blue!20}]
997 \atom[p]{left} { 1s = {;up} }
998 \atom[b]{right}{ 1s = {;up} }
999 \molecule[\ch{X2}]{ 1sMO = {.75;pair} }
1000 \end{modiagram}
1001 \end{example}
1002
1003 \subsubsection{Option \option*{labels}}\label{option:labels}
1004 If you use the option \option{labels} predefined labels are written below the
1005 orbitals. These labels can be changed, see section~\ref{sec:key:label}.
1006 \begin{example}[side-by-side]
1007 % use package `chemmacros'
1008 \begin{modiagram}[labels]
1009 \atom[H]{left} { 1s = {;up} }
1010 \atom[H]{right}{ 1s = {;up} }
1011 \molecule[\ch{H2}]{ 1sMO = {.75;pair} }
1012 \end{modiagram}
1013 \end{example}
1014
1015 \subsubsection{Option \option*{labels-fs}}\label{option:labels-fs}
1016 Labels are set with the font size \cs*{small}. If you want to change that you
1017 can use the option \option{labels-fs}.
1018 \begin{example}
1019 % use package `chemmacros'
1020 \begin{modiagram}[labels,labels-fs=\footnotesize]
1021 \atom[H]{left} { 1s = {;up} }
1022 \atom[H]{right}{ 1s = {;up} }
1023 \molecule[\ch{H2}]{ 1sMO = {.75;pair} }
1024 \end{modiagram}
1025 \end{example}
1026
1027 This also allows you to change the font style or font shape of the labels.
1028 \begin{example}
1029 % use package `chemmacros'
1030 \begin{modiagram}[labels,labels-fs=\sffamily\footnotesize]
1031 \atom[H]{left} { 1s = {;up} }
1032 \atom[H]{right}{ 1s = {;up} }
1033 \molecule[\ch{H2}]{ 1sMO = {.75;pair} }
1034 \end{modiagram}
1035 \end{example}
1036
1037 \subsubsection{Option \option*{labels-style}}\label{option:labels-style}
1038 The option \option{labels-style} changes the \TikZ\ style of the nodes within
1039 which the labels are written.
1040 \begin{example}
1041 % use package `chemmacros'
1042 \begin{modiagram}[labels,labels-style={blue,yshift=4pt}]
1043 \atom[H]{left} { 1s = {;up} }
1044 \atom[H]{right}{ 1s = {;up} }
1045 \molecule[\ch{H2}]{ 1sMO = {.75;pair} }
1046 \end{modiagram}
1047 \end{example}
1048
1049 \subsection{\cs*{atom} and \cs*{molecule} Specific Customizations}
1050 \subsubsection{The \option*{label} Key}\label{sec:key:label}
1051 If you don't want to use the predefined labels, change single labels or use
1052 only one or two labels, you can use the key \option{label}. This option is
1053 used in the \cs{atom} and \cs{molecule} commands in the \meta{AO-spec} or
1054 \meta{MO-spec} argument, respectively. The key awaits a comma separated
1055 key/value list. The names mentioned in section~\ref{Namensgebung} are used as
1056 keys to specify the \ac{AO} that you want to label.
1057 \begin{example}[side-by-side]
1058 % use package `chemmacros'
1059 \begin{modiagram}[labels-fs=\footnotesize]
1060 \atom[H]{left} { 1s = {;up} }
1061 \atom[H]{right}{ 1s = {;up} }
1062 \molecule[\ch{H2}]{
1063 1sMO = {.75;pair},
1064 label = { 1sigma = {bonding MO} }
1065 }
1066 \end{modiagram}
1067 \end{example}
1068
1069 \begin{example}[side-by-side]
1070 \begin{modiagram}[style=square,distance=6cm]
1071 \atom{left} { 1s = {;up} }
1072 \atom{right}{ 1s = {;up} }
1073 \molecule{
1074 1sMO = {.75;pair} ,
1075 label = {
1076 1sigma = \chemsigma,
1077 1sigma* = \chemsigma$^*$
1078 }
1079 }
1080 \node[right] at (1sigma.-45) {bonding};
1081 \node[right] at (1sigma*.45) {anti-bonding};
1082 \end{modiagram}
1083 \end{example}
1084
1085 If the option is used together with the \option{labels} option
1086 (page~\pageref{option:labels}) single labels are overwritten:
1087 \begin{example}[side-by-side]
1088 % use package `chemmacros'
1089 \begin{modiagram}[labels]
1090 \atom[H]{left} { 1s = {;up} }
1091 \atom[H]{right}{ 1s = {;up} }
1092 \molecule[\ch{H2}]{
1093 1sMO = {.75;pair},
1094 label = { 1sigma = \textcolor{red}{??} }
1095 }
1096 \end{modiagram}
1097 \end{example}
1098
1099 \subsubsection{The \option*{color} Key}\label{sec:key:color}
1100 Analogous to the \option{label} key the \option{color} key can be used to
1101 display coloured electrons:
1102 \begin{example}[side-by-side]
1103 % use package `chemmacros'
1104 \begin{modiagram}[labels-fs=\footnotesize]
1105 \atom[H]{left}{
1106 1s, color = { 1sleft = blue }
1107 }
1108 \atom[H]{right}{
1109 1s, color = { 1sright = red }
1110 }
1111 \molecule[\ch{H2}]{
1112 1sMO,
1113 label = { 1sigma = {bonding MO} },
1114 color = { 1sigma = green, 1sigma* = cyan }
1115 }
1116 \end{modiagram}
1117 \end{example}
1118
1119 \subsubsection{The \option*{up-el-pos} and \option*{down-el-pos} keys}\label{sec:key:electrons}
1120 The options \option{up-el-pos} and \option{down-el-pos} allow it to shift the
1121 arrows representing the electrons in a single \ac{AO} or \ac{MO} individually.
1122 You need to use values between \code{0} and \code{1}, also see
1123 section~\ref{option:electrons}.
1124 \begin{example}[side-by-side]
1125 % use package `chemmacros'
1126 \begin{modiagram}
1127 \atom[H]{left}{
1128 1s = {;up},
1129 up-el-pos = { 1sleft=.5 }
1130 }
1131 \atom[H]{right}{ 1s = {;up} }
1132 \molecule[\ch{H2}]{
1133 1sMO = {.75;pair} ,
1134 up-el-pos = { 1sigma=.15 } ,
1135 down-el-pos = { 1sigma=.85 }
1136 }
1137 \end{modiagram}
1138 \end{example}
1139
1140 \subsection{\cs*{AO} Specific Customizations}\label{ssec:AO_anpassen}
1141 These keys enable to customize orbitals created with \cs{AO}.
1142
1143 \subsubsection{The \option*{label} Key}\label{key:AO_label}
1144 The key \option{label}\Oarg{\meta{x}/\meta{y}/\meta{z}} allows you to put a
1145 label to the \ac{AO}/\ac{MO}. If you use the type \code{p} you can specify
1146 the orbital you want to label in square brackets:
1147 \begin{example}[side-by-side]
1148 \begin{modiagram}[style=square]
1149 \AO{s}[label={s orbital}]{0}
1150 \AO{p}[label[y]=py,label[z]=pz]{1.5}
1151 \end{modiagram}
1152 \end{example}
1153
1154 \subsubsection{The \option*{color} Key}\label{key:AO_color}
1155 Analogous to the \option{label} key there is the key
1156 \option{color}\Oarg{\meta{x}/\meta{y}/\meta{z}} which enables you to choose a
1157 color for the electrons. If you use the type \code{p} you can specify the
1158 orbital in square brackets:
1159 \begin{example}[side-by-side]
1160 \begin{modiagram}[style=square]
1161 \AO{s}[color=red]{0}
1162 \AO{p}[color[y]=green,color[z]=cyan]{1.5}
1163 \end{modiagram}
1164 \end{example}
1165
1166 \subsubsection{The \option*{up-el-pos} and \option*{down-el-pos} Keys}\label{key:AO_electrons}
1167 Then there are the keys \option{up-el-pos}\Oarg{\meta{x}/\meta{y}/\meta{z}}
1168 and \option{down-el-pos}\Oarg{\meta{x}/\meta{y}/\meta{z}} with which the
1169 electrons can be shifted horizontally. You can use values between \code{0}
1170 and \code{1}, also see section~\ref{option:electrons}. If you use the type
1171 \code{p} you can specify the orbital in square brackets:
1172 \begin{example}[side-by-side]
1173 \begin{modiagram}[style=square]
1174 \AO{s}[up-el-pos=.15]{0}
1175 \AO{p}[up-el-pos[y]=.15,down-el-pos[z]=.15]{1.5}
1176 \end{modiagram}
1177 \end{example}
1178
1179 \subsection{Energy Axis}
1180 Last but not least one might want to add an energy axis to the diagram. For
1181 this there is the command \cs{EnergyAxis}.
1182
1183 \begin{commands}
1184 \command{EnergyAxis}[\oarg{option}]
1185 Adds an energy axis to the diagram. \meta{options} are key/value pairs to
1186 modify the axis.
1187 \end{commands}
1188
1189 \begin{example}[side-by-side]
1190 \begin{modiagram}
1191 \atom{left} { 1s = {;up} }
1192 \atom{right}{ 1s = {;up} }
1193 \molecule{ 1sMO = {.75;pair} }
1194 \EnergyAxis
1195 \end{modiagram}
1196 \end{example}
1197
1198 For the time being there are two options to modify the axis.
1199 \begin{options}
1200 \keyval{title}{title}\Default{energy}
1201 the axis label. If used without value the default is used.
1202 \keyval{head}{tikz arrow head}\Default{>}
1203 the arrow head; you can use the arrow heads specified in the \TikZ\ library
1204 \code{arrows} (pgfmanual v2.10 pages 256ff.)
1205 \end{options}
1206
1207 \begin{example}[side-by-side]
1208 \begin{modiagram}
1209 \atom{left} { 1s = {;up} }
1210 \atom{right}{ 1s = {;up} }
1211 \molecule{ 1sMO = {.75;pair} }
1212 \EnergyAxis[title]
1213 \end{modiagram}
1214 \end{example}
1215
1216 \begin{example}[side-by-side]
1217 \begin{modiagram}
1218 \atom{left} { 1s = {;up} }
1219 \atom{right}{ 1s = {;up} }
1220 \molecule{ 1sMO = {.75;pair} }
1221 \EnergyAxis[title=E,head=stealth]
1222 \end{modiagram}
1223 \end{example}
1224
1225 \section{Examples}
1226 The example from the beginning of section \ref{ssec:AO_MO_irgendwo}.
1227 \begin{example}
1228 % use package `chemmacros'
1229 \begin{modiagram}[names]
1230 \atom[\chlewis{0.}{F}\hspace*{5mm}\chlewis{180.}{F}]{left}{
1231 1s=.2;up,up-el-pos={1sleft=.5}
1232 }
1233 \atom[Xe]{right}{1s=1.25;pair}
1234 \molecule[\ch{XeF2}]{1sMO={1/.25;pair}}
1235 \AO(1cm){s}{0;up}
1236 \AO(3cm){s}{0;pair}
1237 \connect{ AO1 & AO2 }
1238 \node[right,xshift=4mm] at (1sigma) {\footnotesize bonding};
1239 \node[above] at (AO2.90) {\footnotesize non-bonding};
1240 \node[above] at (1sigma*.90) {\footnotesize anti-bonding};
1241 \end{modiagram}
1242 \end{example}
1243
1244 \begin{example}[outside]
1245 % use package `chemmacros'
1246 \begin{figure}[p]
1247 \centering
1248 \begin{modiagram}[style=square,labels,names,AO-width=8pt,labels-fs=\footnotesize]
1249 \atom[\ch{O_a}]{left}{
1250 1s, 2s, 2p = {;pair,up,up}
1251 }
1252 \atom[\ch{O_b}]{right}{
1253 1s, 2s, 2p = {;pair,up,up}
1254 }
1255 \molecule[\ch{O2}]{
1256 1sMO, 2sMO, 2pMO = {;pair,pair,pair,up,up},
1257 color = { 2piy*=red, 2piz*=red }
1258 }
1259 \EnergyAxis
1260 \end{modiagram}
1261 \caption{MO diagram of \ch{^3 "\chemSigma-" O2}.}
1262 \end{figure}
1263 \end{example}
1264
1265 \begin{example}[outside]
1266 % use package `chemmacros'
1267 \begin{figure}[p]
1268 \centering
1269 \setmodiagram{style = fancy, distance = 7cm, AO-width = 15pt, labels}
1270 \begin{modiagram}
1271 \atom[N]{left}{
1272 2p = {0;up,up,up}
1273 }
1274 \atom[O]{right}{
1275 2p = {2;pair,up,up}
1276 }
1277 \molecule[NO]{
1278 2pMO = {1.8,.4;pair,pair,pair,up},
1279 color = { 2piy*=red }
1280 }
1281 \EnergyAxis
1282 \end{modiagram}
1283 \caption{Part of the MO diagram of \chlewis{180.}{NO}.}
1284 \end{figure}
1285 \end{example}
1286
1287 \clearpage
1288
1289 \end{document}