Hi PyMOLers.
I was tired, not to be able to load a dye molecule, and put it next to my
protein with full control.
Especially, I needed to be able to rotate my dye molecule around a line,
which is not supported in PyMOL.
So I investigated the PyMOL TTT matrixes, and made some handy scripts.
Check the scripts kit out: rotkit.py <http://pymolwiki.org/index.php/Rotkit>
I have made there a little tutorial to take one through the functions.
*Available in PyMOL*
- rotateline(Pos1,Pos2,degangle,molecule): "Pos1->Pos2" define a line
whereabout "molecule" will be rotated "degangle" degrees *rotateline
Pos1=P513C_CA, Pos2=P513C_CB, degangle=5, molecule=Atto590* *rotateline
Pos1=dyeatom87, Pos2=dyeatom85, degangle=10, molecule=Atto590*
- mutate(molecule,chain,resi,target="CYS",mutframe="1"): Mutate a
/molecule//chain/resi into a target, and selecting most probable frame 1
*mutate 1HP1, chain=A, resi=515, target=CYS, mutframe=1*
- toline(Pos1,Pos2,atom,molecule,dist=1): Translate molecule atom, 1
angstrom away in the same direction Pos1->Pos2 specify *toline
Pos1=P513C_CA, Pos2=P513C_CB, atom=dyeatom87, molecule=Atto590, dist=3*
*Available through PyMOL mini shell*
- printMat(matrix): prints the TTT matrix in a readable format. (4X4)
- getxyz(Sel): output is a list [x,y,z] in float. The input can be a
list, a string(list) or a selection.
- vector(Sel1,Sel2): Finds the vector between points. Gets the xyz list
from getxyz, so input can be anything.
- vectorstr(vector): turn a vector in list format into string. No real
function actually.
- transmat(vector,dist=1): Makes a TTT translation matrix for according
to the input vector. The vector is multiplied with dist.
- unitvector(vector): Make a vector a unitvector.
- radangle(angle): Convert degree to radians. Not that all input are
assumed to be in degrees, and are converted automatically.
- rotmat(angle,vectornorm,pointcoord): This function is the most
important. That makes the TTT matrix that rotates a molecule around a
normalized vector, which goes through a coordinate point.
- crossprod(Vector1, Vector2): Makes a crossproduct between two vectors
- crosspoint(Pos1, crossprod): Returns the endpoint for the Position plus
the crossproduct vector. Suitable if one would like to rotate around a
crossvector.
Best
Troels Emtekær Linnet
------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net