Re: [PyMOL] Center of screen?

2011-12-22 Thread Francis E Reyes
I love the script, but the callback seems to be causing Pymol to be at 100% CPU continuously. Any workarounds? On Dec 20, 2011, at 3:08 PM, Jason Vertrees wrote: Francis, Done: http://pymolwiki.org/index.php/Mark_center. Cheers, -- Jason On Tue, Dec 20, 2011 at 3:53 PM, Francis E

Re: [PyMOL] Center of screen?

2011-12-20 Thread Jason Vertrees
Hi Thomas, Just a little change to make the crosshair script better. Now the crosshair always stays put and doesn't float near the center. python from pymol import cmd def crosshair_put_center(): t = cmd.get_position() m = [1, 0, 0, t[0], 0, 1, 0, t[1], 0, 0, 1, t[2], 0, 0, 0, 1]

Re: [PyMOL] Center of screen?

2011-12-20 Thread Francis E Reyes
+1... Would be a goodie to throw on the wiki. Thanks! F On Dec 20, 2011, at 1:47 PM, Jason Vertrees wrote: python from pymol import cmd def crosshair_put_center(): t = cmd.get_position() m = [1, 0, 0, t[0], 0, 1, 0, t[1], 0, 0, 1, t[2], 0, 0, 0, 1]

Re: [PyMOL] Center of screen?

2011-12-20 Thread Jason Vertrees
Francis, Done: http://pymolwiki.org/index.php/Mark_center. Cheers, -- Jason On Tue, Dec 20, 2011 at 3:53 PM, Francis E Reyes francis.re...@colorado.edu wrote: +1... Would be a goodie to throw on the wiki. Thanks! F On Dec 20, 2011, at 1:47 PM, Jason Vertrees wrote: python from

[PyMOL] Center of screen?

2011-12-19 Thread Francis E Reyes
Hi all Is it possible to put a crosshairs at the center of the viewing area that always shows where the center is? Thanks! F - Francis E. Reyes M.Sc. 215 UCB University of Colorado at Boulder

Re: [PyMOL] Center of screen?

2011-12-19 Thread Thomas Holder
Hi Francis, you could use a pseudoatom (or CGO object) and a callback that constantly updates the position. python from pymol import cmd cmd.pseudoatom('crosshair', pos=(0,0,0)) cmd.show_as('nonbonded', 'crosshair') def crosshair_put_center(): t = cmd.get_position() m = [1, 0, 0,