I’ve just published an article for the Incorporated Society of Musicians, introducing the world of online real-time music (ORM) software. Strangely, this field has hidden in plain sight for decades, as a somewhat niche occupation of internet hobbyists and academic researchers. The COVID-19 lockdown has precipitated a wave of new interest, with professional musicians quickly realising that Zoom and Skype wouldn’t cut it and looking for something more suitable.

The article is based on extensive interviews with some key players, and my own forays into ORM. We all want to get back to playing in real life as soon as possible, but it’s likely that being able to rehearse, livestream and record remotely in real time will remain useful going forward. The pandemic could prompt a rapid ‘professionalisation’ of the field, and ORM may become a standard tool of jobbing musicians alongside home recording, remote lessons, etc.

Check it out and please share the article if you find it interesting. Most people still do not know that online real-time music is actually possible.

In due course I might upload a slightly longer version to this blog, but the essentials are pretty completely covered in the ISM’s version — thanks to them for their editorial flexibility in allowing me to retain the hybrid news/advice tone I was going for.

At last year’s Biophysical Society 2015 meeting, Peter Olmsted and I met Philip Fowler, who at the time worked in Mark Sansom‘s group (he now works in the Nuffield Department of Medicine at Oxford). I had noticed a signal in their lipid bilayer simulations that looked like a two-step asymmetry/symmetry transition we had studied theoretically. Understanding how constituents of a lipid bilayer interact and self-organise is key to the biology of the cell membrane, as well as to applications of synthetic lipid bilayer membranes.

It has been a pleasure to work with Phil and Mark over the past year as we have looked closely into the symmetry and asymmetry of phase-separating bilayers, using a raft (geddit?) of new simulations expertly constructed and analysed by Phil. A joint paper is out now in JACS, linking the kinetics of lipid bilayer phases to a theoretical model of competing inter-leaflet coupling effects. Check it out!

Roles of Interleaflet Coupling and Hydrophobic Mismatch in Lipid Membrane Phase-Separation Kinetics

I was recently preparing a paper for an ACS journal and had a few issues with the bibliography style. Most of these were fixed by downloading the latest achemso.bst style file from here. However, it didn’t include that the journal seems to use only first pages (not ranges) when making references. That is, an article on pages 1897–1902 is referred to as:

Authors, Journal, Year, Volume, 1897

and not:

Authors, Journal, Year, Volume, 1897–1902.

So, using some information from here I have made a modified achemso.bst [link fixed 24/7/18] that uses only the first page. I don’t know about you but it always takes lot googling to figure out this stuff, so I’ve tried to make this post easily findable by those in a similar situation.

I had an old blog post linking to a walkthrough of the code developed and used during my PhD on phase separation of polydisperse colloids. It’s now a little deprecated, partly because I’ve done further work on that topic since then, and because a link it contained had become dead.

Now, here is a short post to provide a quick-and-dirty runnable example of the latest code. I’ll provide a link to the repository, and then mention a new EXAMPLE folder which contains a minimal working simulation setup. Finally I’ll briefly overview what the code and analysis tools can do.

Repository: https://bitbucket.org/johnjosephwilliamson/phd-code-clone-bitbucket

EXAMPLE folder:

Screen Shot 2016-04-15 at 15.54.48

  • The README.txt contains instructions
  • preinit.txt controls the initialiser program, which is run in order to pack the simulation box with particles of the required volume fraction, polydispersity… This file is set to make a simple cubic box (XLATTICE 0 etc.), without the fancy crystal templating algorithm we used in some applications
  • simconfig.txt controls the main simulation, and in this case is set to simulate hard spheres (DEPTH and RANGE of square wells is set to 0)
  • The other files are binaries to be run from the command line, which I suppose might run as is if you have a mac configured similarly to mine. Else, they can be compiled from the source code in the repository. The appropriate source code folders are mentioned in the README. In the top-level-directory of the repository, there is another README which provides compilation flags (linking to “math” and “boost” libraries) which may be necessary, but for me on this computer were not
  • XYZ_converter allows converting the output to .xyz format for visualisation in OVITO
  • Profit…

