Showing posts with label visualization. Show all posts
Showing posts with label visualization. Show all posts

Sunday, January 28, 2024

Can you make a useful student terminal using a Raspberry Pi 5 ?


Executive summary

Yes, you can. And not only it is doable, but it is actually good fun! The Pi’s are fully useable as student terminals, allowing students to do much more than just ssh-ing to the servers : they have a fast and responsive local environment with chromium, libreoffice, molecular graphics, any programming language they want, R & R-studio, etc. Having said that, the students using them must not be in fear of doing some system administration now and then (but with a carefully prepared image for the microSD card, even this will be very rare). All-in-all, this is a loud and clear go from my side (and at the present time).

The Pi at full throttle. Overview of four workspaces shown with
molecular graphics, libreoffice writer, a tmux session, and a browser. 

The long story

Introduction

So, I decided to buy a Raspberry Pi 5. Not sure why. Probably to have a new toy to play with during the Christmas vacation. This turned-out to be a good choice: the Pi is very good fun, and I still enjoy fiddling with its settings and making it look like a proper linux machine. There were some minor issues, like a difficulty in finding suitable adaptor for micro HDMI, or -the several- issues with Wayland/Xwayland (more on that later), but the final verdict is very positive : Pi is nice and useful as a desktop environment, the hardware looks stable and the software dependable (but it is too early to say), and at 3W power consumption at idle (and 12W under full load), it will make the university happier. Actually it is so nice and the desktop experience so smooth and responsive, that I am seriously thinking about moving it to my desk at the office.

Hardware things

Not much to say here. The things I should mention are : (a) The Pi’s micro HDMI port is a bit difficult to work with, and you have to think whether you want to buy an adaptor or a fixed cable. (b) The official Pi.com case is not very good at cooling the Pi, maybe the official ‘active cooler’ is better and cheaper. There are also these ‘cases’ with double heat sinks and double fans for the fanatics. (c) It would be nice if your monitor comes with speakers, otherwise you will need either a USB- or a bluetooth-based set of speakers/headset/earbuds. (d) The ‘disk’ is a microSD card. My understanding is that this is the weak link hardware-wise. MicroSDs are not made for 24/7, you probably need a high-end model and properly scheduled backups to be on the safe side.

Software things

The Pi comes with Debian 12 (Bookworm), so everything works out of the box, except Wayland/Wayfire. I suffered considerably with the move away from X11, but in retrospect most of it was due to the complete absence of any familiarity from my side with the configuration of wayland and friends. Eventually we did reach an equilibrium and I am happy (for now ?), but note that some things like camera support and video-conferencing have not been tested. The Xwayland part (offering support for pure X11, non-wayland, apps) is not exactly a true substitute for a proper X11 server, and I even ended-up re-writing some code for two of my ancient programs which were using Ygl (an IrisGL-like X11-based substitute for GL) to make them run as fast as they do under X11. Having said all that, I do not regret staying with wayland : I learned things, and wayland appears to be faster and smoother and ‘fancier’ that X11. There are things that bug me, like the absence of a focus-follows-mouse setting (you need to find/build the extra plugins for wayfire to make this work), but all-in-all it looks good now. I suppose that someone with fewer preconceived ideas and expectations could have used the defaults happily and never experience any issues, but this was definitely not the case with me.

Tests in a ‘production’ environment

The Pi passed what I consider to be an acid test for a new desktop machine : log-in onto it, and try to work normally while using it for dealing with whatever happens to come along during a typical day at the office. I have been happily using it for several days now, and only occasionally did something needed to be installed/configured. The general feeling I got is that of using a normal fully-setup modern linux machine on a hardware that is up to the task.

A workspace with too many windows open.
This is from an analysis performed remotely via ssh.

Cost estimates

It looks like you are better off buying a kit and then add to it if needed, instead of buying the parts one-by-one. For example : buying separately the 8G model + the official Pi case + the official power supply costs 123.90 euros (incl. VAT). Buying this kit costs 124.90 euros, and you get (for the same price) the 8G model + the official active cooler + the official power supply + a HDMI ⇒ MicroHDMI cable + the (cheap-ish) ABS case + a Sandisk Ultra 32GB MicroSD (with pre-installed the OS). If 32G is not enough, you only have to buy a larger/better MicroSD card, attach a keyboard and a mouse, and you are good to go.

