Color bands based on how much they are stretched or compressed

Started by jeff101

jeff101 Lv 1

When I play Foldit, I sometimes use bands to force the protein to adopt certain conformations. When doing this, I often use recipes like bandsliders2 to monitor how close the bands are to their target lengths. This can be a bit cumbersome if I am using a large number of bands. Is it possible to add a View Option to color each band based on how far it is from its target length? Say x is the present length of a band and xo is the target length for the band. Define dx to be the absolute value of x-xo. Find the range of dx values for all the bands and color the band with the smallest dx green and the band with the largest dx red. Then it would be easy to tell at a glance which bands are behaving as desired (green for small dx) and which ones are stretched or compressed more than desired (red for big dx). They say a picture is worth a thousand words. A picture is also worth a large table full of numbers.

jeff101 Lv 1

Since the recipe DoBandsObeyHookesLaw1 seems to show that Foldit bands obey Hooke's Law, giving the force F = k dx and the potential energy U = (1/2)k(dx)^2, it might also be interesting to color bands by the force F or the potential energy U, using red for bands with the largest F or U and green for bands with the smallest F or U. The recipe DoBandsObeyHookesLaw1 also seems to show that k = (band strength)^2 for Foldit bands. See https://fold.it/recipes/46844 for more details.