czwartek, lutego 05, 2009
Blank page
Kurcze, chyba załapałem "syndrom pustego ekranu". Ostatnio pisanie zaawansowanych shell skryptów do obliczeń na klastrze lepiej mi idzie niż napisanie tutaj jakiejkolwiek notki, nie mówiąc o artykule, który zadeklarowałem się napisać. A deadline'y są tuż-tuż. Przydałby się taki cudowny środek w pudełku z napisem "W razie braku motywacji stłuc szybkę".
sobota, stycznia 31, 2009
Hatless
Wspominałem już, że nie znoszę "redhatów"? Mam takie powiedzenie: Red Haty - czerwone szmaty. Zostało mi to chyba po moim pierwszym Linuksie - Red Hat 6.1. W zasadzie to każda dystrybucja bazująca na rpmach zyskała u mnie negatywną opinię (no może za wyjątkiem FC2, ale to było dawno, dawno temu), a miałem ich trochę - RH 6.1, RH 7.0, FC 3, FC4, Aurox 9-10. Z chwilą kiedy trzeba coś upgrade'ować, mając wgrane niestandardowe paczki zawsze zaczynały się schody. Zawsze. Na chochliku (tak nazwałem laptop na którym chwilowo pracuję) początkowo miałem postawioną Fedorę 8. Upgradowałem ją z każdym wyjściem nowszej wersji i za każdym razem kłopotów było więcej. Ostatni upgrade do wersji 10 skończył się tym, że instalowałem pakiety w sesji awaryjnej (por. fot.) po tym jak musiałem wywalić większość, jak nie wszystkie programy jakie instalowałem w wersji FC9. Dodam, że cały proces doprowadzania systemu do stanu użytkowania zajął mi 2 dni. Myślałem, że się będzie opłacało. Myliłem się. Same bootowanie zajmowało dobre 5-10 minut. Gnome mulił jeszcze bardziej niż zwykle, a dźwięk odtwarzany przez PulseAudio "szarpał" do tego stopnia, że odechciewa się słuchać muzyki. O czymś bardziej zaawansowanym takim jak chociażby tworzenie grafiki wektorowej nie wspomnę. Wtedy przemówił przeze mnie głos rozsądku. Fuck it! Instaluję Archa. Słowo się rzekło, gorzej z czynem. Przyznam się, że trochę się bałem tej instalacji, po tym jak parę dni wcześniej poległem sromotnie przy instalacji Archlinuxa na Toshibie Satellite jednej z doktorantek w ZMM (konkretnie to xorg nie chciał wstać). Po zrobieniu stosownych backupów przystąpiłem do pracy. Sam proces instalacji i aktualizacji nie był problemem. Zajęło mi to w sumie 1h - vive la światłowody TASKu. Problemy pojawiły się po zaktualizowaniu kernela i ponownym uruchomieniu maszyny. System mulił podobnie jak na fedorze (może niepotrzebnie tak po niej pojechałem). Pomyślałem, że może to przez nowy kernel. Na szczęście downgrade w Archlinuksie jest naprawdę prosty. Wyszperałem paczkę z cache'a i zrobiłem co trzeba pacmanem:
# cd /var/cache/pacman/pkg/
# pacman -U kernel26-2.6.25.6-1-i686.pkg.tar.gz
Po restarcie system wrócił do ponad-świetlnej prędkości pracy(czyt. normalnej). Zrobiłem, więc stosowny wpis w pacman.conf by mi już nie aktualizował kernela. Tyle jeśli chodzi o problem pierwszy. Problem drugi to raczej linuksowa klasyka tylko w nieco nowszym, jak dla mnie wydaniu - dźwięku brak. Używam zewnętrznej karty dźwiękowej pod usb, bo chipset zintegrowanej jest uszkodzony. System wykrywał obie karty i ładował stosowne sterowniki, ale alsa używała domyślnie tej zintegrowanej. W końcu wygooglowałem, że wystarczą odpowiednie wpisy w modprobe.conf by przydzielić kolejność używania kilku kart dźwiękowych:
#/etc/modprobe.conf (for v2.6 kernels)
#
options snd_usb_audio index=0
options snd_intel8x0m index=1
Voilà! Praca na pingwinie znów jest przyjemnością.
ś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.
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.
Last but not least here's a small animation of the full capsid. [Update] I'm starting to hate blogger for what he is doing with the quality of the uploaded movies.
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. [Update] I'm starting to hate blogger for what he is doing with the quality of the uploaded movies.
wtorek, grudnia 23, 2008
Building Pymol SVN on Archlinux
Lately I've been neglecting my blog for the sake of my work as a Ph.D. student (programming in Fortran). I'm going to catch up on this. Writing some Fortran code isn't that hard even if you are starting to learn the language from scratch like I do, but definitely it isn't the type of "coding is fun" programming language like Python for example. Speaking of Python, since 3rd of December your python scripts are getting old, because Python 3.0 is out. The new version brings major changes in the language that make you previous HelloWorld.py program stop working (print is now a function and should be called out print("Hello World!") instead of print "Hello World!"). Many programs I use require Python 2.4 or 2.5, some like OpenOffice.org Python 2.6 and soon some will require Python 3.0. Keeping compatibility on a system is getting problematic. Luckily I've installed Archlinux on my desktop at work which makes life easier if you know how to use it. I wanted to install the latest Pymol version from svn, but I've found it's incompatible with Python 2.6 which was required as I mentioned above for OO.o. So here's what I've done.
First I've installed a separate python version from the repositories - Python 2.4
After this I needed Pmw for the GUI. It can be done by building from source like this:
After this you are ready to build pymol from the SVN:
Thats It!
Now an upgrade of Python to 3.0 will not mess up with your Pymol installation.
First I've installed a separate python version from the repositories - Python 2.4
# pacman -Sy python24After this I needed Pmw for the GUI. It can be done by building from source like this:
# wget http://downloads.sourceforge.net/pmw/Pmw.1.3.2.tar.gz
# tar -xvzf Pmw.1.3.2.tar.gz
# cd Pmw.1.3.2/src
# python2.4 setup.py build
# python2.4 setup.py install
of by using a modified python-pmw PKGBUILD from the AUR. Just make sure it uses python 2.4 by changing in the build function the default python:
build() {
cd $startdir/src/Pmw.$pkgver/src
python setup.py build
python setup.py install --prefix=/usr --root=${startdir}/pkg
}to python2.4:build() {
cd $startdir/src/Pmw.$pkgver/src
python2.4 setup.py build
python2.4 setup.py install --prefix=/usr --root=${startdir}/pkg
}
After this you are ready to build pymol from the SVN:
# svn co https://pymol.svn.sourceforge.net/svnroot/pymol/trunk/pymol pymol
# cd pymol
# python2.4 setup.py install
# python2.4 setup2.py install
# cp ./pymol /usr/local/bin/pymol
Thats It!
Now an upgrade of Python to 3.0 will not mess up with your Pymol installation.
piątek, grudnia 19, 2008
Atatakasa1
- Węsołych świąt!
Tymi słowami Diaboł pożegnał się z Śmiertelniczką. Tak szybko jak się zjawił tak szybko też zniknął w mglistej dali. Upojony nie wiadomo czy winem, czy rozmową z bliską osobą maszerował niesiony rytmem melodii2 mając otaczający go świat gdzieś na czubkach swych różek. Nic dziwnego, że nim się obejrzał przemaszerował szmat drogi nie w tym kierunku w którym chciał. Przystanął na chwilę. "Hmm... Ci ludzie są naprawdę dziwni" - pomyślał spoglądając z półmroku w blask mieniących się dekoracji świątecznych. "Stroją, dekorują, kupują, sprzątają, pieką. A wszystko po to by DOBRZE przeżyć święta... A przecież to takie proste - Święta to po prostu osoba obok która sprawia, że czuje się to ciepło w sercu". Jeszcze przez chwilę mżawka moczyła jego kosmatą twarz zanim obrócił się na kopytku i w kilku żwawych podskokach zniknął w jakiejś czarnej jamie.
[1] jap. Atatakasa - wesołość, czułość, ciepło serca.
[2] Autor ma tu na myśli utwór NemesisTheory pt. Don't Give a Damn
Subskrybuj:
Posty (Atom)