Screen Shot 2016-04-15 at 16.04.19


Naturally, let me know if you have any trouble compiling or running the code. See my publications page for examples of what we have done with it. If you are interested in using or adapting the code, I am always happy to explain it in more detail. Briefly, the existing capabilities/purposes:

  • kinetic Monte Carlo simulation of noninteracting, hard-sphere or square-well colloidal particles
  • Gaussian or Schulz polydispersity, with two choices of how the square well polydispersity relates to the hard-core polydispersity
  • geared toward study phase-separation kinetics in polydisperse systems, local characterisation and structural information
  • isotropic simulation box, or a special cuboidal geometry in which a crystal is templated at one end (choice of two crystal faces), to study crystal growth kinetics
  • XYZ_converter to produce standard .xyz files, for OVITO visualisation
  • a wide suite of analysis programs: structure factors (including intermediate scattering functions and partial versions thereof for polydisperse cases), polydisperse fractionation measurement, coarse-grained-Voronoi local volume fraction analysis, crystal interface-tracking, kymographs…



I’ve recently been feeling more like an intern at Pixar than a scientist — yes, it’s time for some scientific imaging. In my field of simulation and theory, some form of imaging is important in a prosaic kind of way just to get a feel for what’s going on, and check for any disastrous bugs. But, more and more, it’s becoming a real mode of scientific communication. Journal covers commonly feature simulation renderings or even schematic artists’ impressions, as well as more traditional fare such as beautiful microscopy images. With the move towards online journal viewing (and sometimes, free colour printing), authors have more and more freedom to include beautiful renderings as a key, functional part of their scientific story.

I mostly use the incredibly versatile and intuitive OVITO package for the purpose. Recently I spent a while learning its intricacies (for example, the software Tachyon renderer for nice directional lighting). Here are a couple of images from the two main strands of my work. OVITO does a great job with both a typical 3D particle based simulation, and a quasi-3D rendering of a 2D lattice model with highly stylised cubic particles.


First up, phase separation in polydisperse colloids. My latest paper in this area focused on methods of characterising the highly complex phase compositions and kinetics involved. The colours are computed from our new approach to measuring local concentration when a large spread of particle sizes exist, which turns out to be quite a subtle problem. The picture really helps get across just how highly polydisperse the fluid is, and we can even see by eye the way that larger particles, in this case, end up in the denser (liquid, hot colours) regions. Of course, all of this is supplemented with quantitative measurement and graphs, and the message could be got across without this picture. But: it’s beautiful; and it gives the reader an instinctive feel for both the setting of the work, and one of its key findings. The image was shortlisted as a J. Chem. Phys. cover image.

Gas-liquid phase separation in a highly polydisperse simulated fluid. Novel characterisation methods are used to study which particles end up where.
Gas-liquid phase separation in a highly polydisperse simulated fluid. Novel characterisation methods are used to study which particles end up where.


Our manuscript in review [now accepted in Biophys. J.] provides a theory for how lipid bilayer domains do or don’t align between the leaflets. In fact, the theory began as a simulation — an idealised lattice model capturing a key physical feature, the thickness of the bilayer leaflets. It turned out to be idealised enough for pen-and-paper treatment, hence the resulting theory. But, directly simulating the model helps to corroborate the results and figure out what goes on over longer timescales that aren’t treated in the theory. Mapping membrane thickness as the z-coordinate allows the 2D simulation to be rendered in a quasi-3D manner, and the competing thicker and thinner phases can be seen nicely. OVITO allows cubic particles to be plotted. I used this to emphasise the underlying lattice nature of the model, but had the particles overlap in a ‘random-looking’ way partly for artistry, and partly to get across the fluctuating, messy nature of liquid phases in the bilayer at the molecular scale. The image was a finalist at the image contest of Biophysical Society’s annual meeting, and I came away with a nice big hard-back printed version to mount on the wall.

