HELP: I'm wondering about how to access the surface data

Hi chimera users, I'm wondering about several question: I installed chimera in my home dir, what's path to import in python? how can I access the data generated by mscalc in python?

Chimera includes Python. I'm not sure what path you are asking about. Two ways to use Python in Chimera are 1) use File / Open to open a Python script (myfile.py). This will run the Python code. Print statements from the code will appear in the Reply Log (shown with menu entry Favorites / Reply Log). To directly work with a Python shell within Chimera use menu entry Tools / General Controls / IDLE. IDLE is the name of a Python shell developed by others. That gives you a window with a Python prompt where you can type in Python code and run it and explore Chimera data structures. Tom

Forgot to mention the mscalc Python interface is the Python MolecularSurface module found in chimera/share/MoleculeSurface or on the Mac in Chimera.app/Contents/Resources/share/MoleculeSurface Look at the calcsurf.py code which runs the mscalc stand-alone program (include in Chimera) and look at msurf.py if you are interested in the Chimera SurfaceModel class which displays the surface in the graphics window. Tom

You cannot easily start Python and import Chimera. There are a few reasons for this. 1) An environment variable needs to be set (LD_LIBRARY_PATH) so Chimera libraries can be found, 2) an environment variable (PYTHONPATH) needs to be set so Python can find Chimera modules, 3) Chimera requires exactly the Python binary that comes with it so that the dozens of compiled modules work correctly and unicode handling is done as expected. Because of the difficulties we don't support importing Chimera in an already running Python -- but with work you could figure it out. The Chimera programming documentation describes how to get surface geometry from a surface model: http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/Reference/surface.html To calculate the surface in the first place you need to look at the Python code I mentioned. Unfortunately, most Python routines Chimera provides are not documented, so you will have to read the code that comes with the Chimera distribution in the "share" directory. Another aid is to look at the Chimera Python scripts web page: http://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts Tom

On Apr 19, 2010, at 11:07 AM, Thomas Goddard wrote:
To supplement Tom's reply, therefore typically you let Chimera itself act as the Python interpreter. For instance if you have a Python script contained in the file myscript.py, then: chimera --nogui myscript.py will execute it (without bringing up the Chimera interface). See: Chimera Startup and Input and: System Command-Line Options for more about running Chimera in this mode. --Eric Eric Pettersen UCSF Computer Graphics Lab

Hey everyone, I have a pretty basic question here so please forgive me but I'm totally unable to figure it out or find any information on it. I have an elaborate movie saved which contains a morphed structure. When I save the session and reopen it everything is retained perfectly, except I can't bring up the MD movie transport control of the morphed model. Of course it is convenient to use the MD movie window to transport through the frames but I don't know how to load the morph contained within the chimera session back into the MD movie ensemble player. Any tips on how to do this? Thanks to everyone for your help and thanks to the developers for a wonderful program. Drew </PRE> <html> <body> ------------------------------------------------------------<br /> This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.<br /> ================================= </body> </html> <PRE>

Hi Andrew, This problem with the MD movie interface not working with reloaded sessions is in our bug database http://plato.cgl.ucsf.edu/trac/chimera/ticket/8245 and has been noted by several other users. Eric Pettersen has it assigned a "low" priority which means it is unlikely to be fixed this year. It may be difficult to fix. Eric is on vacation but may have further comments when he returns. Tom

On Apr 22, 2010, at 11:49 AM, Thomas Goddard wrote:
Well, it is at low priority for a variety of reasons: 1) It is in fact of relatively low utility for actual molecular dynamics trajectories (especially compared to various other improvements I could make to that tool). An MD user is typically not going to want to save what is basically a second copy of their trajectory data into a session, which is what would happen unless I do something pretty tricky during the session save. Also, Chimera's session files aren't as efficient space-wise as the original files (in the two cases I tried the session file was 64-78% larger than the trajectory files). 2) The MD tool is old code that I didn't originally write and isn't well designed for session saving (or command-line use for that matter). It is split into two modules that would both have to be saved and coordinated with each other and a lot of new code would need to be written to "revive" the graphical interface from a session file. 3) Other aspects of saving the GUI would be tricky, such as what to do about trajectories that haven't been fully loaded from their input files, but also such things as saving RMSD maps and occupancy volumes. Since the latter didn't come from volume input files they don't get automatically saved into sessions (currently the user has to save each one of them into volume files first). I an not unwilling to do the work necessary here, but I think we as a team have to decide that it is worth pushing down some other priority item to do so. --Eric Eric Pettersen UCSF Computer Graphics Lab http://www.cgl.ucsf.edu P.S. I'm adding this info to the Trac ticket.

Hi Andrew, As YZ mentioned earlier, you can access the whole morph trajectory in the saved session using the "coordset" command, it is just control via the MD Movie interface that is not available. For me at least, this makes full session compatibility of MD Movie less urgent. Starting with the saved session, you can still replay the trajectory with "coordset", and this could be done in a script along with movie recording. <http://www.cgl.ucsf.edu/pipermail/chimera-users/2010-April/005090.html> <http://www.cgl.ucsf.edu/chimera/1.4/docs/UsersGuide/midas/ coordset.html> Best, Elaine ----- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco On Apr 26, 2010, at 11:59 AM, Eric Pettersen wrote:

Hi Drew, Yes, the MD movie widow will be disappeared after reopen the saved section file currently. Instead of using the GUI control your trajectory, you may try the following command: coordset model-spec frame Detailed description can be found here: http://www.cgl.ucsf.edu/chimera/1.4/docs/UsersGuide/midas/coordset.html Best, YZ On Apr 21, 2010, at 3:11 PM, Waight, Andrew wrote:
participants (7)
-
"郑捷凯"
-
Elaine Meng
-
Eric Pettersen
-
Thomas Goddard
-
Tom Goddard
-
Waight, Andrew
-
Yang, Zheng (YZ)