From: John Stone (
Date: Mon Mar 10 2008 - 14:17:27 CDT

  Yes, VMD already does this, but the method it uses is to scale
such that the bounding box for the top molecule fits the displayed
volume in eye coordinates. This won't give you quite the same result
as something designed to scale so the drawn geometry just touches
the edges of the window, but it serves a similar purpose. A script can do
this using the "display resetview" command after setting the appropriate
"top" molecule.

  John Stone

On Mon, Mar 10, 2008 at 02:50:50PM -0400, Axel Kohlmeyer wrote:
> On Mon, 10 Mar 2008, Emmanuel Levy wrote:
> EL> Hello,
> EL>
> EL> I was wondering if there is simple function that I could call to zoom
> EL> on a protein so that it automatically fits the display window.
> i was under the impression that VMD already does this...
> if you want to "zoom in" a little closer by default, you could
> play with the "display height" command or use the 'scale' command
> after loading a molecule.
> cheers,
> axel.
> EL> So it is a sort of "crop" except that I would like to keep the window
> EL> size constant.
> EL>
> EL> Many thanks for any hint you could give me!
> EL>
> EL> Best wishes,
> EL>
> EL> Emmanuel
> EL>
> --
> =======================================================================
> Axel Kohlmeyer
> Center for Molecular Modeling -- University of Pennsylvania
> Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
> tel: 1-215-898-1582, fax: 1-215-573-6233, office-tel: 1-215-898-5425
> =======================================================================
> If you make something idiot-proof, the universe creates a better idiot.

NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email:                 Phone: 217-244-3349
  WWW:      Fax: 217-244-6078