## Wednesday, 18 September 2019

### A view at the ESP at varying distance from the nucleus

Just a few more images from my little pymol wrapper qc_pymol. These images show the electrostatic potential (ESP) of the ground state of uracil mapped onto the density using different isovalues. We start out close to the nuclei where the ESP is highly positive (purple). When we move away it becomes less positive (blue). And finally, we have a negative (orange) ESP at the oxygens and positive (blue) around the remaining molecule.

## Friday, 13 September 2019

### Plotting the electrostatic potential with PyMOL

It has always been my aim to automatise the plotting of densities and orbitals. You can see my previous efforts in the context of VMD and Jmol in some previous posts, and you can find the associated scripts in the TheoDORE distribution. Let's turn to PyMOL now. The nice thing about PyMOL is that it can be scripted with python, which means that it is easy to add functionality in an integrated way. I started creating a toolbox for using PyMOL with quantum chemistry programs: qc_pymol, which you can find on github.

Let's say we have a cube file called es_1_diff.cube and we want to draw isosurface at isovalues of -0.01 and 0.01, then using qc_pymol we just type into the pymol console:
show_dens es_1_diff.cube, -0.01 0.01, cyan orange
And we get the following picture of the density. In this case, this is the difference density of an nπ* state with respect to the ground state (cyan is where the density is taken away, orange where it is added).

We can also map the electrostatic potential (ESP) onto the density if we have both as cube files. In this case, the command is
map_esp es_1_dens.cube, es_1_dens_esp.cube
Here, you can see that we have positive (blue) potential at the oxygen where the electron is taken away, and negative (yellow) potential at the other oxygen and at the carbon atom where electron density is added above.

We can do the same thing for the next three states and get the following combinations of difference densities and ESPs. We get the same trends as before depletion (cyan) in the difference density corresponds to positive ESP (blue), and addition (orange) corresponds to negative ESP (orange).

## Monday, 17 June 2019

### Visualising electron correlation (2)

Just a quick follow-up on last post. Here are some more pictures of conditional electron/hole densities taken from the computations performed in the original ChemPhotoChem paper but with some extra rendering. To get a better overview, you can check my a newest talk (starting at slide 32). What we are doing here is that we are pulling the hole through the system from left to right and we are observing how the electron behaves. For the S1 state, the adjustment is rather small.

## Tuesday, 11 June 2019

### Visualising electron correlation

How do you visualise the correlation between two particles? One option is to fix one of them at a specific region of space and look at the distribution of the other one. This is the principle behind a new method for visualising excitonic correlation just presented in a paper in ChemPhotoChem: Visualisation of Electronic Excited‐State Correlation in Real Space, and released within the TheoDORE 2.0 code. First, we have to interpret the excited state within the electron-hole picture as explained previously and compute the two-body electron-hole distribution. Then, we can fix one of the quasi-particles in space and observe the distribution of the other one.

Below, I am showing what this analysis looks like for a simple PPV oligomer. I am fixing the hole either at the terminal phenyl, the vinyl or the central phenyl and plot the corresponding electron distribution. In the case of the S1 state, the electron does not really care about the hole. The electron comfortably rests in the LUMO no matter what the hole does:

But for the S2 state things look completely differently. The electron now tries to actively avoid the hole as it moves through the system.
S3, for comparison, has a much more localised structure where the electron is always focussed on the centre.
S4 has a somewhat more complicated structure:

By the way, I realised that the same type of analysis has been recently performed for periodic computations as well. The difference is that in a periodic system every atom (or symmetry unit) will produce the same picture. In a finite system the picture also changes with the position of the probe.

## Monday, 11 March 2019

### Creating fill-in-the-blanks handouts with LaTeX beamer

For some of my lectures I wanted to create handouts with blanks to fill in for the students. latex/beamer allows you to do this in a very convenient way. But it took me a while to figure out how to do this. This is why I just wanted to write a little memo in this blog post.

The preamble looks like this
\documentclass[compress,transparent,10pt
,handout
]{beamer}

% toggle print-out to the handout for fill-in-the-blanks part
%\newcommand{\ho}{}
\newcommand{\ho}{|handout:0}
With the initial handout tag I can toggle between handout mode and normal mode in latex. With the \ho tag I can decide whether the handouts are filled in or not.

Let's look at the following code
\begin{frame}
\frametitle{Energy and waves}
\begin{block}{Planck law}
\onslide<2-\ho>{$E = h\nu$}
\end{block}

\begin{block}{Speed of light}
\onslide<3-\ho>{$c = \nu\lambda$}
\end{block}

\begin{description}
\item[$E$] Energy
\item[$h$] Planck constant, $h=6.626\times 10^{-34}Js$
\item[$c$] Speed of light, $c=2.997\times 10^8 m/s$
\item[$\lambda$] Wavelength of light
\end{description}

\end{frame}
This can be compiled in three different ways. For the initial student printout I am using the commands as shown above to obtain:

If I want to fill in the blanks, I just change the following:

% toggle print-out to the handout for fill-in-the-blanks part
\newcommand{\ho}{}
%\newcommand{\ho}{|handout:0}
to get

And for my lecture I uncomment the "handout" part to get three separate slides where the equations appear on click: