Thursday, March 30, 2006
High resolution pictures in Pymol 0.99
Warren DeLano has shared with [ccp4bb] a simple way for creating publication apt images right from the Pymol 0.99 command line, skipping the use of image editing programs such as Gimp, Krita and so. I've found it to be very interesting and entertaining, so I'll reproduce it here:
# for OpenGL images:
png image1.png, dpi=300
# for ray-traced images:
png image2.png, dpi=300
Hope it's useful for you!
Friday, March 24, 2006
Introducing pdbsplit 0.3.1
I've finished version 0.3.1 of my handy utility called pdbsplit, which can right now split a single PDB file into several chains, domains, aminoacid groups, etc. You can now choose different ranges of aminoacids to be output, and there switches for ripping headers, ligands, waters, etc.
The download link (Unix sources) is here.
Monday, March 20, 2006
Changing the codec for those incompatible videos in your presentation
If you want to change your codec, here's your command (again using ffmpeg):
ffmpeg -i inVideo -f avi -vcodec mpeg4 -b 800 -g 300 -bf 2 -acodec mp3 -ab 128 videoMpeg4.avi
This line forces the avi format (-f avi), uses mpeg-4 as the encoding standard (-vcodec mpeg4), sets a bitrate of 800kbps (-b 800), sizes GOP in 300, so it makes DivX compatible (-g 300), etc. Replace inVideo with your video name, and you're done.
Saturday, March 18, 2006
Reading a PDB file in C
First and second line represent the positions of the array you have to access to read that field. For example:
for(fgets(tempString,80,pdbfile);!(strstr(tempString,"ATOM "));fgets(tempString,80,pdbfile)); //Search for the first ATOM card
x = atof(&tempString); /* Scan the coordinates for the first atom */
y = atof(&tempString);
z = atof(&tempString);
Thursday, March 16, 2006
Molecular mass center calculator 1.0.2
this is the first public release (interesting thing: it's version 1.0.2!) of this little piece of code. It's only purpose is to calculate the mass center of:
* Each monomer present in a PDB file.
* The whole protein.
* A list of aminoacids.
It also displays the euclidean distances between every two aminoacids present in the list (if any is given).
Please execute it with no parameters for some examples. Feel free to use, share, modify and give back the changes, since this piece of code is Free Software.
You can download it (Unix sources) here. Any comment/suggestion/shout is welcome.
Problems choosing colour in Dino?
So, after searching for any kind of help in the manual, I found the only way to choose a certain colour was to refer it by the name ("is that olive green_3, or is it just emerald green_5?") or by the RGB tag (easy, huh?).
Googling, I found an interesting document featuring a visual representation of every colour, its name and its RGB tag, retrieved it using a web-archive (it had already disappeared by that time), and posted it at the Dino forums.
For your colouring pleasure, you can download it here!
Wednesday, March 15, 2006
Teaching model building with 'Coot'
So, what should I do? With only 1h 30' to teach something useful, my only hope was Coot (Wincoot, to be more precise). So, I translated and adapted to spanish (OpenDocument format for your viewing *and* editing pleasure) Paul's tutorial, and gave it to them. Result? Yup, everybody performed mutations, refined the structure, downloaded and displayed several structures and maps from PDB and EDS, etc.
They found Wincoot to be lacking some minor features, as clearing the tags displayed on screen, but none of them were critical, so I can tell you that the overall results were excellent.
Tuesday, March 14, 2006
Finding out which 'glibc' version you are running
The software authors are usually aware of that, and provide you with different versions compiled against various 'glibc' versions. To find out which 'glibc' version you are running on a Debian System, type:
dpkg -l | grep libc6Similarly, on a rpm-based system, you can type:
rpm -q glibc
Friday, March 10, 2006
Compiling images into a movie
mencoder mf://*.jpg -mf w=800:h=600:fps=10:type=jpg -ovc lavc -lavcopts vcodec=divx:mbd=2:trell -oac copy -o outputDivx.avi
You can easily change the parameters in bold. For example, if you want to encode a video using several PNG files at 640x480 resolution, and xvid compression, with a framerate of 30 fps, the command should look like this:
mencoder mf://*.png -mf w=640:h=480:fps=30:type=png -ovc lavc -lavcopts vcodec=xvid:mbd=2:trell -oac copy -o outputXvid.avi
Links: Mencoder (part of Mplayer project), Ffmpeg