When proteins are created, they undergo a complex process known as folding, so-called because the protein molecule transforms from a long chain of amino acids to a complex shape (it "folds up"). The final shape of the protein is absolutely critical to determining its properties and function. Scientists have created software to simulate the folding process to better understand how proteins work, which in turn makes it possible to develope new drugs, cure diseases, etc.
Folding@Home is a project from Stanford University that uses millions of networked PCs to form a supercomputer for protein folding simulations. The client software is loaded on a PC, it contacts the central servers, and receives "work units". The client then runs on spare CPU time, and uploads finished work units to the server.
Folding@Home是由斯坦福大学利用微机联网,形成超级电脑（分布式计算）来模拟蛋白质折叠. 其客户软件安装在PC机,它与中心服务器连接,收到“计算单元”. 客户端使用空闲CPU资源运算，然后把完成的“计算单元”上传到服务器。
Folding@Home is a great way to make your computer do useful work even when you're not using it. Since it runs at a very low priority, you should never realize it's running when you're using the computer to do your work. Note that "using the computer" refers to doing heavy computations. Generally, tasks like web browsing and word processing involve very little CPU usage, so the Folding@Home client will be running at near 100% even when doing those kinds of tasks. It helps to leave you computer on at all times, but is not necessary, as the project will benefit from virtually any time that the client runs on your computer.
The following script will download the latest client from the Folding@Home website, and install it to
opt/foldingathome, either in
$HOME. It will ask you to set up the client (the defaults are usually sufficient), and copy that configuration for every CPU in your machine.
It is not possible to provide a .deb package for Folding@Home, because the client must be downloaded from Stanford's website. This is to ensure the integrity of the research. (Maybe it is possible to have a .deb; after all, this is how Macromedia Flash works. The point is that the executable has to be downloaded from Stanford.)
我们无法提供Folding@Home的.deb包 ，因为用户必须到Stanford's（斯坦福）的网页下载.这是为了确保研究的完整性（也许可能得到一个.deb包；毕竟，Macromedia Flash就是这样加载的。关键在于可执行文件是在斯坦福下载的。）
To install, download the tarball and do
tar zxvf fah_install-version.tar.gz
This should extract the archive to a directory called 提取到
fah_install/. Then 然后
cd fah_install less README
to read the documentation. Finally, 阅读文档。最后，
sudo ./folding_install.sh install
to install the client. 安装客户端。
You can also install to your
$HOME, in case you do not have root access to the computer. Clearly, you would not have to prefix the command with sudo in this case. If you install to your
$HOME, a cron job will be created to start the client automatically. If you install to the system, the client will automatically start when your computer boots up.
You can reconfigure the client using the supplied
reconfigure script, which is placed in
opt/foldingathome. You can also give the client command line options. See the README for more details.
Because the client runs at low priority, the client should not cause the CPU governor to kick up the frequency. In other words, even though the client runs at 100% CPU usage, it should not cause the CPU frequency to go up, which keeps the fan slow and quiet. If this is not the case, then the frequency governor should be reconfigured.
One can configure ACPI (the power regulation subsystem) to stop the client when the system goes on battery power, and to start it again when the power cord is plugged back in.
Breezy and older
/etc/acpi/power.sh. Inside the
if [ $? = 0 ] && [ x$1 != xstop ]; then block, add
# stop folding at home if [[ -x /etc/init.d/foldingathome ]] ; then /etc/init.d/foldingathome stop fi
and inside the
else block, add
if [[ -x /etc/init.d/foldingathome ]] ; then /etc/init.d/foldingathome start fi
Simply create two scripts in the relevant directories. 在相关目录简单的创建两个脚本。
sudo -i echo "/etc/init.d/foldingathome stop" > /etc/acpi/battery.d/fah echo "/etc/init.d/foldingathome start" > /etc/acpi/ac.d/fah exit
This assumes that the client has been installed for the entire system, which it should be if you are able to edit files in
/etc in the first place!
Folding@Home is secure. The Stanford team has gone to great lengths to ensure security, both for the integrity of their research and the safety of donors' computers. However, the more secure the better. The Gentoo ebuild for Folding@Home creates a new user foldingathome whose sole purpose is to run the client. Now this installer offers same. It creates a user whose account is disabled, and runs the client as this user when the init script is run as root, so the client is never run as root.
For those with Hyper Threading CPUs, you probably know that an SMP kernel sees two processors. Then clearly, if you run two clients, you will get more work done than if you only run one (probably about 10-30% more). However, results that are done quickly are more useful than more results done slowly. The reason is that each work unit is a step in a giant simulation, with future steps depending on past ones. So the faster you get your work done, the faster the simulation can move along. Long story short, run one client for each physical CPU, not for each logical CPU. The installer should automatically count the number of CPUs in your system. See this post in the Folding@Home forums.
A competitive Folding@Home team called Team Ubuntu (FoldingAtHomeTeamUbuntu, forum thread) has formed to represent the Ubuntu community and organize to have fun while doing some good. The team number is 45104. To join the team, simply enter 45104 when the setup dialog requests a team number. Those wishing to get optimal performance from their folding box should review the Hackaday blog entry on competitive folding linked below.
一个在Folding@Home竞争激烈的团队叫Team Ubuntu(FoldingAtHomeTeamUbuntu, forum thread)已形成以代表性的社区组织，当你做好事时会非常愉快。这个团队编号是45104。想加入这个团队，只需安装时在相应对话框中键入团队编号。想表现你自己请点击以下连接，记得看看Hackaday的博客。
- FoldingAtHomeTeamUbuntu - wiki page for the Ubuntu F@H Team
- Folding@Home Distributed Computing
- Team Ubuntu
- HOW-TO: Folding@Home competitively
- Folding@Home Stats for Team Ubuntu
- Another Stats site
- Ubuntu Forms HowTo, Based off of this page
- Team Ubuntu Recruiting forum thread