Distributed Folding GUI

by Jeff Gilchrist
Jeff's E-mail Address



The Distributed Folding GUI is a helper application for Windows that works with the Distributed Folding client available at: http://www.distributedfolding.org

It allows you to see your current progress, provides benchmarking information about your machine, gives time estimates for completion and allows you to start and stop the client with several parameters. It can even run the DF client hidden. dfGUI uses almost no CPU resources so it will not slow down your DF production (but you can close it and the DF client will continue to run). dfGUI is currently available in English, Dutch, German, Italian, and Norwegian.

Screen Shots

dfGUI v3.2 Screen Shot

dfGUI v3.2 Energy Graph Tab Screen Shot

More Screen Shots


License/Disclaimer

This software is freeware and can be freely distributed. Use at your own risk. I take no responsibility for anything that happens to your equipment. Source code for this program is also available. If you modify this software I would appreciate you letting me know what feature(s) you have added so that I may include them in the official distribution. If you are going to use any of this source code in your own program, please credit me.


Download

Click to download the latest version:

Windows Binary:
dfGUI v3.2 (675 KB) English English Dutch German Hungarian Italian Norwegian
Source Code: dfGUI Source v3.2 (100 KB)


Previous version:

Windows Binary: dfGUI v3.1 (627 KB)
Source Code: dfGUI Source v3.1 (65 KB)
 
Third Party Modifications
Linux Binary & Source: dfGUI v3.2 Linux
(dfGUI has been ported to Linux by Bryan Kadzban!)


Recent History

v3.0 (Jun. 16, 2003)
  • NOTE: This version will only work with the new Phase II of Distributed Folding and will not work with the Phase 1 client.
  • Changed look of dfGUI adding tabs to simplify the user interface
  • Removed obsolete switches that are no longer in Phase II.
  • "Save Config" now gives you a confirmation window letting you know if the .ini file was saved properly or not.
  • GUI now displays information about generations.
  • GUI has 3 bar graph displays for the current structure laxness level. If a protein gets stuck 3 times it will increase the laxness level for that generation and this value will be shown in the 3 graphs. If the graph reads 0% that means it has not relaxed any of the parameters.
  • Due to the way generations work, the benchmark data will get reset when a new generation begins.
  • Removed structures per second and minute since the new beta works more slowly these values no longer make sense.
  • # generations is configurable in Config window.
  • Added display to keep track of best energy seen since you started the GUI and shows which generation # it was found in.
  • Added display to indicate time it took to complete the previous generation and average generation time.
  • Benchmark output to file info now shows current generation.
  • Best energy so far now shows which generation # it was found in.
  • Added Tab to display history of best energy seen for each generation (this data is saved to dfGUI.gen to survive the GUI being closed).
  • Added Tab to graph the best energy vs generation to see a visual representation of how your DF client is doing. The maximum number of points graphed per page is also configurable.
v3.01 (Jun. 19, 2003)
  • Fixed locale bug where anyone using an International setting in Windows to change the decimal seperator to something other than a period (.) would have dfGUI report that values were not floating point numbers and exit. This should work without any errors now.
  • Graphing code does not like 10M energy values in some cases and can cause dfGUI to crash. 10M values are now coverted to 1000 for the graph display (they are still stored as 10M in dfGUI.gen file).
  • Fixed bug in Config where changing DF Client Directory folder would not immediately take effect.
