Tuesday, August 28, 2012

Displaying disagreements in protein structures

I recently made a post on how to color a protein structure by disagreements between experimental chemical shifts and chemical shifts predicted from the structure.

Here is another way to display these kinds of errors, which I also find quite nice. Atoms radii are scaled proportionally the error in predicted chemical shifts.

Picture from http://dx.doi.org/10.1021/ct200913r (paywall)

In the above example, chemical shifts are determined from quantum chemical calculations on a 23 residue protein structure, and then compared to the corresponding experimental chemical shifts.
It's clear, that calculated chemical shifts from several side chains atom do not reproduce the experimental values as well as the backbone atoms chemical shifts. Definitely useful to identify possible errors in the protein structure

Frank et al. J. Chem. Theory Comput., 2012, 8 (4), pp 1480–1492

Friday, August 24, 2012

Getting started with Phaistos // installation

I got an e-mail from a student named Alex at Boston University, asking if I could help him getting started with Phaistos. First barrier for new users (in this case a student), is to download and install Phaistos on a Linux machine.

First, you have to download the latest and greatest revision of Phaistos from sourceforge. This is done via the following command:
svn checkout https://phaistos.svn.sourceforge.net/svnroot/phaistos/trunk phaistos
This creates a directory named "phaistos" and downloads the source code to taht directory. Now enter the "phaistos" directory, create a directory named "build" and then cd into that dir:
cd phaistos
mkdir build
cd build
cmake ..
cmake prepares the compilation step and finds out where your libraries etc. are located. Note that Phaistos requires Boost installed, version 1.41 or newer.

If you have Boost installed in a non-standard location and cmake doesn't find the Boost libraries, things are slightly more complicated. On my laptop (running CentOS 6.3), I cannot get cmake to consistently find my Boost via the "-DBOOST_ROOT" option as mentioned in the Phaistos manual. Usually using these cmake command flags should work. Note that in the example, I have boost installed in "/opt/boost_1_41_0".

cmake -DBoost_DIR=/opt/boost_1_41_0 -DBoost_INCLUDE_DIR=/opt/boost_1_41_0/include

In this case, I explicitly tell cmake where all Boost libraries are located via these two lines (the second line is "a bit" long, make sure you get everything when you copy/paste!):
export BOOST_ROOT_DIR=/opt/boost_1_41_0 #(i.e. where Boost is installed)
cmake -DBoost_INCLUDE_DIR=$BOOST_ROOT_DIR/include -DBoost_LIBRARY_DIRS=$BOOST_ROOT_DIR/lib -DBoost_PROGRAM_OPTIONS_LIBRARY=$BOOST_ROOT_DIR/lib/libboost_program_options.a -DBoost_SERIALIZATION_LIBRARY=$BOOST_ROOT_DIR/lib/libboost_serialization.a -DBoost_THREAD_LIBRARY=$BOOST_ROOT_DIR/lib/libboost_thread.a -DBoost_INCLUDE_DIR_DEBUG=/home/kasper/boost_build/include -DBoost_LIBRARY_DIRS_DEBUG=$BOOST_ROOT_DIR/lib -DBoost_PROGRAM_OPTIONS_LIBRARY_DEBUG=$BOOST_ROOT_DIR/lib/libboost_program_options.a -DBoost_SERIALIZATION_LIBRARY_DEBUG=$BOOST_ROOT_DIR/lib/libboost_serialization.a -DBoost_THREAD_LIBRARY_DEBUG=$BOOST_ROOT_DIR/lib/libboost_thread.a -DBoost_INCLUDE_DIR_RELEASE=/home/kasper/boost_build/include -DBoost_LIBRARY_DIRS_RELEASE=$BOOST_ROOT_DIR/lib -DBoost_PROGRAM_OPTIONS_LIBRARY_RELEASE=$BOOST_ROOT_DIR/lib/libboost_program_options.a -DBoost_SERIALIZATION_LIBRARY_RELEASE=$BOOST_ROOT_DIR/lib/libboost_serialization.a -DBoost_THREAD_LIBRARY_RELEASE=$BOOST_ROOT_DIR/lib/libboost_thread.a -DBoost_THREAD_LIBRARY=$BOOST_ROOT_DIR/lib/libboost_thread.a -DBoost_REGEX_LIBRARY=$BOOST_ROOT_DIR/lib/libboost_regex.a -DBoost_THREAD_LIBRARY_DEBUG=$BOOST_ROOT_DIR/lib/libboost_thread.a -DBoost_REGEX_LIBRARY_DEBUG=$BOOST_ROOT_DIR/lib/libboost_regex.a -DBoost_THREAD_LIBRARY_RELEASE=$BOOST_ROOT_DIR/lib/libboost_thread.a -DBoost_REGEX_LIBRARY_RELEASE=$BOOST_ROOT_DIR/lib/libboost_regex.a -DBoost_UNIT_TEST_FRAMEWORK_LIBRARY=$BOOST_ROOT_DIR/lib/libboost_unit_test_framework.a -DBoost_UNIT_TEST_FRAMEWORK_LIBRARY_DEBUG=$BOOST_ROOT_DIR/lib/libboost_unit_test_framework.a -DBoost_UNIT_TEST_FRAMEWORK_LIBRARY_RELEASE=$BOOST_ROOT_DIR/lib/libboost_unit_test_framework.a -DBoost_FILESYSTEM_LIBRARY=$BOOST_ROOT_DIR/lib/libboost_filesystem.a -DBoost_FILESYSTEM_LIBRARY_DEBUG=$BOOST_ROOT_DIR/lib/libboost_filesystem.a -DBoost_FILESYSTEM_LIBRARY_RELEASE=$BOOST_ROOT_DIR/lib/libboost_filesystem.a -DBoost_SYSTEM_LIBRARY=$BOOST_ROOT_DIR/lib/libboost_system.a -DBoost_SYSTEM_LIBRARY_DEBUG=$BOOST_ROOT_DIR/lib/libboost_system.a -DBoost_SYSTEM_LIBRARY_RELEASE=$BOOST_ROOT_DIR/lib/libboost_system.a ..
Now you are ready to compile:
make -j4  
After a while you'll get a message saying:
Linking CXX executable ../../../bin/phaistos
[100%] Built target phaistos
From the build directory, you can test if Phaistos is working by typing
bin/phaistos --help
(A very long list of options should appear).

To compile the manual, cd into the "phaistos/build" dir ands
make manual_pdf
This compiles the manual and puts it in the "phaistos/build/doc" dir. You can also download the latest manual from sourceforge here.

Do post a comment below, if you have questions or additional comments!