So, even if I add 30 euros for an extra MicroSD card + a set of wireless keyboard/mouse, we reach a total of ~155 euros for a complete ready-to-go Pi box. Add ~90 euros for a cheap 23" monitor with speakers, and you end-up with a grant total of ~250 euros for a complete Pi-based student terminal. Now : For 190 euros, you can buy a cheap chromebook with 11" display, two cores, and a 32G disk. But I can hardly imagine running e.g. pymol on a 11" display. I am writing this on a chromebook in vim and it is fine for that usage. But the chromebook is not a suitable device for molecular graphics, or having 5 windows open from an analysis of a molecular dynamics trajectory. To conclude this section : if you already have the monitor plus keyboard/mouse —and the 32G MicroSD is acceptable— you can buy a proper desktop machine with 125 euros, which is probably unbeatable. Even if you have to go for the full set, I doubt that you could find an as smooth and responsive machine with 250 euros.

Conclusions

The Raspberry Pi 5 is not a toy-like hardware suitable only for kids learning computing. It has sufficient resources to make a useful everyday terminal for college students as well. The Pi is ideal for writing code, testing it, and then deploying it to the servers for the production run. With the 8G model, you can easily have 4 workspaces loaded with a browser, a local tmux session, a remote session with X11 apps running an analysis, a local diary/journal for taking notes, etc., and with all those apps running, the responsiveness of the Raspberry remains essentially unaffected. You will, of course, not do your heavy computing on the Pi, but this is also true for all terminals we currently use. And with a price tag of 97€ for the 8G model, replacing a broken terminal comes as close to a walk in the park as you’ll ever get. Add the 3W power consumption at idle, and there you have it : a functional solution for light academic computing that is also light on the budget and also light with its environmental footprint. The way I see it, the only thing remaining to be seen concerns the robustness of the Pi : our classical PC-based student terminals can easily pass the 5 year mark, and we have several that have passed the 10 year mark. For the Pi to be useful, it should at least approach the 5 year mark. Replacing MicroSD cards every couple of months would definitely take the fun out of it. Time will show …


Update [April 2025] : Not only the Pi is still my main desktop machine (and I'm happy with it), but we have actually moved ahead and installed three devices for the students' office. The photo says it all :



Saturday, May 13, 2023

The joy of WSL2

 And just like that, there is no reason to fight with building native windows executables any longer. Install WSL2 on win11, and be done with it : all Linux graphical apps work out of the box, and at near native speeds. The screenshot below is from a molecular dynamics simulation analysis with carma / grcarma / stride / rasmol / evince / ..., all visibly working. 


Monday, April 5, 2021

Martini & Gromacs & VMD & Bendix (and ROP)

 Have been playing with the Martini force field for some time now. Still digging. Here is a short movie of a ROP mutant using Martini & Gromacs, and visualized with VMD & Bendix.





Monday, December 30, 2019

Illustrating transitions between conformers using circos plots


A new tutorial  is available for preparing a circos plot illustrating the transitions between stable conformers identified from e.g. a folding molecular dynamics simulation.



Tuesday, June 18, 2019

Fish & FZF


The combination of fish shell with fzf is outstanding. For example, you mistype a filename, hit <CTRL-T>, fzf finds it, and then with <CTRL-S> you can also examine the contents (with syntax highlighting with bat). Add z, fd, bd and rg to the soup and you have a whole new shell.




Saturday, March 23, 2019

OpenDX rendering of folding landscapes


Folding landscape (from dPCA) of the M2TM peptide in TFE, rendered with OpenDX. Too much red probably.






Wednesday, May 30, 2018

Primitive cluster monitoring for the desktop


Combine warewulf, a tiny cgi perl script and conky, and there it is, a primitive cluster monitoring tool for the desktop without ssh :





Sunday, April 23, 2017

Friday, September 13, 2013

grcarma on the cover of JCC


The program grcarma written by Panagiotis Koukos made the cover story of the latest issue of the Journal of Computational Chemistry. Well done Panagiotis !



Monday, December 17, 2012

Adaptive tempering & folding simulations


Playing with adaptive tempering using a very short (200 ns) folding simulation of the CLN025 decapeptide. Interesting diagrams, see this Norma page ...

Wednesday, October 24, 2012

Web-based service for GraphEnt

This is a fully automated web-based interface to the program GraphEnt which aims to simplify the calculation of maximum entropy protein electron density maps. The service is located at http://orion.mbg.duth.gr/graphent






Thursday, January 26, 2012

Folding landscapes


Page added (in the form of a norma tutorial) for the calculation of 'folding landscapes' using native contacts and selected principal components from, say, dihedral PCA. The image below depicts one such matrix rendered with OpenDX.




Wednesday, January 25, 2012

Publications' cloud tag


Prepared a cloud tag from the papers' abstracts. This was good fun ...




















Thursday, November 3, 2011

Poor man's stereo graphics

Poor man's stereo in the years of austerity : Jmol and VMD with red-cyan 'glasses' (costing 50 cents) and no special requirements for the monitor. As a bonus, recent versions of both programs can read CCP4 and CNS/X-PLOR maps. But don't forget to close your eyes before putting the 'glasses' on, or you'll get dizzy ...  ;-)