After a long time of not programming and just configuring software – and working as a manager in a heavily growing company – I started a new python software project for the folding@home project.
I was inspired first by the folding@home project itself. This project supports heavily finding new vaccines and other drugs while calculating protein folding activities. These computations are also related to the COVID-19 desease.
So please join and contribute the idle time of your computer(s)@home to the project!
Second I wanted to learn python for a long time already.
So I thought why not combining these two ideas, specifically during the not so busy corona time (that’s not completely true, as I’m in the luxury position to be still 100% busy at work ;-))
Methods learned
The methods I learned so far are quite a lot:
Python programming itself, including object oriented programming (I’m sure there are still plenty of things I don’t know)
Kivy, a library for a GUI, based on python, where you are able to produce applications for different mobile operating systems
Working with threads in python for regulary polling the clients
Virtual environments for python
Working with GIT for the first time as a version management system, and using github as a cloud version
Implementing a telnet client to connect to multiple processing folding@home clients (the API is sometimes a bit weird)
The idea is to compile an app that can be used on any mobile device to control folding@home clients in your local network – or also from outside your network as long as you have access to the folding@home clients via an IP V4 address.
For the time being you always have to have a folding@home client running at your local machine to control other clients. With my app you can control the clients also just with any mobile device.
I have some long ago experience with C++ and Java, but honestly working with python is much easier and makes much more fun!
Contribute
If you want to contribute to the project, just let me know. I will publish the source code soon on github.
The first prototyp with some GUI and some telnet commands is already running 🙂
There is a project simulating protein folding called folding at home.
Simulating the folding process of proteins requires a huge calculation power, that is normally offered only by super computers.Protein folding is used to fight deseases like HIV, Alzheimer, cancer and also the quite new COVID-19
The folding at home project is using the idle time of your personal computer making calculations for the possible foldings of a protein.
There are clients available for Windows und Linux. The installation is quite simple.
This approach here uses the idle time of your (small) desktop or laptop computer at home and contributing to different projects while calculating so called „work units“. The client requests a work unit from a server and then makes the dedicated calculations in a maximum defined time, typically a few days. At the end the result of this work unit is sent back to the server.
You can „earn“ some points and also define a team, if you like.
I had some problem getting a work unit from the server on my Linux system. The following script helped as it pulls the server every 30 seconds for a new work unit. I found a quite good solution in the foldingathome forum.
#!/bin/bash
cd /var/lib/fahclient
while true
do
egrep -i "Download|No WUs available" log.txt|tail -1|egrep "No WUs available"
results=$?
#echo "$(date) results = $results"
if [ $results = 0 ]
then
INDEX=$(egrep -i "Download|No WUs available" log.txt|tail -1|egrep "No WUs available"|cut -d F -f2 |cut -b 3)
echo "PAUSED ******* $(date) INDEX = $INDEX"
echo -e "pause $INDEX\nquit" | nc localhost 36330 &> /dev/null
sleep 10
echo -e "unpause $INDEX\nquit" | nc localhost 36330 &> /dev/null
fi
sleep 30
done
If you have multiple clients running you have to allow the access to each client for the remote access. How to do the configuration is explained here. For stopping and starting the server under Linux use these commands: