Coloring distance lines between atoms

Hi Damien, Here is a Chimera Python script colordist.py that lets you color distance lines between atoms based on how long the distance is. The colors update as you move one model relative to another. After showing some distances, for instance with the "distance" command you would use command runscript colordist.py 8.5 green red to color the distance lines less than 8.5 Angstroms green, and longer ones red. The script needs to be in the directory you started Chimera in (e.g. on Linux), or you can specify a full path to the script "runscript /Users/Smith/colordist.py …", or use the Chimera "cd" command to change to the directory containing the script. You can select specific distance lines to color with the mouse and use runscript colordist.py 8.5 green red sel You can stop the color updating using runscript colordist.py or for just selected distance lines runscript colordist.py sel Tom On Oct 24, 2013, at 3:13 AM, Damien Larivière wrote:
Hi Tom,
So, here is a reminder for the script we talked about.
The idea is as follows:
Once I have loaded several proteins in Chimera, once I have calculated distances between residue pairs that are displayed in the distance popup window, once I have displayed visually the distance as a colored stick pseudobond, then I would like a switch of the pseudobond color to occur when the distance is higher than a given value as I'm moving the proteins. So, in my current manual modeling, I'm calculating a total of 24 distances between 5 proteins, I ask Chimera to display 24 pseudobond, most of them are initially let'say red, I load the script after having editing it with the distances and the associated maximal values, I move the proteins and the pseudobond color turn from red to yellow when the distance get lower than the maximal value defined for this distance in the script. And inversely, a pseudobond turns to red from yellow when it gets higher than a maximum distance.
Let me know if you need more explanations.
Many thanks for your help,
Damien
participants (1)
-
Tom Goddard