[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ccp4bb]: Re: your mail



***  For details on how to be removed from this list visit the  ***
***          CCP4 home page http://www.ccp4.ac.uk         ***

> > 
> > >  I am wondering if there is way to automatically walk through a
> > protein
> > > structure from N-terminal to C-terminal, so to have a better sense of
> > 
> > > chain trace than the ramp painting?
> > 
> > isn't this what you do when you rebuild your protein ? you can use OOPS2
> > to
> > generate O macros to take you from one residue to the next; see the
> > manual at
> > http://xray.bmc.uu.se/usf/oops2_man.html

If you'd prefer to use a robust scripting language like Python instead of
O macros, you can do the same kind of thing with PyMOL.  After loading a
structure, run "walk.py" below to be able to walk the chain using the F1
and F2 keys.  It could easily be customized to suit your needs.  

http://www.pymol.org

# walk.py

from pymol import cmd

walk_list = cmd.identify( "(name ca)" )
last = len(walk_list) - 1

def walk(forward):
   if forward:
      walk_list.insert(0,walk_list.pop(last))
   else:
      walk_list.insert(last,walk_list.pop(0))
   ca = walk_list[0]
   cmd.color( "white" )
   cmd.color( "yellow", "(byres id %d)"%ca )
   cmd.zoom( "(id %d)"%ca, 10 )

cmd.set_key('F1',walk,(1,))
cmd.set_key('F2',walk,(0,))

# end walk.py

- Warren