v3.1 (Jun. 28, 2003)
  • Added Points tab which gives information about points for current and previous generation, buffered work, a point calculator, and more.
  • Added Graph Config tab which allows the user to set various configuration options related to the graphs in dfGUI.
  • Added Time Graph tab which will graph the time it took to complete each generation in minutes.
  • dfGUI will now auto-save your Energy Graph to a genEnergyGraphXXX.bmp file after it has completed a 250 generation set. XXX starts at 000 and increases every time a new graph is saved so previously saved graphs will not be overwritten. The generation stats and graph will also automatically be reset after the .bmp has been saved (unless otherwise configured).
  • dfGUI will now auto-save your Time Graph to a genTimeGraphXXX.bmp file after it has completed a 250 generation set. XXX starts at 000 and increases every time a new graph is saved so previously saved graphs will not be overwritten. The generation time stats and graph will also automatically be reset after the .bmp has been saved (unless otherwise configured).
  • Confirmation dialog boxes were added to "Write Bench", "Save" Energy Graph, and "Save" Time Graph buttons.
  • Added "Run Client Bench" button to Advanced tab. When users click on this button, the DF client (.\foldtrajlite.exe -bench) benchmark will be run and the DOS box paused so the user has time to see the results. This feature requires the use of a new dfbench.bat file included in the dfGUI distribution.
  • The graphing code now ignores energy values above 100. If any 10M values were plotted on the graph, the normal energy values looked like a flat line which did not give much info to the user. It will now just skip the 10M values so the user can see the detailed changes. The time graph will ignore minute values above 1000.
  • Added keyboard shortcuts: F5 = Refresh, F6 = Start Client, F7 = Stop Client, and F8 = Exit GUI
v3.2 (Oct. 18, 2003)
  • Modified client running status message from "Client appears to be running" to be "Foldtrajlite.lock found. Client might be running" since dfGUI doesn't know for sure if the client is in fact running when the .lock file is present. Always check your Task Manager to be sure.
  • The tray icon for dfGUI will try to "refresh" itself every Refresh period in case the Explorer crashes and the dfGUI icon disappears.
  • Added "Reset" buttons to the Energy Graph and Time Graph tabs.
  • Added "Install Service" and "Remove Service" buttons to the Config tab to allow users to easily set up the DF client as a service on their machine. It supports installing up to 8 service clients.
  • Can now handle new 8 service client support
  • Modified service manager to use CONNECT instead of ALL_ACCESS which should not limit start/stopping the DF client as a service to just users with Admin access. (Thanks Frank M.)
  • Added Total Time display to Energy and Time graphs which will display the total time (Days:HH:MM:SS) the completed generations in that set have taken so far (including gen 0). There is also the option to disable this time dispaly in the Graph Config tab.
  • Added dfGUI.stop file support. If you create a file named dfGUI.stop in the dfGUI directory, the next time dfGUI does a Refresh and finds the file, it will close (and delete the .stop file). If you would also like the DF Client itself to stop when this event occurs, go to the Config tab and select the "AutoStop on Close" check box.
  • Modified timing in code after click on "Upload" button to make sure dfGUI waits long enough before launching DF Client again.
  • Modified Time Graph code to hopefully reduce the number of holes in the graph from missing generations. If a generation finishes in less time than your dfGUI refresh rate, then dfGUI will miss the generation data and you will have holes in your graph.
  • Added support to dfGUI for multiple languages. The config tab now allows the user to select a language other than English if the supporting language files are available. The languages are not hard-coded into dfGUI so new languages can be added without having to re-compile the software, just provide new language files to the user. The initial languages available are English, Dutch, German, Italian, and Norwegian. You will notice that labels and buttons have been resized and moved around slightly to accomodate the different amount of space other languages take. A very special thanks to Gras, Federico, Nofinger, and HansArne for the hard work they did at doing all the translations for dfGUI. There was a lot of text to translate! Thanks to authenticDViD for adding the Hungarian translation as well.