Rendering of an idealised lattice model for a lipid bilayer membrane. Separation into multiple metastable and equilibrium phases is possible due to the interaction between the bilayer's two leaflets. https://scholar.google.com/citations?view_op=view_citation&hl=en&user=6M4KATQAAAAJ&citation_for_view=6M4KATQAAAAJ:UeHWp8X0CEIC
Rendering of an idealised lattice model for a lipid bilayer membrane. Separation into multiple metastable and equilibrium phases is possible due to the interaction between the bilayer’s two leaflets.

I very recently completed a PhD with Mike Evans. As detailed on my science page we were working on model colloidal systems to study some general features of phase transitions (gas-liquid, crystal-fluid, etc.) particularly in polydisperse substances — where every particle is slightly different to every other. The work produced some interesting results and nice publications with more to come, and culminated in this hefty tome.

I’ll now be staying at Leeds for the next couple of years, but my day-to-day work (i.e. funding) concerns a new topic: the biophysics of lipid membranes. Yes, having spent over 3 years figuring out how to explain to people what I do, I now have to start from scratch. It seems like a good time for a quick post explaining the topic, and what attracted me to it.

Cells and life

How did life begin? Of course, nobody knows precisely. However, we can speculate reasonably on what the earliest life was like. It is overwhelmingly likely that the first things in any sense ‘alive’ were tiny protobacterial cells, roughly spherical containers of stuff with little internal structure which, agonisingly slowly, acquired the capabilities we associate with life: reacting to their environment, duplicating themselves, and so on. A nice paper by a collaborator of mine discusses (Section 2.1) the characteristics of the first life, and reasons why the simplest — earliest — possible life probably must have inhabited the length scale we associate with simple bacteria.

One of the criteria for life is particularly simple and, to me, quite satisfying, because it seems to spring from simple logic rather than particular accidental features of our world. A living thing in the sense we understand it should have a boundary which distinguishes it from its environment. Where does the outside end and the organism begin? The other criteria for life — reproduction, motility, response to environment etc. etc. — rely on there being an answer to this question. Intimately related to this is the idea that something living should be able, to any extent, to regulate its internal chemistry, distinct from changes in its environment. If we, humans, simply filled with seawater when entering the ocean; or if our organs were not contained ‘inside us’ but just wandered around the universe independently, we’d have a hard time proving ourselves to be alive. Similarly, the cell’s boundary couldn’t just be a fully permeable, abstract dividing line which allowed the cell interior to remain in permanent, passive equilibrium with the outside world. So, cells specifically and life generally must be able to selectively exchange chemicals with the outside world. Hopefully, my point is coming into view. A cell boundary is key to life not just as a logical prerequisite for even speaking about life as we know it, but as the focal point for the very processes that render the cell alive: its interactions with its environment.

Lipid membranes

In living cells, ‘lipid membranes’ serve to encase the cell and to mediate exchange with the environment. What are they? For a physicist, a lipid is most instructively thought of as being a tadpole-like molecule. The ‘head’ likes water — it is hydrophilic, because it is polar and therefore doesn’t too much disrupt water’s hydrogen-bonding network — while the ‘tails’ don’t like water, being nonpolar and therefore hydrophobic for the same reason that everyday oils are. Allowing a whole bunch of these lipids to undergo thermal motion in a watery solvent results in arrangements which keep the water-hating tails as far as possible from the water, shielded by the heads. See this picture. The lipid bilayer arrangement is a roughly flat sheet which can fold up to make a roughly spherical vesicle (i.e. a structure appropriate to form a cell).

The lipid membrane mediates a huge variety of vital processes: cell division requires the spherical membrane to form a ‘bud’ which eventually breaks off; selective exchange of ions and other important things takes place through ion-channel proteins embedded in the membrane; inter-cell signalling and detection processes necessarily take place through the membrane; the list goes on.

