Skip to content

This document is a WORK IN PROGRESS.
This is just a quick personal cheat sheet: treat its contents with caution!


Folding@home

Folding@home (FAH or F@H) is a distributed computing project for performing molecular dynamics simulations of protein dynamics. Its initial focus was on protein folding but has shifted to more biomedical problems, such as Alzheimer's disease, cancer, COVID-19, and Ebola. The project uses the idle processing resources of personal computers owned by volunteers who have installed the software on their systems.

Reference(s)

Warning

This cheat sheet might be still Gentoo + Portage + OpenRC oriented, since I just tested it with this setup...


Table of contents


Install

TODO

TODO

TODO

# vi /etc/portage/package.license
    > # (manual) foldingathome
    > sci-biology/foldingathome FAH-EULA-2014 FAH-special-permission
    >
    > ...

# vi /etc/portage/package.accept_keywords
    > # (manual) last foldingathome
    > sci-biology/foldingathome ~amd64
    >
    > ...

# emerge -a sci-biology/foldingathome

# nix-env -iA nixos.fahclient
TODO: see also nixos.fahviewer and nixos.fahcontrol

# nix-env -iA nixpkgs.fahclient
TODO: see also nixpkgs.fahviewer and nixpkgs.fahcontrol

Install with AUR:

$ mkdir -p ~/apps/aur-apps
$ cd ~/apps/aur-apps
$ git clone https://aur.archlinux.org/packages/foldingathome/
$ cd foldingathome
$ makepkg -is # --syncdeps to auto-install deps, --install to install after building

TODO

TODO

TODO


Config

Optionally, get a passkey:

Configure Folding at home:

$ sudo /opt/foldingathome/FAHClient --configure
# /opt/foldingathome/config.xml # e.g. it might result in:
    > <config>
    >   <!-- User Information -->
    >   <passkey v='optional_passphrase'/>
    >   <team v='0'/>
    >   <user v='Anonymous'/>
    >
    >   <!-- Folding Slots -->
    >   <slot id='0' type='CPU'/>
    > </config>

TODO

Add the foldingathome user to the video group!


Use

  • Monitor your foldingathome client:

    $ firefox https://client.foldingathome.org/
    

  • Get all commands details

    $ sudo -u foldingathome /opt/foldingathome/FAHClient --help
    

  • Get send command details

    $ sudo -u foldingathome /opt/foldingathome/FAHClient --chdir "/opt/foldingathome/" --send-command help
    

  • Run

    $ sudo -u foldingathome /opt/foldingathome/FAHClient --chdir "/opt/foldingathome/"
    

  • Gracefully stop, after completing current steps, on an already running client:

    $ sudo -u foldingathome /opt/foldingathome/FAHClient --chdir "/opt/foldingathome/" --send-finish
    

  • Immediately stop an already running client:

    $ sudo -u foldingathome /opt/foldingathome/FAHClient --chdir "/opt/foldingathome/" --send-command "shutdown"
    

  • Run folding at home only at night (from 0 to 6):

    $ sudo contab -e
        > ...
        > 0 0 * * * sudo -u foldingathome /opt/foldingathome/FAHClient --chdir "/opt/foldingathome/"
        > 0 6 * * * sudo -u foldingathome /opt/foldingathome/FAHClient --chdir "/opt/foldingathome/" --send-finish
    

  • Start
    # rc-service foldingathome start
    
  • Stop
    # rc-service foldingathome stop
    
  • Run Folding at home in the background at boot:
    # rc-update add foldingathome default
    
  • Depending on your runit implementation, either run:
    # ln -s /etc/runit/sv/foldingathome /service
    
    or run:
    # ln -s /etc/runit/sv/foldingathome /var/service
    
    or run:
    # ln -s /etc/runit/sv/foldingathome /run/runit/service
    
  • Start
    # sv up foldingathome
    
  • Stop TODO
  • Start
    # service foldingathome start
    
  • Stop
    # service foldingathome stop
    
  • Run Folding at home in the background at boot:
    # chkconfig foldingathome on
    
  • Start
    # systemctl start foldingathome
    
  • Stop
    # systemctl stop foldingathome
    
  • Run Folding at home in the background at boot:
    # systemctl enable foldingathome
    

Troubleshooting


If this cheat sheet has been useful to you, then please consider leaving a star here.