[Chimera-users] transfer positions to different sessions

Tom Goddard goddard at sonic.net
Fri Apr 5 11:01:51 PDT 2013


Hi Matt,

   There is no facility for copying positions saved with savepos from 
one session to another session.  Chimera does not have any capabilities 
that involve two sessions other than loading both sessions.  That gives 
you two copies of all your models and is not what you want.

   One hack to copy positions is simply edit the session file. Search 
for the line that says "formattedPositions = " then copy from that from 
the source session file to the destination session file.

   Here's a trick that mostly does the job without editing files. Open 
the session with the positions you wish to copy.  Bring up the Python 
shell, menu Tools / General Controls / IDLE.  Save a copy of the 
positions using

     import Midas
     p = Midas.positions.copy()

Then close this session and open the session you want to copy the 
positions to.  Now to replace all the positions of the second session 
with those of the first session use

     Midas.positions = p

If instead you only want to replace positions 14-27

     for i in range(14,28):
       n = 'P' + str(i)
       Midas.positions[n] = p[n]

One flaw in this copying method is that it will not copy per-model 
clipping planes.

     Tom


> I am producing various animation movies.
> Each movie corresponding to a single session file.
> Each session has the same models in the same sequence on the model panel, although they may vary in terms of threshold, color, etc.
> Lets say I have positions P1,P2,...,Pn
>
> How can I transfer positions P3,P14-27 from session1.py to session2.py?
>
> thanks,
>
> _______________________________________________
> Chimera-users mailing list
> Chimera-users at cgl.ucsf.edu
> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
>



More information about the Chimera-users mailing list