## jmol-users

 Re: [Jmol-users] slab/depth, zoom based on angstroms From: Robert Hanson - 2009-03-18 16:44:07 Attachments: Message as HTML ```Roni, Yeah, that's a bit cryptic. Slab. First, realize that there are two kinds of slab now. You can define any plane to be a slab plane. (by the ax +by +cz = d method, or by defining three atoms, or a number of other ways). So that, for example, you can whack off a piece of the protein and then still rotate it about with the mouse and that part will always be gone. This, I believe, is a unique feature of Jmol. Or you can slab by percent of depth, as in Chime and Rasmol and many other programs. So for that you want to know the size of the bounding box. Not a problem. A little scripting will get that for you. point1 = getProperty("boundboxInfo.corner0") point2 = getProperty("boundboxInfo.corner1") Now the z distance is just dz = point2.z - point1.z and you can slab in percent using that, say, at 12 angstroms forward from the rear edge: slab @{(12/dz*100)%0};slab on note that we have to round the value (12/dz*100) using "%0" because slab only take integer arguments. note also that the boundbox corners are based on the "reset" orientation (molecular coordinates) and do not change with orientation. Bob Hanson On Wed, Mar 18, 2009 at 9:33 AM, Roni Gordon wrote: > Hello, > > Just wondering if there's an easy way to change slab (or > equivalently, depth) based on an absolute amount (e.g. A or nm) > rather than a relative percentage of boundbox (which I what I think > it's based upon based on the docs). Alternatively, if this is not > possible, is there a simple method of calculating and determining > what the approriate % would be? > > Along the same lines, I recently noticed that v11.8 has a "translate > Z" that also can operate on absolute amounts -- and this effectively > adjust the zoom level. However, the docs state that this "Adjusts > the zoom setting such that the specified number of angstroms or > nanometers are added/removed from the field of view at the midpoint > depth of the model, as defined by the dimension from which zoom is > referenced ". Does that imply that the model is already translated > to half of the boundbox "depth" based on the specified zoom > dimension? Is this value easily obtained? I'm also a bit confused > on how modelRadius fits into this mix. > > Thanks in advance for any clarifications, > > Roni > > > > ------------------------------------------------------------------------------ > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > easily build your RIAs with Flex Builder, the Eclipse(TM)based development > software that enables intelligent coding and step-through debugging. > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > _______________________________________________ > Jmol-users mailing list > Jmol-users@... > https://lists.sourceforge.net/lists/listinfo/jmol-users > -- Robert M. Hanson Professor of Chemistry St. Olaf College 1520 St. Olaf Ave. Northfield, MN 55057 http://www.stolaf.edu/people/hansonr phone: 507-786-3107 If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 ```
 Re: [Jmol-users] slab/depth, zoom based on angstroms From: Robert Hanson - 2009-03-18 16:54:56 Attachments: Message as HTML ```On Wed, Mar 18, 2009 at 9:33 AM, Roni Gordon wrote: > Hello, > > Along the same lines, I recently noticed that v11.8 has a "translate > Z" that also can operate on absolute amounts -- and this effectively > adjust the zoom level. However, the docs state that this "Adjusts > the zoom setting such that the specified number of angstroms or > nanometers are added/removed from the field of view at the midpoint > depth of the model, as defined by the dimension from which zoom is > referenced ". Does that imply that the model is already translated > to half of the boundbox "depth" based on the specified zoom > dimension? Is this value easily obtained? I'm also a bit confused > on how modelRadius fits into this mix. > > Thanks in advance for any clarifications, > The model is always within the "boundBox" limits. This "translate z" is only a visualization effect, setting the zoom to appear as though the model were translated along the z axis. All this does is set the zoom value to a new value. "modelRadius" is a measure from the geometric center of the model to the furthest point of the model from that center. It is used to set "100% zoom" so that the model is nicely framed in the smaller (set zoomLarge FALSE) dimension or the larger one (set zoomLarge TRUE -- the default). > > Roni > > > > ------------------------------------------------------------------------------ > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > easily build your RIAs with Flex Builder, the Eclipse(TM)based development > software that enables intelligent coding and step-through debugging. > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > _______________________________________________ > Jmol-users mailing list > Jmol-users@... > https://lists.sourceforge.net/lists/listinfo/jmol-users > -- Robert M. Hanson Professor of Chemistry St. Olaf College 1520 St. Olaf Ave. Northfield, MN 55057 http://www.stolaf.edu/people/hansonr phone: 507-786-3107 If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 ```