danceroom Spectroscopy in Bhutan


In February I had the unexpected privilege of taking danceroom Spectroscopy to the first Bhutan International Festival, with three other members of the dS team – artist Becca Rose, musician Lee J. Malcolm and University of Bristol PhD student Mike Limb. We transported the gear over 4800 miles to the Himalayan country of Bhutan, a remote Buddhist kingdom rich in history, culture and tradition.

After a 48 hour journey from Bristol to Thimphu, via London, Paris and Delhi, we arrived in the beautiful Centenary park with – to our surprise and immense relief – the dS system all present and in one piece. Setting up dS in Asia in a park for the first festival of it’s kind posed some new challenges, from hair-raising bus journeys through the Paro-Thimphu valley, last minute computer repair in the hotel room, packing down all the equipment every evening to avoid exposing it to sub-zero temperatures, getting repeated electric shocks from dodgy wiring, to manually grounding a geodesic dome to prevent the whole installation from becoming live. Through the ceaseless efforts of the team, the festival organisers, local volunteers and a good amount of duct tape we overcame all the hurdles and successfully ran an installation for the duration of the festival.

The festival was a 10 day extravaganza consisting of arts, live music, film and food; all open to the public.  We ran the dS installation every day peppered with talks, movement workshops and music sessions. Hundreds of locals came and spent time exploring the installation, which is the first of its kind to ever be displayed in Bhutan. Local children in particular spent hours at a time playing games and dancing with one another, then suddenly rushing off only to come back an hour later with more friends. We even had children get into trouble for skipping school to come play!

The theme of the festival was collaboration, with projects between both local and international artists occurring throughout the week. dS has been a collaborative project from it’s inception between artists, scientists, musicians and dancers, so we were well suited to the theme. Interacting and working with so many talented artists from all over the world generated some unforgettable moments, including a spontaneous dance by the Monks of Majuli in the dS dome, with their music and movements blending seamlessly with the soundscape and visuals generated by dS (full video here), and our very own Lee J. Malcolm performing with the Rajasthani folk musician Kutle Khan.

The ten days in Bhutan sped by in a surreal blur of molecular dynamics, incredible music and film, plates of chilli cheese and momos, and visits to remote mountain monasteries above the clouds.  To cap it all off, on the last day of running the installation we were suddenly bundled into a taxi to meet their Majesties the King and Queen of Bhutan, after being fitted with ‘goh’, the Bhutanese formal wear.

I can safely say I never expected my career in computer science to lead to attending such a special event. It was an honour to be included and I hope the Bhutan International Festival continues to be an incredible success in future years, I’ll be back!


Compiling OpenMM as a 64-bit library on Windows

A problem with developing scientific software on Windows is the difficulty in installing scientific packages, which typically provide only very minimal support. To one who isn’t well-versed in CMake, cross-compilation or cygwin, it can be quite daunting. Fortunately, OpenMM, an open source GPU-accelerated molecular dynamics package supporting both CUDA and OpenCL breaks the mould and at the time of writing provides precompiled 32-bit binaries built under Visual Studio 2010 as well as decent instructions on how to compile it yourself. It’s a blazingly fast tool that has run well on every device I’ve tried, while also being extremely flexible (custom forcefield terms automatically turn into optimised OpenCL kernels!). Using it, I’ve been able to develop real-time interactive protein simulations:

For running simulations, downloading the precompiled library and using the python interface should suffice. However, if you want to use OpenMM as a library with an existing C++ application and use a different version of Visual Studio – or your application is 64-bit – you’ll probably need to compile it yourself.

What follows is a short guide for compiling and installing OpenMM 6.0.1 as a 64-bit library for Visual Studio 2012.

Assuming you’ve downloaded OpenMM, and have opened up the user guide (here), follow Chapter 9 ‘Compiling OpenMM From Source’ in that document, but add in the following tweaks for 64-bit.

Once you get to Section, when you click Configure and are prompted to select a Generator, choose ‘Visual Studio 12 Win64’, or whatever version you have. Make sure to read through all the options and tick anything you need.

Carry on following the user guide, and try to build it.

You’ll probably get an error like the following:

 error LNK2019: unresolved external symbol __imp_pthread_create referenced in function "public: __cdecl OpenMM::ThreadPool::ThreadPool(int)" (??0ThreadPool@OpenMM@@QEAA@H@Z) C:\Code\Libs\Source\OpenMM\build\ThreadPool.obj OpenMM 

The problem is that OpenMM ships with a 32-bit distribution of pthreads, but is trying to link with a 64-bit version. Thankfully, SimTK have a version available here. Download  ‘pthreadVC2_x64.dll’ and ‘pthreadVC2_x64.lib’. These should live in the directory ‘src\libraries\pthreads\lib\’, where ‘src’ is where you downloaded the OpenMM source. You also need to put them in ‘openmm_build\Release\’.

Now open the Visual Studio solution and change the dependencies for the projects OpenMM, OpenMMCUDA and OpenMMOpenCL (if you’re building these). Do this by right clicking on the project, selecting ‘Project Properties’. In the window that appears, click Link->Input, and in the ‘Additional Dependencies’ field change the ‘pthreadVC2.dll’ to ‘pthreadVC2_x64.dll’. Do that for each project, then try to build again. With a bit of luck, it will work. If anybody alters the CMake configuration to automatically do this, I’d like a copy, as this is a bit of a dirty hack.

Run the unit tests, then build the ‘INSTALL’ project. Once that’s done, navigate to the installation lib directory (‘C:\Program Files (x86)\OpenMM\lib’ by default), and paste the pthread files there too. Make sure you set the environment variables as described in the User Guide, and you should be able to run some MD!