David,

In recent builds, you don't need to specify both dimensions for the ray
command -- just give it height or width and it will compute the other
based on the current aspect ratio.

Regardless, to get the current window, here is one way:

print cmd.get_session()['main']

Cheers,
Warren

--
Warren L. DeLano, Ph.D.                     
Principal Scientist

. DeLano Scientific LLC  
. 400 Oyster Point Blvd., Suite 213           
. South San Francisco, CA 94080 USA   
. Biz:(650)-872-0942  Tech:(650)-872-0834     
. Fax:(650)-872-0273  Cell:(650)-346-1154
. mailto:war...@delsci.com      
 

> -----Original Message-----
> From: pymol-users-ad...@lists.sourceforge.net 
> [mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of 
> David A. Horita
> Sent: Tuesday, January 03, 2006 2:39 PM
> To: pymol-users@lists.sourceforge.net
> Subject: [PyMOL] Ray, png
> 
> Hi,
> On the subject of larger image sizes, I had a question a 
> while back; I'd like to know if it's been addressed or anyone 
> has a quick(er) workaround- Basically, is there in inverse to 
> the viewport command?  i.e., if I manually resize the Pymol 
> window to fit around the molecule I'm displaying, how can I 
> get the relative dimensions of the new window?  These 
> dimensions are needed for the Ray command to keep proper 
> perspective.  What I've done in the past is save a small 
> image of what's displayed in the window, used a graphics 
> program to determine the x & y dimensions, and then used 
> these to generate a high-resolution ray traced image with the 
> same x/y ratio.
> I figure I'm missing something.
>  
> Regards,
>  
>  
> -----------------------------
> David A. Horita, Ph.D.
> Department of Biochemistry
> Wake Forest University School of Medicine Winston-Salem, NC 27157-1016
> Tel: 336 713-4194
> Fax: 336 716-7671
> email:  dhor...@wfubmc.edu
> web:  http://www1.wfubmc.edu/biochem/faculty/Horita.htm 
> <http://www1.wfubmc.edu/biochem/faculty/Horita.htm/> 
>  
> 

Reply via email to