On Fri, Feb 5, 2010 at 1:36 PM, Sean Law <[email protected]> wrote:
> Is it possible to include a function that could easily add or delete states
> (from the beginning, middle, or end of a set of states)?
>
> Something with the following syntax:
>
> delete_states 14 #Deletes state 14
> delete_states 10-20 #Delete states 10-20
> delete_states 10-20,30-40 #Delete states 10-20 and 30-40
>
> That would be great.
>
> Sean
Sean,
That would be nice. Right now, I do:
# fetch 1nmr, a 20-state object
fetch 1nmr
# I want to only save 5 these states, not all 20
sought_states = [1, 2, 5, 17, 19 ]
# loop through sought_states, creating an object with just those states
for x in range(len(sought_states)):
cmd.create("1nmr.cut", "1nmr", sought_states[x], x )
# save the partial-state object
cmd.save( "1nmr_partial.pdb", "1nmr.cut", state=0 )
-- Jason
--
Jason Vertrees, PhD
PyMOL Product Manager
Schrodinger, LLC
(e) [email protected]
(o) +1 (603) 374-7120
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
PyMOL-users mailing list ([email protected])
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/[email protected]