środa, grudnia 24, 2008

Human Adenovirus 2

During the holidays I wanted to try something out that was longer on my mind - remote rendering. At the university I have a pretty plain-desktop machine with Archlinux installed on it. It's not much. Integrated Intel graphic card and 64 bit 2GHz CPU. Nothing unusual, but I was curious how do the limits of the machine look if it comes to render some bigger models. Let's say virus capsids. My previous experiments with my home pc on this field failed on more complicated then ball representations. To say it simply - I run out of memory. It doesn't really matters if it's Linux or Windows, because on a 32 bit machine you have only maximum 4 GB of memory available. On a 64 bit system, however there's theoretically 16 EB of memory available so rendering viruses shouldn't be a problem. I went to VIPERdb and picked the first interesting looking virus I found. It was the Human Adenovirus 2. It's a medium-sized (90–100 nm) virus which is responsible for upper respiratory infections in children. I've downloaded both the half and full size capsid models, uploaded them to the remote machine and extracted the content. After that I went first for some low resource rendering gradually increasing the load of computation needed to be done. Here is how a ball model of the HAd2 capsid with b-factor colouring looks like:
It took about 5 minutes to render. By changing the representation mode from spheres to surface the render time increased to about half an hour. Surface representation also requires significant more memory so I added to the systems 3GB (1GB RAM + 2GB of swapspace) another 8GB by creating a swap file.
# cd /
# dd if=/dev/zero of=swapfile bs=1024 count=8388608
# chmod 600 swapfile
# mkswap swapfile
# swapon swapfile
As it showed up later this still wasn't enough. I've ended up with creating a second swapfile during the rendering and a total of 22 GB memory.
#free -m
             total       used       free     shared    buffers     cached
Mem:           994        843        151          0        118        410
-/+ buffers/cache:        314        680
Swap:        21295          2      21292
This is how a half capsid looks after rendering with surface (also b-factor colouring but this time with a different colour scheme):
And here's the full one with a better surface quality:
It took almost 45h to render and consumed ~19GB of memory. So far it was the longest and most resource consuming rendering I have ever done, but I think there's pretty much room for improvement ];) All the render was done by writing a render script and then run in the background on the remote machine by using the unix nohup command. nohup pymol -c render.py & This is necessary to prevent the application from receiving a hangup signal after logout. The "-c" flag turns pymol to command-mode so it wouldn't use any GUI.
Last but not least here's a small animation of the full capsid.
video
[Update] I'm starting to hate blogger for what he is doing with the quality of the uploaded movies.

1 komentarz:

Anonimowy pisze...

Opulently I acquiesce in but I think the post should acquire more info then it has.