From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed Dec 17 2014 - 10:21:36 CST

Hi,
  One way you can easily interactively view what you're choosing
to crop out of the map is to you use the VMD user-defined clipping
planes to visually trim the density map, and then use the 6 coordinates
as the input to the volutil routines to crop the map. The clipping plane
text commands are:
  mol clipplane center <clipid> <repid> <molid> [<vector>]
  mol clipplane normal <clipid> <repid> <molid> [<vector>]
  mol clipplane color <clipid> <repid> <molid> [<vector>]
  mol clipplane status <clipid> <repid> <molid> [<mode>]
  mol clipplane num

If you look inside any VMD saved state file you'll see a series of clipplane
commands that you can use as an example, except you'll want to turn all
of them on.

Here's such an example (but in this case they are all turned off):

mol clipplane center 0 0 top {0.0 0.0 0.0}
mol clipplane color 0 0 top {0.5 0.5 0.5 }
mol clipplane normal 0 0 top {0.0 0.0 1.0}
mol clipplane status 0 0 top {0}
mol clipplane center 1 0 top {0.0 0.0 0.0}
mol clipplane color 1 0 top {0.5 0.5 0.5 }
mol clipplane normal 1 0 top {0.0 0.0 1.0}
mol clipplane status 1 0 top {0}
mol clipplane center 2 0 top {0.0 0.0 0.0}
mol clipplane color 2 0 top {0.5 0.5 0.5 }
mol clipplane normal 2 0 top {0.0 0.0 1.0}
mol clipplane status 2 0 top {0}
mol clipplane center 3 0 top {0.0 0.0 0.0}
mol clipplane color 3 0 top {0.5 0.5 0.5 }
mol clipplane normal 3 0 top {0.0 0.0 1.0}
mol clipplane status 3 0 top {0}
mol clipplane center 4 0 top {0.0 0.0 0.0}
mol clipplane color 4 0 top {0.5 0.5 0.5 }
mol clipplane normal 4 0 top {0.0 0.0 1.0}
mol clipplane status 4 0 top {0}
mol clipplane center 5 0 top {0.0 0.0 0.0}
mol clipplane color 5 0 top {0.5 0.5 0.5 }
mol clipplane normal 5 0 top {0.0 0.0 1.0}
mol clipplane status 5 0 top {0}

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Tue, Dec 16, 2014 at 09:32:58PM -0500, Xinqiang Ding wrote:
> Hi,
> Thanks for your explanation.
> Actually what I want to do is to cut out part of electron density map. But
> in order to do that using volatil command (also from vmd), I have to give
> it the six coordinates (minx, miny, minz, maxx, maxy, maxz), which defines
> the box region I want. So I want to get these coordinates.
> Is there a better way to do it?
> Thanks,
> Xinqiang
>
> On Dec 16, 2014, at 9:23 PM, John Stone <[1]johns_at_ks.uiuc.edu> wrote:
> Hi,
> The way that 3-D picking works is to imaging that when you select a
> point on the 2-D screen, a ray with an origin at the camera position is
> generated, and this ray is tested for intersection against geometry
> shown on the display. The nearest geometry shown on the display that
> is intersected by this picking-test ray is then considered to be
> "picked",
> and VMD (or any similar program) proceeds by figuring out what "object"
> (an atom in the case of VMD) was associated with the geometry that was
> "picked". In the case that you don't have an atom or associated
> graphics
> geometry shown, then you would have nothing for the picking test to
> intersect the ray with, so there isn't a 3-D cartesian coordinate
> associated with the picking operation. If you want to compute the ray
> that would be associated with a mouse picking operation over an area
> of empty space, that can be done with some linear/matrix algebra using
> the VMD viewing matrices. If you only want the 2-D screen space
> coordinate
> associated with the mouse pick, that is available through a simple
> scripting
> callback when the mouse is set to "user" mode. Let me know if any of
> these
> is what you're looking for.
>
> Cheers,
> John Stone
> [2]vmd_at_ks.uiuc.edu
>
> On Tue, Dec 16, 2014 at 06:11:48PM -0500, Xinqiang Ding wrote:
>
> Dear all,
>
> How can we get the coordinate of the mouse arrow in VMD? I know that
> if there is an atom, we can select that atom, then see their
> coordinates using label. But how can I get the coordinate of the point
> which the mouse arrow is pointing to and there is no atom there?
>
> Thank a lot,
> Xinqiang
>
> --
> NIH Center for Macromolecular Modeling and Bioinformatics
> Beckman Institute for Advanced Science and Technology
> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> [3]http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349
> [4]http://www.ks.uiuc.edu/Research/vmd/
>
> Xinqiang Ding
> PhD student at Brooks Lab
> Department of Computational Medicine and Bioinformatics
> University of Michigan
>
> References
>
> Visible links
> 1. mailto:johns_at_ks.uiuc.edu
> 2. mailto:vmd_at_ks.uiuc.edu
> 3. http://www.ks.uiuc.edu/~johns/
> 4. http://www.ks.uiuc.edu/Research/vmd/

-- 
NIH Center for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
http://www.ks.uiuc.edu/~johns/           Phone: 217-244-3349
http://www.ks.uiuc.edu/Research/vmd/