[chimerax-users] Restoring views and how to use clip

Elaine Meng meng at cgl.ucsf.edu
Sun Jun 30 11:34:47 PDT 2019


Hi Yazan,
The approach of named views in sessions is what we’d intended for people to use for publication images.  Is the session size causing you a real problem?

I personally use command files over sessions frequently, but only when I don’t care about saving specific views.  For publication images, I would use named views and sessions.  If you’re worried about your session becoming unusable, you can also have as backup a command file that does everything except the views, which you could try to regenerate by hand after running the command file.  Still, we encourage people to report problems restoring sessions so that we can fix them.

If you really wanted to use command files only, it’s reasonably feasible without clipping, but clipping makes it more difficult.  Without clipping, you could manually achieve each of the views you wanted, then for each: use “view matrix” to report the model positions, and then into your command put another command that uses “view matrix” to restore those positions followed by (for convenience) another command that names the view.
<http://rbvi.ucsf.edu/chimerax/docs/user/commands/view.html>  

With clipping, it is more difficult because the offset values used in the command are not absolute but relative. You can specify a reference “position” for these relative values for placing the planes, but “clip list” does not report values relative to a specified position.
<http://rbvi.ucsf.edu/chimerax/docs/user/commands/clip.html>
So instead of moving the clipping planes interactively, you would have to work out from scratch the clip commands that would put the planes where you want them.  If you can’t do it in a few commands, it’s probably not worth it.  

I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.                       
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco


> On Jun 29, 2019, at 3:42 PM, Yazan Abbas <yazan.abbas at gmail.com> wrote:
> 
> Hi, 
> Instead of using chimera sessions (which can get very big) to save my work when preparing figures for publications, I save all my commands in a .cxc file to be read by chimeraX later. Is there a single command that outputs all the necessary information in an appropriate format needed to restore a view?
> 
> Currently what I have done is alias myview view matrix; zoom to output the information into the log, but the output needs to be re-formatted whenever I want to use that information with the view matrix and zoom commands. Is there a command that outputs that information in a format ready for copying and pasting?
> 
> I know name view can partially fulfil what I am looking for, but it is only session specific.
> 
> On a related note, I want to also restore the clipping for each figure/panel I create, but I don't seem to be using the clip command appropriately. For example, if I enter the command clip list, and the output is  Using 2 clip planes: far -34.697, near -45.723, executing the command clip far -34.697 near -45.723 does not restore the same view. Am I missing something?
> Thanks, 
> Yazan






More information about the ChimeraX-users mailing list