Understanding how lipid bilayers work involves a heavy physics component, to understand properties such as membrane curvature, asymmetry (one layer being different from the other), phase separation, formation and break-up, and the interdependence of these properties. The CAPITALS programme is a large collaborative project aimed at this target, and my new work is part of it. The people in charge (principal investigators) are real experts in the field, and everyone involved is extremely switched-on and open-minded — it’s great to be part of it.

Here’s a snapshot from some early computer simulation work I’ve been doing. It’s a homemade version of a wide class of models where simplified lipids are represented as chains of 3 beads, one hydrophilic (green) one and two hydrophobic (red) ones.


Mike Evans and I have just published our second article together, in the Royal Society of Chemistry’s interdisciplinary journal Soft Matter. It concerns a simulation study of crystal growth in the presence of two common complicating factors: i) Polydispersity (particles are non-identical) and ii) Metastability (in addition to the crystal growth, non-equilibrium gas-liquid separation is taking place). The result is the “boiled-egg” growth mechanism, which we model with theory and simulation, and whose effects on growth depend on a subtle interplay between the two factors I just mentioned, which remains to be further explored. The work is of generic relevance to many situations, but particular examples include e.g. protein crystallisation, photonic crystal growth, colloid-polymer mixtures. There are looooooads of nice pictures in this one.

  • The advance online article is here.
  • A pre-print which I will shortly update with the final small changes we made before publication (freely accessible to everyone but with less pretty formatting and editing etc.) is here.



I’ve just uploaded a preprint of a new paper me and my supervisor are writing to arXiv. It’s a freely-available repository research in loads of different areas which people use to make research available before and while its in peer review for a journal.

This one is to do with crystal growth in soft condensed matter. That includes colloidal crystals and closely related things such as proteins, which must be crystallised in order to study their structure in biological/medical research. The broad question of ‘What’s the best way to grow a crystal?’ is relevant in a lot of scenarios, especially given that one is often quite free to vary the conditions in the system to optimise growth; for instance the interactions in a e.g. colloidal suspension can be easily tuned by adding other species such as polymer coils into the solution.

The dynamics of phase transitions, i.e. how systems do or do not actually reach their true equilibrium state, is an important consideration in applying thermodynamics to soft matter. In this paper, we simulate crystal growth (as shown in the video here) in the presence of metastable gas-liquid separation, which may be encouraged or avoided by tuning the interaction potential in a system, and polydispersity, which usually cannot be avoided in soft matter. There’s a variety of nice visualisations showing the effects of these two factors on the crystal growth dynamics, and we find that they can interact in a complex and previously unknown way. The simulation findings are related to existing experimental data and to theoretical considerations. Here’s the link:

The effect of metastability and polydispersity on crystal growth kinetics

This work, in early form, was the subject of a recent internal seminar in the Soft Matter Group at Leeds. I’ve uploaded the slides and an audio recording from the seminar.


Writing computer code for physics research is quite different to a lot of commercial software development (in a number of ways, which I might at some point write about in detail here).

For example, graphical output. In most consumer software, it’s usually pretty important to at least have a nice-looking graphical interface for the user. In special cases, e.g. games, the graphical (and aural) feedback is pretty much the whole point of the software, so it’s obviously important to get it right.

In scientific simulation, graphical feedback often doesn’t have quite the same status because it’s not normally the main output of the software. Instead, the main purpose of the code might be to produce huge data files which can then be analysed to measure various properties of the simulation’s ‘trajectory’, (e.g. temperature, pressure, structure) producing results broadly analogous to those taken in a real-life experiment. Whether or not the program looks good while it produces this trajectory is less important, and because speed and efficiency is usually such a key consideration in simulations, anything that might introduce an unnecessary overhead (e.g. graphics) is usually turned off.

