# Energy level diagrams with TeX

Do you have any experience with creating energy level diagrams with TeX as shown below ?

What software/packages would you recommend me ?

I've heard about TikZ, but I don't have any experience with it and I would prefer something easy to handle or more WISIWYG.

I would like to illustrate Hund rules, Zeeman splitting and some related physical effects with option to customize pictures.

Hopefully this isn't too much off-topic question. Cheers.

Examples for Energy level diagrams Links:

-
All certainly doable (see for example the modiagram package, which does atomic/molecular orbitals), but 'easy to handle' will depend on your requirements. Perhaps you could illustrate what sort of input you are hoping to use so we can gauge how easy this might be. –  Joseph Wright Jul 16 '13 at 15:55
It would be nice of you to show us some diagrams you are talking about or at least link us to good Wikipedia pages or other references so that we could at least see what you are talking about. –  Qrrbrbirlbel Jul 16 '13 at 16:09
Have you checked out this example? –  DocBuckets Jul 16 '13 at 17:02
@DocBuckets: These examples might be even more excessive: texample.net/tikz/examples/fluor-energy-levels texample.net/tikz/examples/hydrogen-splitting –  Henri Menke Jul 16 '13 at 19:03
I'm quite certain that something very much like your picture is around here, but I can't seem to find it... Found it! –  Tom Bombadil Jul 16 '13 at 20:01

# Remarks

I implemented the first diagram in TikZ. All the coloring stuff has been outsourced to \tikzset so it is easy to change the style of the drawing.

# Implementation

\documentclass[tikz]{standalone}
\usetikzlibrary{shapes.callouts}
\tikzset{
level/.style = {
ultra thick,
blue,
},
connect/.style = {
dashed,
red
},
notice/.style = {
draw,
rectangle callout,
callout relative pointer={#1}
},
label/.style = {
text width=2cm
}
}
\begin{document}
\begin{tikzpicture}
% Draw all levels
\draw[level] (0,0) -- node[above] {4p4d} (2,0);

\draw[connect] (2,0) -- (3,-2) (2,0) -- (3,3);
\draw[level] (3,3) -- node[above] {$S=0$} node[below] {(Singlets)} (5,3);
\draw[level] (3,-2) -- node[above] {$S=1$} node[below] {(Triplets)} (5,-2);

\draw[connect] (5,3) -- (6,4.5) (5,3) -- (6,3.5) (5,3) -- (6,1.5);
\draw[connect] (5,-2) -- (6,-0.5) (5,-2) -- (6,-1.5) (5,-2) -- (6,-3.5);
\draw[level] (6,4.5) -- node[above] {${}^1P$} (8,4.5);
\draw[level] (6,3.5) -- node[above] {${}^1D$} (8,3.5);
\draw[level] (6,1.5) -- node[above] {${}^1F$} (8,1.5);
\draw[level] (6,-0.5) -- node[above] {${}^3P$} (8,-0.5);
\draw[level] (6,-1.5) -- node[above] {${}^3D$} (8,-1.5);
\draw[level] (6,-3.5) -- node[above] {${}^3F$} (8,-3.5);

\draw[connect] (8,4.5) -- (9,4.5) (8,3.5) -- (9,3.5) (8,1.5) -- (9,1.5);
\draw[level] (9,4.5) -- (11,4.5) node[right] {${}^1P_1$};
\draw[level] (9,3.5) -- (11,3.5) node[right] {${}^1D_2$};
\draw[level] (9,1.5) -- (11,1.5) node[right] {${}^1F_3$};

\draw[connect] (8,-0.5) -- (9,-0.5) (8,-0.5) -- (9,-0.8) (8,-0.5) -- (9,-1)
(8,-1.5) -- (9,-1.6) (8,-1.5) -- (9,-1.8) (8,-1.5) -- (9,-1.3)
(8,-3.5) -- (9,-3.8) (8,-3.5) -- (9,-3.6) (8,-3.5) -- (9,-3.1);
\foreach \i/\j in {2/-0.5, 1/-0.8, 0/-1} {
\draw[level] (9,\j) -- (11,\j) node[right] {\scriptsize $\i$};
}
\node[level,right] at (11.5,-0.8) {${}^3P_{0,1,2}$};
\foreach \i/\j in {3/-1.3, 2/-1.6, 1/-1.8} {
\draw[level] (9,\j) -- (11,\j) node[right] {\scriptsize $\i$};
}
\node[level,right] at (11.5,-1.6) {${}^3D_{1,2,3}$};
\foreach \i/\j in {4/-3.1, 3/-3.6, 2/-3.8} {
\draw[level] (9,\j) -- (11,\j) node[right] {\scriptsize $\i$};
}
\node[level,right] at (11.5,-3.6) {${}^3F_{2,3,4}$};

% Draw labels
\node[label] at (4,5.5) {Spin-spin interaction};
\node[label] at (7,5.5) {Orbit-orbit interaction};
\node[label] at (10,5.5) {Spin-orbit interaction};

% Draw annotations
\node[notice={(0.5,0.5)},text width=1.5cm] at (2,-3) {Hunds rule \# 1};
\node[notice={(0,1)}] at (4,-4) {Why is triplet lower};
\node[notice={(0.7,0.7)},text width=3cm] at (6,-5) {Why is higher angular momentum state lower energy?};
\node[notice={(-0.9,0.9)},text width=1.5cm] at (9,-5) {Hunds rule \# 2};
\node[notice={(-0.2,1.6)},text width=3cm] at (11,-6.5) {Why is low total angular momentum state lower in energy?};
\node[notice={(-0.5,0.5)},text width=1.5cm] at (12,-5) {Hunds rule \# 3};
\end{tikzpicture}
\end{document}


# Output

-
Wow, it looks pretty cool, thank you very much –  Honza Zubáč Jul 16 '13 at 22:15