[Chimera-users] get near/far clip positions?
olibclarke at gmail.com
Mon Sep 25 10:42:40 PDT 2017
Hmmm good idea! The only issue is what I would like to be able to do is to calculate the required thickness of each slab from the distance between the hither and yon clip planes.
That way I can have a little script that will split the scene into say ten depth slabs, regardless of whether I am zoomed in on a ligand or out on a whole receptor. I can do this manually of course, but it is a little tedious and I am lazy, so I’d like to automate it :)
I suspect it is possible using Python, but I don’t know how to obtain the distance between the near and far clip planes programmatically.
Also re python on an unrelated matter, if there is a way to obtain the vector corresponding to the difference between two equivalent Calpha pairs in different conformations of the same protein, I’d love to know how to do that in a script. It would be useful for quantifying local flexibility, by monitoring how the local arrangement of C-alphas changes between the two conformations (as opposed to rigid displacement of domains).
> On Sep 25, 2017, at 1:26 PM, Elaine Meng <meng at cgl.ucsf.edu> wrote:
> Hi Oli,
> At least from the Chimera-comands perspective (the programming experts may have a different Python approach), I think it would be easier do it with per-model clipping instead. The “mclip” command allows specifying the absolute position of the plane in model coordinates, and you could use slab mode with thickness 25 A. You would just have to specify all the models so that it’s effectively global (in other words, the same per-model clipping on each model).
> You can turn depth cueing off separately with “~set depthCue”
> Elaine C. Meng, Ph.D.
> UCSF Chimera(X) team
> Department of Pharmaceutical Chemistry
> University of California, San Francisco
>> On Sep 25, 2017, at 8:01 AM, Oliver Clarke <olibclarke at gmail.com> wrote:
>> I would like to write a script to progressively go through the current scene in n depth steps, saving an image with depth cueing off at each step. I want to do this so I can manually apply depth cueing and DoF effects in post processing.
>> For example, if the near and far clip position are at 0 and 100, and I want to split the scene into 4 depth slabs, I’d like to take images with (near,far)=(0,25),(25,50),(50,75),(75,100).
>> Is there any way in the scripting interface to get the positions of the global clipping planes, so I can calculate how thick each slab should be?
>> Script (example pseudocode):
>> scene tmp save
>> set depth cueing off
>> near_clip=0 (would like to get this position from current scene)
>> far_clip=100 (would like to get this position from current scene)
>> set far clipping plane to (near_clip+thickness_per_step)
>> for i in range (1,depth_steps+1):
>> save image_%i
>> section thickness_per_step
>> scene tmp reset.
More information about the Chimera-users