## Monday, December 2, 2013

### Notes on fugacity and activity

This is one of those "note to self" posts where I try to get my head around a concept, this time fugacity and activity for a gas.

$dG=Vdp-SdT \implies dG=Vdp \text{ if } dT=0$
$$G(p)=G^\circ+\int_{p^\circ}^{p}Vdp$$
If the gas is ideal, i.e. for one mole $V=RT/p$, then
$$G(p)=G^\circ+RT\int_{p^\circ}^{p}\frac{dp}{p}=G^\circ+RT\ln\frac{p}{p^\circ}$$
For $A\rightleftharpoons B$
$$G(p_B)-G(p_A)=0 \implies \frac{p_B}{p_A}=e^{-\Delta G^\circ/RT}$$
What about a real gas where $V\neq RT/p$?  We introduce the fugacity $(f)$ for which $V=RT/f$ so that
$$G(p)=G^\circ+RT\ln\frac{f}{p^\circ} \text{ and } \frac{f_B}{f_A}=e^{-\Delta G^\circ/RT}$$
To determine $f$:
$$\int_{p'}^{p} (V-V_{ideal})dp=RT\ln\left(\frac{f}{f'}\cdot \frac{p'}{p}\right) = RT\ln\left(\frac{f}{p}\cdot \frac{p'}{f'}\right)$$
Gases approach ideality at low pressure: $f'/p'\rightarrow 1$ as $p\rightarrow 0$ so:
$$\ln\left(\frac{f}{p}\right)=\ln(\phi)=\frac{1}{RT}\int_{0}^{p} (V-V_{ideal})dp$$
So for sticky non-ideal gases for which $V<V_{ideal}$ the fugacity coefficient $\phi$ is less than 1.  So even though $V=RT/f$ don't confuse $f$ with $p_{ideal}: f<p<p_{ideal}$ for a given number of gas particles.

Finally the relationship between fugacity and activity ($a$) is
$$a=\frac{f}{p^\circ}$$.

## Wednesday, November 27, 2013

### PhD position in statistical protein structure prediction, University of Copenhagen

One of the major unsolved problems in bioinformatics is the protein folding problem: given an amino acid sequence, predict the overall three-dimensional structure of the corresponding protein. It has been known since the seminal work of Christian B. Anfinsen in the early seventies that the sequence of a protein encodes its structure, but the exact details of the encoding still remain elusive. Since the protein folding problem is of enormous practical, theoretical and medical importance - and in addition forms a fascinating intellectual challenge - it is often called the holy grail of bioinformatics.Currently, most protein structure prediction methods are based on rather ad hoc approaches. The aim of this project is to develop and implement a statistically rigorous method to predict the structure of proteins, building on various probabilistic models of protein structure developed by the Hamelryck group. The method will also take the dynamic nature of proteins into account.

Requirements:Knowledge of statistics, machine learning and programming (C++ or equivalent). Knowledge of biology or biophysics is a plus, but not a requirement.
Place of enrollment: Department of Biology, Bioinformatics Center
Supervisor: Assoc. Prof. Thomas Hamelryck
Co-supervisor: Prof. Michael Sørensen, Department of Mathematical Science
Application deadline: January, 5th, 2014, with start in 2014.

## Sunday, November 17, 2013

### Taking my thermodynamics course online

Readers of this blog will know I occasionally dabble with the flipped classroom/peer instruction approach in my teaching, and this year I finally went whole hog - to use an Iowan expression.

What I did (tl;dr)
This year I abandoned the textbook for my part of the course and replaced the material with videos and Powerpoint slides.  This allowed me to completely change the order I taught subjects in and introduce more of what I think are more relevant subjects.

Why I did it
Last year I had already flipped the classroom and used lecture periods almost exclusively on peer instruction questions based on the assigned reading.  Now that I was finally happy with how I was teaching, I started to realize that I was less happy with what I was teaching.

What one is teaching, and the order it is being taught in, is to a large extent dictated by the textbook one chooses.  We chose Dill's Molecular Driving Forces. Like most textbooks it's written for the instructor rather than the students: an excellent resource for people who already understand the subject.  And why not?  I am the customer after all.

Thermodynamics/statistical mechanics books are essentially physics books that go through the definition and derivation of key equations and concepts first and in great detail and treat the applications as more of an afterthought.  Example: I would argue that $K=e^{-\Delta G^\circ/RT}$ is a more useful equation than, say, $S=q_{rev}/T$ for the practicing chemist, yet most books will spend many more pages discussing the latter. And don't get me started on the Carnot cycle.

Redesigning the curriculum I had five guiding principles in mind:

1. The video shown at the beginning of this post.
2. Start with the most useful (a much less arbitrary term than important) topics to my students.
3. Let the homework problems dictate the material, not the other way around.
4. Reduce the load and spend more time on what you consider most useful.
5. Study test test test – test.

So, one of the first homework questions I wrote involves computing $\Delta G^\circ$ from a binding curve.  Then I wrote the corresponding lecture notes.  Since I introduced this topic early, I also get to use it again and again during the rest of the course, which increases retention.

Similarly, I was able to introduce problems involving the Molecular Calculator, because I could taylor the lectures accordingly.

How I did it
1.  The homework problems.  I rewrote all the homework problems from scratch. It's hard to describe how liberating (and relatively easy) it is to write exactly the problems you want knowing that everything you need by definition will be covered in lecture, exactly how you want it.

As in previous years I put the answer up in form of multiple choice on PeerWise.  Once an answer is selected the solution (copied from my Maple solution) is revealed.  Occasionally, I also supplied intermediate solutions to help guide the student and screen-casts showing how I solve the problem using Maple.

Finally, I the students some choice in the problems they want to solve.  For example, I told them they had to solve any six out of nine questions.  I made sure that the first six were relatively easy, but some of the remaining questions could be quite tricky.  Many students did all of them, and I got few complaints about the most difficult ones since the students themselves had chosen to work on them.

You can find the problem sets here.

2. The video-lectures.  I chose to make video-lectures because it was the fastest way to generate material.  The Powerpoint slides contain mainly equations and pictures and all the explanation is done verbally (remember: the students can rewind and repeat).  This is much quicker than writing everything down in detailed lecture notes.

I make normal Powerpoint slides and use ScreenFlow to record (PC users can use Camtasia). Another option would have been pen-casting but many of the figures were much too complicated to sketch and screen-casting made it easier to introduce videos, simulations, etc. However, if you have handwritten lecture notes you are happy with, this could be a good option.

Each video lecture is quite short (max 10 minutes) and most end with a question. I provide the Powerpoint slides - except the ones containing the answer - along with the videos.  The students have to watch between four and six videos before each two-hour "lecture" period

The editing features in ScreenFlow make it relatively easy to correct mistakes.  If you remember to pause briefly (also verbally) between each slide, then you only have to repeat one slides worth of material.

You can see the videos and slides here

3. "Reading"-quiz.  The students have to take an on-line quiz (no points) the evening before the day of the lecture (at the latest): one question per video that can be easily answered if one has watched the video (often a T/F question).  I do this for two reasons: (1) to make it clear that they must prepare for class since I am not going to repeat the material and (2) that they should pay attention while watching the videos.   The last question on each quiz is whether I should discuss something in more detail in class.

4. The "lecture" period.  During the 2 x 45 min "lecture" period I ask roughly 20 peer instruction questions.  Roughly ten are review questions on previous material and the remaining questions are on the new material.  I use Socrative for voting.  Most are conceptual questions designed with discussion in mind.

What I learned so far
1. Making the slides and videos and questions is a lot of work.  Even considering I have taught this course many times and knew exactly what I wanted to do.  But ...

2. ... it is much, much faster than writing a textbook yourself. Constructing such a textbook-replacement for your course is a manageable task. And extremely liberating and satisfying.

3. We live in the age of Google (OK, I kinda knew this one already).  You don't need to include a table of dielectric constants or heats of formation in your teaching material.  Just give a few examples of finding this info with Google in one of the early videos.

4. Review is essential.  The data from in-class voting is clear: take a question that 95% of the class answered correctly and ask is a week later.  Half the class will get it wrong.  Research shows that many subject must be reviewed at least 3 times before it sticks.  Keep this in mind when designing your curriculum.  Most courses pack in way too much material.  Very little of it sticks.  See the video at the beginning of the post again.

5. Surprisingly (to me) many of the students take the "reading quiz" at the very last minute and probably wouldn't prepare for class if it wasn't for the reading quiz.

Example: 30 students took the exam.  For the September 30 lecture period, 24 students completed the "reading"-quiz.  Eight of them completed the quiz between 11 pm and midnight (the deadline).

OK. That's it, for now.  Now would be a good time to watch the video a third time.  You know, so it sticks.

## Thursday, October 31, 2013

### PhD position in molecular modeling at University of Copenhagen

Do you want to help prevent drug resistance in viral diseases?

PhD Scholarship available at the University of Copenhagen, Denmark

A PhD position in in Molecular Simulations and Computational Biology is available from January 1, 2014 at the Department of Biology, University of Copenhagen, Denmark. The aim of the project is to study how drug resistance mutations in pathogenic viruses arise and how resistance can be circumvented. The students will work under the primary supervision of Kresten Lindorff-Larsen in tight collaboration with experimental groups both here and abroad.

The PhD student will use a range of methods from computational structural biology to study the interactions of viral drug targets with drug molecules. The goal is to predict and understand how mutations can give rise to drug resistance, and to validate and integrate experimental data in such studies. The student will combine high-throughput calculations with more detailed molecular dynamics simulations to study the interactions between drug molecules and their targets.

It is essential that the candidate has a strong background in protein science and in using computational methods to study e.g. protein structure, function and dynamics. Applicants should hold an MSc degree, and research experience with molecular modelling of proteins or other biomacromolecules is a prerequisite. Hands-on research experience in e.g. molecular dynamics simulations and free energy calculations is a distinct advantage as is experience in computational studies of protein-ligand/drug interactions. Good interpersonal and communication skills. The working language in the group is English, and the candidate must master both written and spoken English.

For further information about the PhD position including salary, the complete set of requirements and how to apply see the full ad at: tinyurl.com/drug-resistance-phd2

The deadline for applications is Dec 1, 2013.

Further information can also be obtained via email to Associate Professor Kresten Lindorff- Larsen, e-mail: lindorff@bio.ku.dk , website: http://www.bio.ku.dk/sbinlab

## Thursday, October 3, 2013

### Computational Chemistry Course - Exploring a PES

I made this video to illustrate the basic ideas behind the generation of a reaction profile. I show how to "explore" the potential energy surface for a basic Diels-Alder reaction.

The small animations were produced visualizing with Molden actual calculation done with Gaussian at HF/sto-3g level and screencasted with ScrenFlow. The entire video is another ScreenFlow capture of a PowerPoint presentation with my voice over.

## Monday, September 23, 2013

### Martin got interviewed by PeerJ

Martin continues to strike gold with PeerJ. He just got interviewed for the journal blog! Once again, way to go, Martin!

In his interview Martin talks about his articles published with PeerJ  (you can find them here and here), and his overall experience with publishing in an Open Access journal.