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] cmd.set_object_ttt('crosshair', m, homogenous=1) cmd.load_callback(crosshair_put_center, '_crosshair_cb') cmd.pseudoatom('crosshair', pos=(0,0,0)) cmd.show_as('nonbonded', 'crosshair') python end Cheers, -- Jason On Mon, Dec 19, 2011 at 3:17 PM, Thomas Holder <spel...@users.sourceforge.net> wrote: > 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, t[0], 0, 1, 0, t[1], 0, 0, 1, t[2], 0, 0, 0, 1] > cmd.set_object_ttt('crosshair', m, homogenous=1) > cmd.load_callback(crosshair_put_center, '_crosshair_cb') > python end > > Hope that helps. > > Cheers, > Thomas > > Francis E Reyes wrote, On 12/19/11 20:31: >> 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 > > -- > Thomas Holder > MPI for Developmental Biology > Spemannstr. 35 > D-72076 Tübingen > > ------------------------------------------------------------------------------ > Learn Windows Azure Live! Tuesday, Dec 13, 2011 > Microsoft is holding a special Learn Windows Azure training event for > developers. It will provide a great way to learn Windows Azure and what it > provides. You can attend the event by watching it streamed LIVE online. > Learn more at http://p.sf.net/sfu/ms-windowsazure > _______________________________________________ > 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 -- Jason Vertrees, PhD PyMOL Product Manager Schrodinger, LLC (e) jason.vertr...@schrodinger.com (o) +1 (603) 374-7120 ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev _______________________________________________ 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