19 Dec 2010

Dock6 installation on Ubuntu Linux

What is DOCK?

DOCK addresses the problem of "docking" molecules to each other. In general, "docking" is the identification of the low-energy binding modes of a small molecule, or ligand, within the active site of a macromolecule, or receptor, whose structure is known. A compound that interacts strongly with, or binds, a receptor associated with a disease may inhibit its function and thus act as a drug. Solving the docking problem computationally requires an accurate representation of the molecular energetics as well as an efficient algorithm to search the potential binding modes.

Installation procedure

Download DOCK 6 from the official UCSF DOCK web-site and build source like this.
#########################################################
#########################################################
# Compilation procedure for Dock 6.4 on Ubuntu Linux 
#
# Date: 2010.12.19
# 
# Additional docs (where search for solutions):
# http://dock.compbio.ucsf.edu/DOCK_6/faq.htm
# http://mailman.docking.org/pipermail/dock-fans/2009-September/002247.html
#########################################################
#########################################################

#########################################################
################ install new packages ###################
sudo apt-get install flex
sudo apt-get install gfortran
sudo apt-get install byacc
#########################################################

#########################################################
################## CONFIGURE SYSTEM #####################
######
###### set gfortran as g77 (no g77 on Ubuntu)
######
cd /usr/bin/
sudo ln -s gfortran g77

######
###### Set default YACC parser to byacc
######
sudo update-alternatives --config yacc
#########################################################

#########################################################
######################## BUILD ##########################
######
###### Unpack:
######
tar -xvzf dock.6.4_source.tar.gz

######
###### Compile:
######
cd dock6/install/
./configure gnu
make clean
make 

#########################################################
######################### DONE ##########################
#########################################################
############ software is in: bin direcotry ##############
#########################################################

What to do next?

Checkout tutorials.

22 Nov 2010

Few IT comic strips

Long time no post, but here are some random images found on web describing of software creation process - mostly from a software developer perspective :).



1 Mar 2010

Tip: Changing file names recursively from command line

Recently I've found very nice tool to change file names recursively, and fixing file names encoding. The tool is called convmv. It might be very helpful if you're migrating from older systems (or you had bad samba config).

Exact description of convmv from project site.

convmv converts filenames (not file content), directories, and even whole filesystems to a different encoding. This comes in very handy if, for example, one switches from an 8-bit locale to an UTF-8 locale or changes charsets on Samba servers. It has some smart features: it automagically recognises if a file is already UTF-8 encoded (thus partly converted filesystems can be fully moved to UTF-8) and it also takes care of symlinks. Additionally, it is able to convert from normalization form C (UTF-8 NFC) to NFD and vice-versa. This is important for interoperability with Mac OS X, for example, which uses NFD, while Linux and most other Unixes use NFC. Though it's primary written to convert from/to UTF-8 it can also be used with almost any other charset encoding. Convmv can also be used for case conversion from upper to lower case and vice versa with virtually any charset. Note that this is a command line tool which requires at least Perl version 5.8.0. This tool is not available in all distributions by default.

How to lower all file names in direcotry

convmv --lower -r /path/to/your/files/
depending on the files you might have to add your charset here, too:
convmv --lower --nosmart -r -f utf8 /path/to/your/files/

How to fix file names encoding

convmv --lower --nosmart -r -f iso8859-2 -t utf8 /path/to/your/files/
Other options which may be useful:

28 Feb 2010

Watch out for fake flash drives

Note: All software described/linked in this article is for Microsoft Windows Operating System.

Recently my friend bought 128GB "Kingston" USB Flash Stick from some guy at eBay. He discovered that flash was fake. Remember, before buying USB stick read article "detecting your flash disk real capacity" and always try to test device before buying it.



Here some stats from our test, it was performed using h2testw procedure is described with details here:
  • Full write test time: 42h 15min 32 sec
  • Full read time: 8h 15min 3sec
  • Real capacity of 128GBs: 43MB :(.
The media is likely to be defective.

43 MByte OK (88064 sectors)

124.9 GByte DATA LOST (262023168 sectors)

Details:124.9 GByte overwritten (262023168 sectors)

0 KByte slightly changed (< 8 bit/sector, 0 sectors)

0 KByte corrupted (0 sectors)

64 KByte aliased memory (128 sectors)

First error at offset: 0x0000000002a90000

Expected: 0x0000000002a90000

Found: 0x0000001f3ef90000

H2testw version 1.3

Writing speed: 861 KByte/s

Reading speed: 4.31 MByte/s

H2testw v1.4
The USB stick has only 43MB capacity, but there were fakes, which capacity is almost 4GB and they can be fixed just by flashing controller. My friend decided not to fix his device, but if you're interested in fixing flash drives you should definitely checkout links below: Remeber, after fixing such device you can't rely on it - data stored can be lost anytime - so don't use it for backups, and remember to format it with right tool.

ps: Original flash disk should have engraved some numbers on end of USB plug.