6 min read

What is Folding @ Home?

Folding @ Home is a project started by Stanford University in late 2000. The idea is that it allows for distributed medical research and leverages the computing power of the general public, instead of requiring the university to buy more and more computers. Instead of a single computer taking a million days to calculate a problem, distributing the research load can allow for the same problem to be solved in ten days by a fraction of the machines.

Contributing to Folding @ Home on Ubuntu is very simple, and can be done in just a few short steps. There are packages in the main Ubuntu repositories that support installation, management and removal of the Folding @ Home clients. Before I get into these, I’d like to outline what Folding @ Home actually does.

To understand how the system works we first need to understand a few key underlying principles. Perhaps the most important is to answer the question: What are proteins?

The Folding @ Home website defines proteins as:

Proteins are necklaces of amino acids — long chain molecules. Proteins are the basis of how biology gets things done. As enzymes, they are the driving force behind all of the biochemical reactions which make biology work. As structural elements, they are the main constituent of our bones, muscles, hair, skin and blood vessels. As antibodies, they recognize invading elements and allow the immune system to get rid of the unwanted invaders. For these reasons, scientists have sequenced the human genome — the blueprint for all of the proteins in biology — but how can we understand what these proteins do and how they work?

In a nutshell, proteins are a critical part of everything around us. From our bones, muscles and hair to our immune system and everyday health. In an attempt to improve our understanding of exactly how proteins work, the Folding @ Home project attempts to simulate the work of proteins in our bodies.

This brings us to the next question. Why is it called folding?

However, only knowing this sequence tells us little about what the protein does and how it does it. In order to carry out their function (eg as enzymes or antibodies), they must take on a particular shape, also known as a “fold.” Thus, proteins are truly amazing machines: before they do their work, they assemble themselves! This self-assembly is called “folding.” One of our project goals is to simulate protein folding in order to understand how proteins fold so quickly and reliably, and to learn about what happens when this process goes awry (when proteins misfold).

Basically, contributing to this project can help simulate the folding of a protein and, hopefully, determine where and when proteins misfold. If this process of misfolding can be defined, perhaps it can be avoided. It is thought that diseases such as Alzheimer’s, cystic fibrosis, Mad Cow and even many cancers are caused by misfolding proteins. Contributing to this project can help researches make progress towards remedying these diseases.

I started contributing to the Folding @ Home project many years ago. Knowing that Alzheimer’s disease is common in my family, it seemed like a very beneficial and relateble project to be working on. The best thing about it is that I can spend a few minutes setting up a client, and then I never have to think about it afterwards. The process of contributing is a “no-worry” process, one that allows me to contribute but doesn’t get in my way.

Origami : Folding @ Home Made Easy

A few years after I started contributing I wrote a script that would improve and automate the process of installing the Folding @ Home client on my machines. This little script has since turned into a full blown program that has now been included into the Ubuntu (and other) repositories. This program is called origami.

Installation

The goal of Origami is to make installation, automation and management of Folding @ home clients as simple as possible. After installing the origami package it takes just one command to configure and install the research client. For those interested in contributing, here are a few basic steps.

To install the package from the Ubuntu repositories, simple use:

sudo aptitude install origami

For those on other distributions, Origami is also available in tar format from: http://zelut.org/projects/origami/ as well as on Launchpad. The latest bazaar trunk can be checked out using: bzr branch lp:origami.

If you’ve installed the package you’re ready to go. If you downloaded the tar or checked out a branch from revision control you’ll need to simply copy the executable into your path.

sudo cp origami-*/origami /usr/bin/

Installation is then as simple as using the following command:

sudo origami install

Origami also supports a wide range of configuration options. The Folding @ Home system is setup to allow for user and team based contributions, so you can track your progress. You can also form or join teams and compete against other groups. If you’d like to contribute using a specific username or for a team, use the following installation syntax:

sudo origami install -u USERNAME -t TEAMNUMBER

For example, my username is ‘Zelut’ and I fold for TeamUbuntu, so I use:

sudo origami install -u Zelut -t 45104

Origami also allows you to specify pre-defined hours that you’d like the client to run. Perhaps you only want it to run after business hours, you can add the cron option to the installer which will stop the client at 8:00 am and restart it again at 5:00 pm.

sudo origami install -u USERNAME -t TEAMNUMBER -c 1

You can also define the type of processor you have. The default is to use the 32bit Folding @ Home client, but if you’d prefer to leverage your 64bit processor you can use the proc option to activate that:

sudo origami install -u USERNAME -t TEAMNUMBER -p amd64

It is also possible to define proxy information as required. You would use the following:

sudo origami install -u USERNAME -t TEAMNUMBER -P port -H hostname

Replace ‘port’ with the port number and ‘hostname’ with your proxy server hostname or IP address.

You can also define the size or work unit you would like to be assigned:

sudo origami install -u USERNAME -t TEAMNUMBER -b (small|normal|big)

Select either small, normal or big and you will only receive that size work units. Small units are finished faster but receive fewer points toward yourself or your team. These units are generally suited for slower processors. Normal is the default, and is a sane value for most installations. Big units take much longer to finish but have big point rewards when completed. If you have a fast, new processor you might consider doing big work units.

Lastly, you can define a unique PASSKEY to your Folding @ Home work which will allow you to verify that all of the work contributed under your username is unique to your clients. This is purely optional for local installations, but required for network-based deployments which we’ll discuss soon.

To generate a PASSKEY for your username visit:

http://fah-web.stanford.edu/cgi-bin/getpasskey.py

Just to be clear, it is perfectly reasonable to combine a number of these options into one line. Let’s say I wanted to install to my local machine, using my username ‘Zelut’ and TeamUbuntu ‘45104’, but I also needed tho 64bit processor, big units and cron job. The command would be:

sudo origami install -u Zelut -t 45104 -c 1 -p amd64 -b big

The beautiful thing about Origami is that it is set-and-forget. Unless I remove the Folding @ Home client from my machine I never need to consider all of the installation options again. I simply know that the client is running in the background, and will automatically run on each boot.


Subscribe to the weekly Packt Hub newsletter. We'll send you the results of our AI Now Survey, featuring data and insights from across the tech landscape.

* indicates required