[Chimera-users] get near/far clip positions?
meng at cgl.ucsf.edu
Mon Sep 25 10:26:00 PDT 2017
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