Rosetta 3.2 with Ubuntu 11.04

Rosetta is a very useful program for the prediction of protein structure, folding and interactions be that docking with proteins or ligands.

However, the current version of Rosetta (3.2.1) uses SCons to compile itself on your system. This is usually fine except that these use gcc libraries 4.1 and before.

Ubunutu 11.04 considers anything before gcc v4.4 to be obsolete and you can’t install them (even with apt-get).

As a result, a small amount of hacking is required.

First get SCons. Open a new terminal window.

1
sudo apt-get install scons

Check that the file tree has been updated

1
sudo apt-get update

Now you can unzip your Rosetta download to wherever you like. I personally put new software into /opt

Change your terminal window to the correct path. So in my case

1
cd /opt/rosetta

Now in a perfect world, and according to the installation instructions you should be able to type:

1
scons bin mode=release

And Rosetta will install and compile itself. However, amongst a load of other errors you’ll see the root of the problem

1
KeyError: "Unknown version number 4.5 for compiler 'gcc'"

Now, the first thing I tried was to specify a fixed gcc version for SCons to run

1
scons bin mode=release cxx=gcc cxx_ver=4.4

But this doesn’t work as gcc v4.4 is still too new. And any version before 4.4 isnt supported by Ubuntu.

The solution

This isn’t a short or elegant solution, but it is a solution that got Rosetta to install for me. If you have any troubles yourself I recommend you head on over to the Rosetta forums.

Install zlib

Install zlib (developer version) to ensure all your necessary libraries are installed

1
2
sudo apt-get install zlib1g-dev
sudo apt-get update

basic.settings

In /rosetta_path/tools/build there is the file basic.settings

At line 203, I needed to add

1
2
3
4
5
6
7
8
9
"gcc, 4.5" : {
    "appends" : {
        "version"       : [ "4", "5" ],
        "flags" : {
            "compile"   : [ "-param inline-unit-growth=1000",
            "-param large-function-growth=50000" ],
            },
        },
    },

I didn’t change line 329 but you can for completeness if you so wish.

options.settings

In /rosetta_path/tools/build there is the file options.settings

Line 11 and 12 now read

1
2
    "cxx" : {
        "gcc"     : [ "3.3", "3.4", "4.0", "4.1", "4.2", "4.3","4.4","4.5", "*" ],

So as to include v4.4 and 4.5

util.cc

Finally and most importantly, in /rosetta_path/src/core/conformation/symmetry open util.cc. At line 357 there is an if statement. What we need to do is change the “else” argument so that the reference is correct (I’ve commented out the old line)

1
2
3
4
5
6
#ifdef WIN32
pose::PDBInfoOP pdb_info_src (new pose::PDBInfo( pose.pdb_info() ));
#else
/// pose::PDBInfoOP pdb_info_src = new pose::PDBInfo::PDBInfo( pose.pdb_info() );
pose::PDBInfoOP pdb_info_src = new pose::PDBInfo( pose.pdb_info() );
#endif

Apparently this is required as the new versions of gcc are fussier about their name references than older versions.

After which we can now go back to the terminal and type:

1
scons bin mode=release cxx=gcc cxx_ver=4.5

After some amount of processing time (~30mins on my dual core 2.8 GHz), you should be greeted with the final lines

1
2
Install file: "build/src/release/linux/2.6/64/x86/gcc/4.5/super_aln.linuxgccrelease" as "bin/super_aln.linuxgccrelease"
scons: done building targets.

Credit goes to those on the Rosetta forums for help.

Newer post

cwplot

What distinguishes you from other developers?

I've built data pipelines across 3 continents at petabyte scales, for over 15 years. But the data doesn't matter if we don't solve the human problems first - an AI solution that nobody uses is worthless.

Are the robots going to kill us all?

Not any time soon. At least not in the way that you've got imagined thanks to the Terminator movies. Sure somebody with a DARPA grant is always going to strap a knife/gun/flamethrower on the side of a robot - but just like in Dr.Who - right now, that robot will struggle to even get out of the room, let alone up some stairs.

But AI is going to steal my job, right?

A year ago, the whole world was convinced that AI was going to steal their job. Now, the reality is that most people are thinking 'I wish this POC at work would go a bit faster to scan these PDFs'.

When am I going to get my self-driving car?

Humans are complicated. If we invented driving today - there's NO WAY IN HELL we'd let humans do it. They get distracted. They text their friends. They drink. They make mistakes. But the reality is, all of our streets, cities (and even legal systems) have been built around these limitations. It would be surprisingly easy to build self-driving cars if there were no humans on the road. But today no one wants to take liability. If a self-driving company kills someone, who's responsible? The manufacturer? The insurance company? The software developer?