ENdiagram — Potential Energy Curves

This has been sleeping for quite a while. Some new features here, some polishing there, correcting bugs, completely forgetting about if after I didn’t need it anymore… Well, here it is: ENdiagram. The package for the creation of potential energy curves. Another chemistry niche filled with a package.

Before I tell you just a little bit what it does let’s see some pictures:


This picture was created using the following lines:

% arara: pdflatex
\documentclass{scrartcl}
\usepackage{endiagram}

\begin{document}

\begin{endiagram}
\ENcurve{1,4,0}
\end{endiagram}

\end{document
}

Actually I won’t tell you much. I’ll let the pictures speak for themselves, in addition to the source code. So here we go: a few words, a picture, code, a few words, a picture, code, a few words…

You can visualize energy gain or loss by simply adding one command:

% arara: pdflatex
\documentclass{scrartcl}
\usepackage{endiagram}

\begin{document}

\begin{endiagram}
\ENcurve{3,4,0}
\ShowGain[label]
\end{endiagram}

\end{document
}

You can also visualize the activation energy by using a similar command:

% arara: pdflatex
\documentclass{scrartcl}
\usepackage{endiagram}

\begin{document}

\begin{endiagram}
\ENcurve{1,5,2.5,4,0}
\ShowEa[from={(0,1) to (6,4)}]
\end{endiagram}

\end{document
}

It’s not limited to one curve… you can insert as many as you like (and also use colors):

% arara: pdflatex
\documentclass{scrartcl}
\usepackage{endiagram}

\begin{document}

\begin{endiagram}
\ENcurve[tikz=blue]{1,4,0}
\ENcurve[tikz=red]{1,2.5,0}
\ShowEa[tikz={red,<->}]
\end{endiagram}

\end{document
}

The curves can have a different numbers of maxima, a different line style, shifted maxima, …

% arara: pdflatex
\documentclass{scrartcl}
\usepackage{endiagram}

\begin{document}

\begin{endiagram}
\ENcurve[step=4]{1,6,0}
\ENcurve[tikz={densely dotted}]
{1,4[1],2.5,3[-1],0}
\end{endiagram}

\end{document
}

Now let’s add some numbers. The packages allows to add a scale to the y-axis and calculate energy gain/loss automatically:

% arara: pdflatex
\documentclass{scrartcl}
\usepackage{endiagram}
\DeclareSIUnit{\calory}{cal}
\begin{document}

\sisetup{per-mode = fraction}
\ENsetup{
  energy-step = 100,
  energy-unit = \kilo\calory\per\mole,
  energy-unit-separator = { in },
  y-label = above,
  AddAxisLabel/font = \footnotesize
}
\begin{endiagram}[scale=1.5]
\ENcurve{2.232,4.174,.308}
\AddAxisLabel*{0;1;2;3;4}
\ShowEa[label,connect={draw=none}]
\ShowGain[label]
\end{endiagram}

\end{document
}

Intrigued? I need feedback if I want to improve the package and before I’ll upload it to CTAN. So if you find the package useful for your needs you can get it here.

Many parts of the package may still be very buggy and are at least experimental. Also you may expect difficulties and an update as soon TeX Live 2012 is officially released and the l3kernel packages are updated.

ENdiagram is available from CTAN and also part of MiKTeX and TeX Live 2012.

9 Replies to “ENdiagram — Potential Energy Curves”

  1. Hi,

    Thanks for the package. I have one request : could the package allow the user to choose himself the X and Y coordinates (I would like to name them différently as $\xi$ or $E$.

    Phil.

  2. Wow! I just found this package yesterday and I am already impressed. I have been asking everyone in my lab how to make these types of figures for my reaction rates I am calculating via DFT studies… but no one could help. This project is a life saver… Please, please do not let this go dormant.

    1. I’m glad if the package proofs useful. Let me know if you find any bugs. Just curious: if you have calculated data wouldn’t pgfplots be a suitable choice? ENdiagram is only capable of qualitative diagrams (even if it has some support for a quantitative energy scale).

      1. I have never heard of that one…. I will have to look into that as well.
        I am new to LaTex.

  3. Nice one!!!

    Would it be possible to implement a display mode, where the connection of the energy levels is done without the curvature but a straight (dotted) line (more like you did in your MO-package) ?
    This would be more abstract – the current drawing implicits knowledge of the path between the reactants, which can most times be doubted ;-).

    1. I not sure I understand what you mean. Something like this maybe:

      \documentclass{article}
      \usepackage{endiagram}
      \ENsetup[ENcurve]{looseness=0,tikz=dotted}

      \begin{document}

      \begin{endiagram}
       \ENcurve{1,3,0}
      \end{endiagram}

      \end{document
      }

      Regards

Leave a Reply

Your email address will not be published. Required fields are marked *