# Potential energy profile using PGFplots

Whether you are a master’s student or graduate student you may have to write a research paper one day. To get it published in a good journal, presentation of data has become very important these days until unless you are well known in your field. In this blog i will be doing a small tutorial on how to make a good looking potential energy profile for a well known Diels- Alder reaction. Diels Alder reaction is happening between 1,3-butadiene and acrylo nitrile.

There are different ways of making this energy level diagram using  softwares such as : GNUPLOT, Grace, Origin ets. But the problem with all these softwares is the  user friendliness. My experience is that you can make any plot using GNUPLOT but you need to be a master in that. Tikz  package from LATEX  came as boon for me. It is very easy if you are familiar with LATEX and gives figures in PDF format with very high resolution like the one shown below. If you are familiar with latex you will be easily able to work with PGFplots. here is the figure and latex code is given below.

B3LYP/6-31g* level of theory is used for studying the Diels Alder reaction and the energies of  stationary points are given in the figure. Latex code for generating the plots is given below. First generate the figures of reactants, product and transition state using Molden in EPS format. This will keep the resolution intact. Place these figures at the nodes corresponding to the reactant, TS and product.

% Diels Alder Reaction - Potential energy Profile
% Author: Leela Sriram Dodda
\documentclass{article}
\usepackage{pgfplots}
\usepackage{tikz}
\usepackage{verbatim}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{center}
\setlength\PreviewBorder{10pt}%
\begin{document}
\begin{center}
\begin{tikzpicture}[scale=1.0]
\begin{axis}[clip=false,ylabel=Potential energy (kcal/mol),xlabel=Rxn coordinate,xtick=\empty,
legend pos=outer north east,xmin=1,xmax=8,ymax=60,
title=Energy profile for Diels-Alder Reaction,
]
%\node at (2.5,3) {\includegraphics[scale=0.1]{rea1.pdf}};
\node at (axis cs:2.1,-10) {\includegraphics[scale=0.06,angle=90]{r1.pdf}};
\node at (axis cs:3.2,-10) {\includegraphics[scale=0.06,angle=90]{r2.pdf}};
\node[font=\tiny] at (axis cs:2.55,-10) {\bf{+}};
\addplot[color=red,draw=black,line width=0.8pt,densely dotted] coordinates { (3,0)(4,38.4) };
\addplot[color=red,draw=black,line width=0.8pt,densely dotted] coordinates { (5,38.4)(6,-45.9) };
\addplot[color=red,draw=blue,line width=1pt] coordinates {(2,0) (3,0) };
\addplot[color=red,draw=blue,line width=1pt] coordinates {(4,38.4) (5,38.4) };
\node at (axis cs:4.3,50) {\includegraphics[scale=0.08,angle=90]{t1.pdf}};
\node at (axis cs:6.9,-35) {\includegraphics[scale=0.08,angle=90]{p1.pdf}};
\addplot[color=red,draw=blue,line width=1pt] coordinates {(6,-45.9) (7,-45.9) };
\end{axis}
\end{tikzpicture}
\end{center}
\end{document}

This worked for me like a magic hope this will work for you too 🙂