How to set a dihedral in PyMOL? I propose the set_dihedral command working incorrectly - pymol

I want to change the phi/psi/omega angles. But when I use set_dihedral, it doesn't change the angle. Instead, it moves (rotates?) the following chain. (I have a homotrimer, if it matters). What's wrong with my PyMOL, and how can I adjust dihedrals? Thank you.

Related

How to devide RGB mask by name in Nuke with python

I am making an autocomp solution for my projects in Nuke and I want to be able to rename my RGB masks with their intended name.
So say these are my three RGB mask shuffle nodes stored in a list:
['RGB_boxes_01_-Box_red-Box_green-Box_blue', 'RGB_boxes_02_-Box_red-Box_green-Box_blue',
'RGB_boxes_03_-Box_red-Box_green-Box_blue']
Thay each contain red green and blue channels that I want to split an rename "Box_red", "Box_green" and "Box_blue"
Now splitting the channels are easy, but renaming them to their intended name is harder. Anyone nows a good way to do this?
I thought it was a good idea to put "-" in front of every channel so that I can have a specific pattern when I am dividing, but so far I cant figure out how to do this.
Thanks!
I don't have much experience with python & channels, however I know that nuke layers/channels are immutable and permanent in a script - once they're created, they can't be destroyed without possibly editing the script manually.
Check out this API page around layers, it should give you the syntax you need for your code:
https://learn.foundry.com/nuke/developers/105/pythonreference/nuke.Layer-class.html
Thanks!
But its not actually a question about channels in nuke, but more a about how do I split these strings in this list based on a pattern.
So how do I make this
['RGB_boxes_01_-Box_red-Box_green-Box_blue', 'RGB_boxes_02_-Box_red-Box_green-Box_blue',
'RGB_boxes_03_-Box_red-Box_green-Box_blue']
spit out this:
['Box_red', 'Box_green', 'Box_Blue']
['Box_red', 'Box_green', 'Box_Blue']
['Box_red', 'Box_green', 'Box_Blue']

how to set zsh completion priorities

There is a file named foo.xy, and foo.xy produces foo.yz.
So, is there a way to make zsh complete foo.yz instead of foo.xy?
(The priority of foo.yz is higher than that of foo.xy)
It seems tag-order helps, but I don't know how to write right tag-order rules.
thx.

What exactly does "printw" do? (Ncurses)

Could someone please tell me what exactly does printw do? I tried looking for information but just could not find anything.
5 seconds on Google revealed some nice documentation.
printw() class: Print formatted output similar to printf()
and
6.3.1. printw() and mvprintw
These two functions work much like printf(). mvprintw() can be used to move
the cursor to a position and then print. If you want to move the cursor first
and then print using printw() function, use move() first and then use printw()
though I see no point why one should avoid using mvprintw(), you have the
flexibility to manipulate.
Source - NCURSES-Programming-HOWTO
Type man printw (I suppose you are not programming with Windows).

Raphaeljs's 'getPointAtLength' returns linear values for a quadratic bezier curve created using 'T' SVG commands

I'm using Raphaeljs version 2.1.2. I've create a bezier curved path based on the following values:
M1052,141T1186,63T1281,206T1019,241
The important part here are not the values but the command: I'm using the T SVG command to create a curved line between the points. The path appears fine on the screen, connecting the points in a curved line. However, when I use the function getPointAtLength to get a point on this line, I get a point on what the path would look like had I used the L command and not the T; in other words, I get the points that appear on imaginary straight lines connecting the various points above, and not the the points on the curved line that appears on the screen.
After more than 10 hours of trying to figure this out with no success, any idea will be greatly appreciated.
after a few hours... :
I simplified the part of the code which creates the problem, now reduced to having the "glow" part of the curve in straight lines, while at the same time the very same path is shown in bezier curved form:
var r = Raphael('homeTop');
var animationPath = r.path("M1052,141T1186,63T1281,206T1019,241");
animationPath.glow();
Now this code on fiddle works as it should.. that's what I don't understand, why exactly the same code doesn't work somewhere else... !
It's a bug of the library, the script you download from the master branch is affected, but the one on the v2.1.2 branch is fine. Also, on older versions, such 2.1.0 the issue isn't showing up.
So, why on master is it broken? The culprit is commit ad15a1c, which was meant to solve the bug #629, which is first experienced here on StackOverflow. The problem is the patch wasn't complete, it has been fixed on commit 3bc12c3, which is on the v2.1.2 branch.
So using the script at the URL https://raw.github.com/DmitryBaranovskiy/raphael/v2.1.2/raphael-min.js it should work.

Easy way to colour ALL user input in terminal?

I know that there is lots of info for colouring the output of certain commands, but I want to have a specific colour for everything I write into the Mac terminal.
It would allow me to have a special colour for everything I input - not the output, just the code I personally input - making it easy to scan the code to where the last command was. I want to find a way to do it without having to write a colour alias for every single command - A way that by default will implement a unique colour for everything I write in the terminal.
Thanks for your help.
I have now sorted this...
Open your ~/.bash_profile in whatever editor you prefer.
Add the following code:
export PS1="\e[0;32m[\u#\h \W]\$ \e[m"
and save.
You will now see that your command prompt is coloured green, and it's super easy to find yourself in the terminal :)
Hope that's helpful for anyone trying to fix the same problem!
P.S> These instructions cover more than just the colour in the terminal... They also control what it shown in your command prompt. I'm afraid that it will need someone way more advanced at coding than me to decipher which bit refers to what... Sorry!

Resources