Contributions
Bryan Kadzban (http://kadzban.is-a-geek.net/dfGUI-linux/)
- Porting dfGUI to Linux
Gras <Gras.G @ gmx .de>
- Translating dfGUI into German German
Federico Miniussi <federico.miniussi @ email .it> (http://www.dprgi.it)
- Translating dfGUI into Italian Italian
Nofinger (http://thegenomecollective.com)
- Translating dfGUI into Dutch Dutch
HansArne (http://www.thegenomecollective.com)
- Translating dfGUI into Norwegian Norwegian
authenticDViD (http://www.ocworkbench.com/)
- Translating dfGUI into Hungarian Hungarian
Dyyryath (www.zerothelement.com)
- Ideas for benchmarking and code for CPU/OS detection
Jonathan Walton (phaserlogic [@] hotmail.com)
- Code cleanup of time display
- Added CreateProcess code to launch DF client hidden without need for any external programs
Joe O.
- Lots of testing to help track down benchmarking & uploading bugs
- Determined method to autoclose DOS box when DF Client finishes in Win9x

Akkermans
- Testing the AutoStop on Battery feature


Usage

Extract the ZIP file to a directory on your machine. This can also be your Distributed Folding client directory (where your foldtrajlite.exe file resides). Start dfGUI. If your DF client is located in another directory you should click on the "DF Client Directory" folder button and select the foldtrajlite.exe program in the correct directory. dfGUI should now be configured to look in the correct spot.

Note: If you are using Win95. To automatically close the DF Client DOS window when you stop the client, you need to configure the foldit.bat file to do so. Open Windows Explorer, right click on the foldit.bat file and select "properties". Choose the "program" tab. Check "Close on Exit" and then click on "OK". The DF Client DOS box will now close automatically when you stop the client. People running NT/2k/XP do not have to worry about this.


The time estimates and benchmark information will not appear until three updates of progress.txt are made by the DF client. This is to ensure that inaccurate initial information is not given. When using the DF client in Service mode, the
progress.txt file is only updated after 5 structures and may take a few minutes before any benchmark information is given. For the benchmark data to be very accurate, you should let dfGUI run (with the DF client active) for at least an hour.


The OS/CPU information shows whatever the client can find in the Windows Registry which differs from installation to installation. Win2k/XP usually has MHz information and Win98 sometimes does. Any unknown information will show up as
???.


You can enter text in the "
Title Bar" edit box which will display your text in the dfGUI title bar and on the system tray when you mouse-over the icon. This is useful if you have a multi-CPU or network machine and are running multiple copies of dfGUI on the same machine to easily distinguish between them. See the Config tab to set this field.


Note: If you are using the DF client in Service mode, you can use dfGUI to start/stop the client, configure the Service options, and monitor its progress. To enable this ability, you need to check the "Client Installed as Service" checkbox in dfGUI. The components and options not available to the Service client will be disabled in the GUI. You can install the DF Client as a service by clicking on the "Install Service" button on the Config tab. If you have a mutiple processor machine, you can add up to 8 service versions of the DF client by changing the "Service #" value for each of your copies of the DF Client and clicking on "Install Service".


The dfGUI program uses tray icons and when minimized it will hide in the tray. Two colours are used to show the status of the distributed folding client. A green icon in the tray dfGUI Green Tray Icon means that the DF client is running. A red icon in the tray dfGUI Red Tray Icon means the DF client is NOT running.


Keyboard Shortcuts
A few keyboard shortcuts are available in dfGUI:
F5 = Refresh dfGUI
F6 = Start DF Client
F7 = Stop DF Client
F8 = Exit dfGUI


Progress Tab
The "
Progress" tab is the main display for dfGUI which gives the user information such as the current generation the DF client is working on, its progress through that generation, the best energy value for the current generation and the best it has seen so far. It also shows the size of the protein that is currently being worked on and the estimated time to completed the generation.


Advanced Tab
The "
Advanced" tab gives the user more advanced information such as various timings, benchmark and system information.


Points Tab
The "
Points" tab gives the user information related to points such as the amount for the current and previous generation, the # of points currently buffered, the # of sets completed, and the points per set. Looking at the # of sets complete as reported by the DF client and the current generation the client is working on, dfGUI estimates the total # of points that specific client has generated (assuming that user did not have to wipe the filelist.txt and start over at any time). A point calculator is also provided to display the # of points the user would receive for the specified generation. The "# Structures per Generation" box is provided in case the number of structures in a generation changes at some point in the future. Right now, the point scoring is determined by this formula: 50 * sqrt(generation_number) = points where the value is rounded down to the nearest integer.


Generation Stats Tab

The "
Generation Stats" tab keeps track of the best energy that was seen for each generation. Use the scroll bar to see the information for all 250 generations. When a set of 250 generations is complete, the GUI will not reset the data for the set and will start updating it again from generation 1. If you would like to clear the information, you will have to click on the "Reset" button located in the top right of the tab.


Energy Graph Tab
The "
Energy Graph" tab gives the user a visual representation of the best energy vs generation. The default settings have the graph plot 50 points per screen. Once more than 50 generations have been calculated, use the "Next" and "Prev" buttons to display the other pages of the graph. If you would like to see all of the points plotted on on a single screen, click on the "Fit Graph on 1 page" check box. It is also possible to save an image of the current graph view to a bitmap graphic file. Simply click on the "Save" button and a file genEnergyGraph???.bmp will be created for you in your dfGUI directory (where ??? can be a value of 000 or higher).

Time Graph Tab
The "
Time Graph" tab gives the user a visual representation of the generation completion time vs generation (in minutes). The default settings have the graph plot 50 points per screen. Once more than 50 generations have been calculated, use the "Next" and "Prev" buttons to display the other pages of the graph. If you would like to see all of the points plotted on on a single screen, click on the "Fit Graph on 1 page" check box. It is also possible to save an image of the current graph view to a bitmap graphic file. Simply click on the "Save" button and a file genTimeGraph???.bmp will be created for you in your dfGUI directory (where ??? can be a value of 000 or higher).

Graph Config Tab
The "
Graph Config" tab allows the user to select various configuration options related to the Energy and Time graphs. These settings will be saved in your dfGUI.ini.


Configuration Tab

The first time you load dfGUI, the configuration tab will be shown by default. To show the configuration tab any time, click on the "
Config" tab at the top of the GUI.

Languages
The first time dfGUI is run, the text will appear in English. To select another language, click on the drop down menu beside "
Language" in the Config tab. Click on the langauge you wish to use. You should immediately see all the text in dfGUI change to that language. To save that choice, click on "Save Config". In the future when you run dfGUI, the language you chose and saved will automatically be displayed on startup.

The dfGUI language files can be found in the dfGUI directory and end with the extension .lng. They are ASCII text files that can be modified by the user if you wish to display alternate text in the GUI instead of the default. All of the translation work was done by volunteers and since I do not understand the languages they have been translated into, I cannot verify the quality of the work. If there are any problems with the translations, please let me know. New translations of dfGUI can be easily done without needing to recompile the program. Make a copy of the dfGUIeng.lng file and modify the contents (change the second line of the 2 line text pairs) into the language of your choice. Then add the name of the file you just created along with the language name to the dfGUI.lng file. Don't forget to increase the counter at the top of the file by one to include the new language file you just added. dfGUI should be able to read and use your new translation. If you do translate dfGUI into another language, please send me your new .lng file so I can include it in future releases of dfGUI.


Saving your Settings
When you exit dfGUI, it will write your current settings to a file
dfGUI.ini so they will be active the next time you start. You can also click on the "Save Config" button to save them immediately. All of the options in the Config tab are saved in dfGUI.ini. If you decide to modify your dfGUI.ini by hand and make a mistake so the client doesn't load properly, just delete the .ini file and reload dfGUI.


DF Client Starting/Stopping
To start the DF client if it isn't already running, click on the "
Start Client" button. This will read your foldit.bat file and modify it with the client options you have selected. dfGUI will then launch the DF client in either regular or hidden mode using the newly created batch file which means that the auto-update feature of the DF client will function as normal. If you are running in Service mode, dfGUI will modify your service.cfg file with your selection options then start the Service. If you want to stop the DF client, just click on the "Stop Client" button. This make take a few moments as the DF client will finish up the current structure it is working on and then try to upload the results (if you have not disabled networking and not running as a service).


Running Hidden
To start the DF client hidden, click on Config tab and then on the "
Hidden" radio button in the "DF Client" box then click on "Start Client". If the DF Client is already running just click on the same "Hidden" button and the DF Client window should no longer be visible. To make it unhide, click on the "Visible" radio button. Note: This will not work if the DF Client is running as a Windows service. If you minimize dfGUI, only its tray icon will be there. If you don't want the dfGUI tray icon to appear, close dfGUI and the DF client will keep running. You can load dfGUI again at any point to see its current progress. If you want the dfGUI client to start up in the tray without showing its main window and having an entry in the task bar, click on the "Start dfGUI in Tray" check box.

Hide/Unhide
dfGUI gives you the ability to hide and unhide the DF Client window. This is controlled from the Config tab in the "
DF Client" box with the "Visible" and "Hidden" radio buttons. If you start the DF Client using dfGUI, it should always be able to hide and unhide the DF Client window. If you start the client in some other way (ie: by running foldit.bat from a command prompt or creating a shortcut to the foldit.bat file), dfGUI may have problems finding the window to hide/unhide. dfGUI will look at all your running applications for a window with the words "foldit" or "FOLDTR" in the title. If found, it will attempt to hide/unhide that window. If you launch the DF client using a shortcut and want dfGUI to be able to hide/unhide the client your shortcut name should include the word "foldit" somewhere in the name.


Auto Starting
If you would like the DF client to start automatically when you load dfGUI, click on the "
AutoStart DF Client" checkbox. The next time you load dfGUI it will automatically start the DF client if it is not already active.

Auto Stopping
If you would like the DF client to stop automatically when you exit dfGUI, click on the "
AutoStop on Close" checkbox. This may also help the DF Client shutdown more cleanly if you shutdown Windows while the client is running. You can also cause dfGUI to close on the next refresh by created a file called dfGUI.stop in the dfGUI directory. If you also want dfGUI to stop the DF client when it closes due to the .stop file, make sure you have the checkbox listed above checked.

Auto Stop on Battery
If you are using a laptop computer and would like the DF client to stop automatically when you go on battery power (ie: to conserve energy), click on the "
AutoStop on Battery" checkbox. When dfGUI detects you are on battery power it will shut down the DF client for you automatically. When it detects AC power again, it will automatically restart the DF Client for you.

Restart Inactive Client
To re-start an inactive DF client, click on the "
Restart Inactive Client after" checkbox. Fill in the amount of time (in minutes) of inactivity before dfGUI restarts the client (1 to 99). dfGUI looks at the last update time of the progress.txt file to determine if the DF Client has been inactive (or crashed). Depending on your machine speed, how much CPU time is being given to the DF Client, and what your progress update settings are may affect how often the progress.txt file is written to and you may have to adjust the time accordingly.

Stop Client and GUI after X Hours
If you want the DF Client to stop running after a certain number of hours, click on the "
Stop Client and GUI after" checkbox. Fill in the amount of time (in hours) you want until the DF Client will be shut down and the GUI exits (1 to 99). When this feature is activated, a countdown timer will appear in the benchmark area "Stop Client In (D:HH:MM:SS)". When this counter reaches 0, the DF Client will be stopped and dfGUI will exit automatically.

Manual Upload
If the DF client is not running and you have buffered results you would like to upload, just click on the "
Upload" button. If the DF client is currently running in No-Network mode and you want to manually upload the results, click on the "Upload" button. dfGUI will stop the client, upload the results, and restart the client again with the settings you have configured. This will also work if running as a service.

Logging GUI Status
If you would like to log the status of the GUI (ie: benchmark & stats information) to the
dfGUI.log file, click on the "Log Status every" checkbox. Fill in the amount of time (in minutes) you want the log file to be written each time (1 to 999). A date and time stamp is provided each time the log file is written. The log file will be located in your ecc2GUI directory.


Recovering the DF Client
If the DF Client crashes it will sometimes leave the
foldtrajlite.lock file behind and not allow the client to start again properly. You may run the client in hidden mode and it doesn't seem to startup and do anything because it is waiting for user input. Without having to edit your foldit.bat file or change your dfGUI settings you can now click the "Recover" button and it will check for and delete the lock file and then launch the DF Client with the original foldit.bat settings in visible mode so you can trouble-shoot the problem.

Use Windows Text Colour in GUI
If you are using a Windows colour scheme where it is difficult to see the data in dfGUI, you can click on the "
Use Windows Text Colour in GUI" checkbox. This will change the colour of all the data boxes to be the setting you have chosen for Windows Text in your colour scheme.


Bugs/Contact

If you would like to report any bugs or contact me related to the software you can reach me via e-mail at: Jeff's E-mail Address


Wishlist

I have received a number of requests for features and I will try to get to them when time permits. The current list is:



  • This web page is maintained by Jeff Gilchrist, Copyright © 1999-2008.
  • This web page best viewed using a resolution of 800 x 600 or higher.