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

% toggle print-out to the handout for fill-in-the-blanks part
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
\frametitle{Energy and waves}
\begin{block}{Planck law}
\onslide<2-\ho>{\[ E = h\nu \]}

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

\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

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
to get

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

Friday, 21 December 2018

Benzene excimer

I created this picture to illustrate excimer formation in the benzene dimer after light irradiation. We start with a slip-stacked geometry shown on the upper left and irradiate this with light. Then, as the molecules align during the first few hundred femtoseconds, the coupling increases and we get an energy transfer from the lower to the upper benzene. As the coupling increases, an excimer is formed. In our dynamics, this excimer decays later on as there is no way to dissipate the excess energy.

The corresponding paper just appeared in PCCP (DOI: 10.1039/c8cp06354k) and we are trying to send a slightly adapted version of the above picture as a front cover to PCCP.

The pictures shown were created with PyMOL after creating cube files with Q-Chem. As a memo to myself and anyone who might want to try this out, these are the main commands for PyMOL:

1. Load all the coordinate and cube files. If you set it up in a way that all the coordinate and cube files have the same names, then everything is loaded into different frames of the same object in pymol, which is needed for step 4.
pymol S_*/plots/coord.mol S_*/plots/singlet_A_1_elec.cube
2. Create an isosurface for the density
isosurface elec, singlet_A_1_elec, 0.0015
3. Change the color of the isosurface, and for some reason it seems you have to write the command from 2. again afterwards.

4. To create the pictures of the different frames, you can use the integrated movie functionality of PyMOL
set ray_trace_frames=1
set cache_frames=0
mpng fig
That's it!

I was previously talking about how to create surfaces automatically in VMD and even created a script for that. But actually, I am quite impressed by how well this works in the current PyMOL version. And the nice thing about PyMOL is that you can have a transparent background for the structures, which adds flexibility for creating the final image.

Monday, 17 December 2018

PhD studentship at Loughborough University

A fully funded PhD studentship starting in October 2019 will be opening in my group at Loughborough University. If you are just finishing your Master's in chemistry, are interested in quantum chemistry and ambitious about learning new things, then go for it and apply!

The official announcement is shown here:

Unravelling the electronic structure properties of functional molecular materials

Functional molecular materials play an important role in modern science with applications in solar energy conversion, lighting, and data processing. Nowadays, computer simulations are an indispensable component in the study of these systems due to constant improvements in computer power. However, these computations have become so complicated that it is often a major challenge to make full sense of the results. To overcome this problem, a versatile computational analysis toolkit has been developed by Dr Plasser and co-workers, and it is the goal of this project to apply and further develop these tools. The student working on this project will develop skills in terms of applying modern quantum chemistry methods to various molecules of current scientific interest and will be given the opportunity to turn recently developed methods into high-impact scientific publications. In addition, programming skills will be developed, and the student will have the chance to work in an interdisciplinary setting with inputs from chemistry, physics and computer science.

The pictures shown pertain to a new method for visualising electron correlation in the excited state. Here, the excitation hole (red) is moved through the system and one observes how the excited electron (blue) adjusts to the position of the hole for the different excited states. I will talk about this idea some more once the underlying paper is published.

The tasks to be carried out during the project revolve around the topic of excited-state wavefunction analysis. First, we would be applying some of the recently developed tools, available within TheoDORE, Q-Chem, and Molcas. This work would be similar to this post or this post. Subsequent work will be a combination of programming and/or scripting tasks together with applications.

You can find the official announcement and guidelines here. I guess the main point to realise is that we can only pay a stipend to UK/EU graduates. Others would just get their non-UK/EU tuition fee covered and not obtain a stipend on top of that.

If you are interested, go ahead and check out my new group's homepage. Feel free to contact me if you have any specific questions about the work to be done.

Monday, 12 November 2018

Electron donating and withdrawing groups

Aside from the fact that I do not believe in the existence of HOMOs and LUMOs, it is sometimes good to know how they work. In particular, I can never remember how electron-donating and withdrawing groups work. Here is how I understand it:

  • An electron-donating group adds more electrons to the system and thus increases electron-electron repulsion (or decreases the effective nuclear charge). As a consequence the HOMO and LUMO energies increase.
  • An electron-withdrawing group removes electrons and, thus decreases the HOMO and LUMO energies.
  • An electron-donating group usually acts through an occupied non-bonding orbital. This is energetically close to the HOMO. Therefore, it has a stronger effect on the HOMO than on the LUMO (at least in organic molecules).
  • An electron-withdrawing group acts through a virtual orbital, which interacts more strongly with the LUMO.
  • As a consequence, electron-donating and withdrawing groups are both expected to lower the HOMO-LUMO gap in organic molecules.
  • Things are different for transition metal complexes. For example an electron-withdrawing fluorine group still lowers orbital energies. But it can affect the HOMO more strongly and increase the overall gap in fluorinated iridium complexes, see this Ref.

Wednesday, 10 October 2018

Cheap nonadiabatic dynamics simulations II

Staying true to the topic of cheap nonadiabatic dynamics simulations, here is another paper by us: Surface hopping within an exciton picture - An electrostatic embedding scheme that just appeared in JCTC. The idea in this case was to speed up the efficiency of photodynamics simulations by doing computations on individual chromophores and combining the results through a Frenkel exciton model.