[Chimera-users] savepos
Dougherty, Matthew T
matthewd at bcm.edu
Wed Jun 3 06:07:29 PDT 2015
Hi,
I have been automating the creation of positions using python scripts. Something relatively simple like p001, p002, etc.
When I examine the positions using the python commands
from Midas import positions
pnames = positions.keys()
at first things appear as I would expect, but later the sequence changes relative to the index, why is that?
for example, using this to print the positions
pnames = positions.keys()
i=0
for pname in pnames:
print i,pnames[i]
i=i+1
I get these results:
savepos p000
savepos p001
0 p000
1 p001
(as expected)
savepos p002
0 p000
1 p001
2 p002
(as expected)
savepos p003
0 p000
1 p001
2 p002
3 p003
(as expected)
savepos p004
0 p004
1 p000
2 p001
3 p002
4 p003
(not as expected)
savepos p005
0 p004
1 p005
2 p000
3 p001
4 p002
5 p003
(not as expected)
I would expect pnames[0] to correspond to the first position created, pnames[1] to the second posiiton created, etc., assuming no ~savepos used.
Want to create a situation where the default names would be pxxx, but could later be altered to more meaningful names but maintain the order of creation, or getting a session file from someone I would use their position names and tack on my default names to the end of the position list.
Matthew Dougherty
National Center for Macromolecular Imaging
Baylor College of Medicine
===========================================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20150603/18790b19/attachment.html>
More information about the Chimera-users
mailing list