However, in another way, graphics play an even more important role in scientific simulation — bug checking. In contrast to consumer software, where a bug might not matter as long as it has no observable effect or doesn’t crash the program, the value of scientific simulation code is completely tied up in knowing exactly what the code is doing. It’s no good thinking that a bug doesn’t matter as long as the results come out as expected, because the whole point is that you don’t know in advance what the results will be, and you’re interested in how they might differ from expectations. An interesting simulation result is no use at all if you’re not sure that the code, in microscopically fine detail, is doing what you say it is — the point of the simulation is to find out how large-scale effects emerge from known small-scale dynamics and if those small-scale dynamics are subject to errors and bugs, you probably won’t discover anything useful.

So, by visualising your simulation, you can check for bugs which might not be obvious during analysis. You can check that the individual particles or molecules or whatever are acting believably, as you programmed them to, and then be a lot more confident in any large-scale, emergent effects that you discover.

Also, more importantly, it looks cool.


For a while I’ve been looking for an easy to use and powerful visualiser for atomistic simulations. I’ve used some not particularly fancy home-made code for this but wanted something more versatile that was still able to handle tens of thousands of particles.

So, OVITO which uses OpenGL rendering and is completely free and cross-platform, is perfect. I wrote some code that quickly converts my simulation’s data files (‘trajectories’) into a format readable by OVITO, loaded them in, and now I can spend all day making videos instead of doing real work. This program also easily allows special effects like color-coding particle properties, structure analysis, rotation/slicing of the simulation box etc., so it’ll be handy for preliminary analysis as well as making illustrative videos for seminars and so on.

An example

I recently posted about gas-liquid phase separation, specifically ‘spinodal decomposition’ in which the phase separation happens quickly throughout the whole system, rather than by nucleating at a specific site. A while ago I tried running something similar but in the presence of a template for crystal growth (i.e. a regular lattice at one end of the simulation box). This templated growth is another main focus of the project so we thought it might be interesting to combine the two ideas.

A video, produced with OVITO:

What seems to be happening for the parameters I’ve used is that the template causes a crystal to grow but, as was discussed in this paper, the crystal can’t locally coexist with the liquid, even though the liquid has a roughly similar density to the crystal. Instead, the crystal needs to coexist with the very-low-density gas phase, so it coats itself with a thick layer of gas which ‘shields’ the crystal from the liquid as it grows. It’s a ‘split interface’ (Crystal-Gas-Liquid) similar to those discussed here and may substantially slow down the growth of the crystal. Experimentally, this means that little crystallites form which effervesce, or bubble, as the gas bubble they keep trying to form around themselves floats away. It’s an inherently nonequilibrium effect because, at equilibrium, the gas-liquid separation disappears and you’re left with just two phases: a crystal and a very tenuous vapour. The effect of ‘metastable’ (nonequilibrium) phase transitions like the gas-liquid separation is a key focus of my work.

Click the photo for a high-res version

Here is a photo I recently took with my friend Tom. It’s a little tube containing a suspension of colloidal particles (described a bit more on my Science page). Colloids are small but not microscopically tiny, which means that when they form crystals, the typical distances between particles are larger than those found in molecular or atomic structures. In fact, the distances correspond roughly with the wavelength of visible light, so the crystals scatter incoming light of all different colours and, as shown in the picture, look great. Natural and synthetic opals also display this ‘opalescence’, because they are formed by the crystallisation of colloidal sand particles.

I got this little sample when I was on a conference in Corsica and I’m very fond of it, because the only colloidal suspensions I usually get to see are pretend ones in computer simulations. The motivation for having spent a morning with Tom pointing a camera at a tube is, hopefully, to provide a nice green-screen background for an interview I was involved in for the Physics Department’s website. In the interview I managed to talk for 15 minutes about why Leeds is a good place to do a PhD, while forgetting to once mention its music scene. Well done me.

Thanks very much to Tom West for his incredibly steady camera-hands, and patience.