Skip to main content

Help with COVID-19 research using Folding@home on Linux

Are you hoping to contribute something positive during the global pandemic? Find out how you can help with Folding@home.

Right now, every human on the planet is affected in some way by the COVID-19 pandemic. Many people are looking for ways they can help. People are making masks and starting projects to invent or provide critical equipment. One thing you can do is donate what you have. If you're like me, you have computing hardware sitting idle much of the time—that's a resource that can contribute to finding a solution to the COVID-19 pandemic, as well as things like Alzheimer's disease and cancer.

The problem

Viruses are made up of groups of amino acids called proteins. By examining the structures of the proteins we can get an idea of what they do and how. Most significantly, we can see the places where we can adhere our own molecules to control or defeat the "bad" proteins. Once we are able to isolate and identify the protein, we can start to experiment with therapies such as vaccines and cures. One challenge is that while it's easy to get a snapshot of the structure, it's just one view, and it does not capture the protein in action. It's harder to know what it's actually up to, which would be really helpful in expanding the range of ways we can affect the disease protein. It's also time-consuming and expensive to try each new thing to see if it works.

Scientists have been using computers for some time now to simulate these proteins and their actions. In some cases, they have access to huge computers that are capable of running these computations and producing representations of virus structure and behavior. These computers are rare, expensive, and are usually shared with other projects. By breaking the simulation up into smaller parts, or tasks, it's possible to do the computation and modeling on many computers simultaneously and then collate the data into a result more quickly and cheaply.

Folding at Home

Folding@home started in 2000 with volunteers donating CPU and GPU time on computers that would otherwise be idle to work on things like creating antibiotics and curing cancer, and since then has made many important contributions. Currently, Folding@home makes more than 100 petaflops of processing power available to researchers. One current high-priority project is the research being done to find ways to combat the COVID-19 pandemic.

The Folding@home software can be installed on almost any computer. There are client downloads for Windows, macOS, and Linux. There is a VMware appliance. There are also projects to get the client running on Android and a Chrome plugin. There's even a Docker image.

In this article, we’ll look at the Linux install and configuration, and we’ll look at a headless install for CentOS 7 that you can use to build multiple VMs. 

How it works

The Folding@home software consists of three downloadable parts:

  • The client, which is what actually runs the simulation and communicates with the Folding@home architecture.
  • A control client, which is used to manage the processing client, configure which project you want to contribute to, and secure access. The control client can be used to manage more than one processing client.
  • A visualizer, which you can use to visualize certain aspects of the project.

The resource requirements to get started are minimal. Any reasonably recent hardware and OS combo should be fine.

For Linux, Folding@home provides .deb (for Debian/Ubuntu/Mint) and .rpm (for RHEL/CentOS/Fedora) packages here.

From the Downloads directory, install the packages as root, using YUM to resolve dependencies.

[root@jupiter Downloads]# yum install ./fahclient-7.5.1-1.x86_64.rpm

Repeat this for the fahcontrol and fahviewer, and you should be all set. The fahclient starts automatically as a service, but you can use the fahcontrol GUI application to manage the client and configure some settings.

Let's begin by selecting the Configure button.

  • On the Identity tab, you can enter a user name and a team ID (our team ID for Enable Sysadmin is 253484). You can also sign up for and enter a passkey, which will prevent anyone from posing as you.
  • On the Remote Access tab, you can specify a password and the IP address of the machine you want to manage this node from if you are managing it remotely.
  • On the Advanced tab, you may want to choose a cause preference. Here you can choose from some of the ongoing projects, or Any. Right now, Folding@home is asking people who want to contribute to COVID-19 research to choose Any.

Also note that from the main fahcontrol app, you can pause the client and you can see the progress of the current assignment.

Headless installation

On a minimal install of CentOS 7.x, do a manual, terminal install of the Folding@home clients.

First, download the clients.

wget https://download.foldingathome.org/releases/public/release/fahclient/centos-5.3-64bit/v7.4/fahclient-7.4.4-1.x86_64.rpm
wget https://download.foldingathome.org/releases/public/release/fahcontrol/centos-5.3-64bit/v7.4/fahcontrol-7.4.4-1.noarch.rpm

Note that we won't be downloading or installing the fahviewer client, which requires a GUI.

Next, install the fahclient. For this, we are doing a drone or headless install, which we'll be configuring in an XML file.

[root@fah1 ~]# yum install ./fahclient-7.4.4-1.x86_64.rpm

For the fahcontrol client, the install might complain about needing Python 2.6 but should run fine with 2.7. On a clean install, it won't matter, but since I already have 2.7 and 3 installed, I need to use the --skip-broken option to ignore the error and install it anyway.

[root@fah1 ~]# yum install --skip-broken ./fahcontrol-7.4.4-1.noarch.rpm

The main configuration files live in /etc/fahclient, but the client runs from /var/lib/fahclient. In the configs directory, there will be a copy of the default configuration, which also includes the instructions for the various options. Copy this to /etc/fahclient.

[root@fah1 configs]# cp ./config-20200326-190702.xml /etc/fahclient/config.xml
cp: overwrite '/etc/fahclient/config.xml'? y
[root@fah1 configs]# cd /etc/fahclient/
[root@fah1 fahclient]# ls
config.xml

Open in your favorite text editor to add your user info.

<!-- User Information -->
  <user value="skipworthy"/> <!-- Enter your user name here -->
  <team value="253484"/>         <!-- Your team number -->
  <passkey value="[your passkey here"/>       <!-- 32 hexadecimal characters if provided -->

Select your power values. The defaults here are fine. I’ve increased it to full since this is actually a dedicated client.

<power value="full"/>
  <gpu value="false"/>      <!-- If true, attempt to autoconfigure GPUs -->
  <fold-anon value="false"/>

Next, configure remote access.

<!-- Granting Remote FAHControl Access
    To grant remote access to FAHControl and the remote command server add
    the following:

      <allow>127.0.0.1 192.168.0.142</allow>
      <password>PASS</password>

    Where x.x.x.x is the IP address of the computer which should be granted
    remote access and PASS is you choose to further secure the connection.
  -->

Then save your changes and restart the fahclient using the scripts.

[root@fah1 fahclient]# /etc/init.d/FAHClient stop
Stopping fahclient ... OK
[root@fah1 fahclient]# /etc/init.d/FAHClient start
Starting fahclient ... OK
[root@fah1 fahclient]#

Finally, tail the logs to see that the configuration changed and the client is now running.

[root@fah1 fahclient]# tail  log.txt
19:30:12:
19:30:12:  
19:30:12:  
19:30:12:  
19:30:12:  
19:30:12:
19:30:12:  
19:30:12:  
19:30:12:
19:30:34:WU00:FS00:0xa7:Completed 2500 out of 125000 steps (2%)

And you're off! You should be able to add the new client to your existing control client and track your statistics on the Folding@home website.

Wrapping up

There is lots of really interesting information and more details at the Folding@home project web site. I encourage you to have a look at this very clever and worthwhile project.

Topics:   Sysadmin culture  
Author’s photo

Glen Newell

Glen Newell has been solving problems with technology for 20 years. As a Systems Engineer and administrator, he’s built and managed servers for Web Services, Healthcare, Finance, Education, and a wide variety of enterprise applications. More about me

Try Red Hat Enterprise Linux

Download it at no charge from the Red Hat Developer program.