Monthly Archives: May 2014

Thermal energy in calories

A short note. In chemistry and related fields we quite often describe energies in units of calories, instead of using Joules from the SI system. From physics, we know that the thermal energy at room temperature is about 25 meV. The question is: how does the thermal energy relate to an interaction energy (e.g. between two molecules) if that energy is provided in units of kcal/mol?

The thermal energy in Joule is k_B*T. That energy is “accessible” to any given molecule, i.e. for comparison with a value normalized on a mole (as an energy provided in units kcal/mol obviously is) we need to multiply it with the Avogadro constant A, yielding the thermal energy in Joule/mol. About 4190 Joule comprise one kcal (1000 calories), i.e. the thermal energy in kcal/mol is k_B * T * A / 4190. Given that, we can relate any given interaction energy to the thermal energy. A quick Python implementation:

import sys
# Thermal energy for 300 K:
# T_300 = 4.14 * 10^-21 J
# (k_B * 300 K, with k_B = 1.38 * 10^-23 J/K)
# The relation between Joule and (kilo)calories:
joule_per_kcal = 4190
# Thermal energy in kcal/mol:
# T_300_kcalpermol = T_300 * A / joule_per_kcal
# with A = 6.02 * 10^23 (Avogadro constant)
T_300_kcalpermol = 4.14 * 6.02 * 100 / joule_per_kcal
print "Thermal energy (at 300 K): %.2f kcal/mol" % (
# Read actual energy in kcal/mol.
energy_kcalpermol = float(sys.argv[1])
energy_per_thermal_energy = energy_kcalpermol / T_300_kcalpermol 
print "%.3f kcal/mol divided by the thermal energy: %.1f" % (
    energy_kcalpermol, energy_per_thermal_energy)

So how does an interaction energy of 2 kcal/mol relate to the thermal energy?

$ python 2
Thermal energy (at 300 K): 0.59 kcal/mol
2.000 kcal/mol divided by the thermal energy: 3.4

First of all, the thermal energy is 0.59 kcal/mol — something to keep in mind when dealing with kcal/mol-based energy values on a regular basis. We learn that an interaction energy of 2 kcal/mol is already more than three times larger than the thermal energy, i.e. this kind of interaction may easily dominate diffusion and stands out of the thermal noise.

Websites using WP-GeSHi-Highlight: a NerdyData search

For some time now I am maintaining WP-GeSHi-Highlight, a code syntax highlighting plugin for WordPress, based on the established PHP highlighting library GeSHi.

The plugin has a very basic feature set, and I have never really promoted it — still, I was wondering how popular it is. I mean, it just works, reliably, and therefore it is a quite appropriate choice for many types of WordPress sites.

I came across NerdyData, a search engine for website source code:

We index the HTML, Javascript, CSS, and plaintext of hundreds of millions of pages.

Honestly, their web interface makes a pretty crappy impression. Nevertheless, It found about 140 websites that include the term “wp-geshi-highlight” in their source:!/searchTerm=wp-geshi-highlight/searchPage=1/sort=pop

This is a short list of some web pages using WP-GeSHi-Highlight, found via NerdyData:

When seeing this, I found interesting that many make use of the simple customization and deviate from the default styling of WP-GeSHi-Highlight code blocks.

WP-GeSHi-Highlight 1.2.2 released

I have released WP-GeSHi-Highlight 1.2.2. WP-GeSHi-Highlight is a code syntax highlighting plugin for WordPress, based on the established PHP highlighting library GeSHi.

This are the changes compared to version 1.2.0:

  • Improve CSS normalization (add box-shadow: none to pre block).
  • Use plugin_dir_path/url() instead of obsolete WP_PLUGIN_DIR/URL constants (improve compatibility with HTTPS-driven websites).
  • Remove obsolete screenshot from release.
  • Minor code cleanup.

The challenges of secure asynchronous group messaging

I just want to draw your attention towards another nice blog post of Open WhisperSystems, describing technical challenges for securely implementing a group chat. So, head over to and have a nice read. If you are new to OTR and secure instant messaging architectures in general, you might be surprised by the complexity and the text might be a bit too difficult for you. There are, however, some more nicely written blog posts on the Open WhisperSystems blog that might help you understand the basic concepts.

By the way, yes, I totally recommend TextSecure if you are interested in using a secure instant messaging solution for your mobile phone. To me, it currently is the most convincing solution, especially from the political point of view and at the same time regarding all technical concepts. So far, the technical implementation might not be perfect, and an iOS client is still missing, but thanks to the open source community and a great project lead these issues will resolve over time. No need for looking at Threema and other possibly commercial and closed-source applications. If you want security, go for TextSecure. If security does not matter to you, go ahead and proceed using WhatsApp (I do, and for many things it serves the purpose just well).

And remember, IT security is not always what it seems to be: