Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

## Re: [PyMOL] RE: Stereo pictures, light vector and shadows

 Re: [PyMOL] RE: Stereo pictures, light vector and shadows From: Anthony Duff - 2003-04-30 04:07:41 Attachments: pymol light vector.xls ```Warren's script is not quite right. The value -0.902 is not correct. Apparently, my picture, with a stick peptide casting a shadow on the inner surface of a deep crevice, is particularly demanding. I have done the vector calculations. See the attached excel worksheet for light vectors for any desired stereo angle. I am using the script below. It produces perfect shadows and reflections. turn y, 3 set light=[-0.43709,-0.34800,-0.82937] ray 1120,818 png image.l.png turn y, -6 set light=[-0.34800,-0.34800,-0.87051] ray 1120,818 png image.r.png Anthony At 05:10 AM 24/04/2003, Warren L. DeLano wrote: >In the script I just posted, I used unit vectors to specify the light >direction and simply rotated that vector by 6 degrees. The first vector >is merely [-0.4,-0.4,-1.0] normalized. The second is that same vector >rotated 6 degrees about the Y axis. > >I then loaded the output into Illustrator and was able to view both >cross-eye and wall-eye stereo pairs with clean shadows. > > > > > > Try using this sequence to create your stereo pair: > > > > set light=[-0.348,-0.348,-0.870] > > ray > > png image1.png > > turn y,6 > > set light=[-0.437,-0.348,-0.902] > > ray > > png image2.png > > turn y,-6 > > > > Cheers, > > Warren ---------------------------------------------------------------------- Anthony Duff Postdoctoral Fellow School of Molecular and Microbial Biosciences Biochemistry Building, G08 University of Sydney, NSW 2006 Australia Phone. 61-2-9351-7817 Fax. 61-2-9351-4726 ---------------------------------------------------------------------- ```

 [PyMOL] Re: PyMOL-manual From: - 2002-12-24 22:11:21 ```On Tuesday, December 24, 2002, at 12:07 PM, pymol-users-request@... wrote: > 1. Suggestions for manual - nonspecialists perspective (James L. > Kilgore) > > > What I'd like to see written in an accessible form for a > non-programmer is > > 1) A concise-but-ground-up description of what information is in a PDB > file and other file formats including: http://www.rcsb.org/pdb/docs/format/pdbguide2.2/guide2.2_frame.html > > 2) How to read the file documentation from within PyMOL: > > - Go over the conventions for annotating structure files or at least > link to something LESS THAN 300 PAGES LONG that explains the salient > points). http://pymol.sourceforge.net/html/toc.html http://www.rubor.de/bioinf/pymol_tips.html http://tofu.tamu.edu/pymol/ http://pymol_tutorial.tripod.com/ > - How to display protein sequence, including disulfide bond positions > - conditions for determination (e.g. low pH often used in NMR, could > affect structure). > > 3) Directions on how to select and alter display parameters for > entities > by connection like bound ligands, a selected number of contiguous > polypeptide residues or one of several subunits, etc. > > 4) Instructions on options to selectively visualize interfaces between > molecules. > > 5) Description and display of calculated features like electrostatic > surfaces, hydrogen bond locations, etc. > > One possibility for making the software more user-friendly would be to > organize a user "Quick Start" abbreviated file containing links to the > main document. > > -- > Jim Kilgore > > > > > > > --__--__-- > > _______________________________________________ > PyMOL-users mailing list > PyMOL-users@... > https://lists.sourceforge.net/lists/listinfo/pymol-users > > > End of PyMOL-users Digest > > > William G. Scott Associate Professor Department of Chemistry and Biochemistry and The Center for the Molecular Biology of RNA Sinsheimer Laboratories University of California at Santa Cruz Santa Cruz, California 95064 USA phone: +1-831-459-5367 (office) +1-831-459-5292 (lab) fax: +1-831-4593139 (fax) ```
 Re: [PyMOL] Stereo pictures, light vector and shadows From: Anthony Duff - 2003-04-23 04:02:16 ``` I make stereo pictures by making two pictures, with the command "turn y, 6" in between. Now that I am looking into a crevice, I have discovered a problem with this simple method. When the view is rotated, the light vector moves with the view. This results in the two pictures having different shadows, thus ruining the stereo picture. I don't want to give up on having shadows. Has anybody solved this problem? I am attempting to solve the problem by specifying the light setting (set light = [-0.4, -0.4, -1.0]). What are the definitions of the light parameters? Anthony ---------------------------------------------------------------------- Anthony Duff Postdoctoral Fellow School of Molecular and Microbial Biosciences Biochemistry Building, G08 University of Sydney, NSW 2006 Australia Phone. 61-2-9351-7817 Fax. 61-2-9351-4726 ---------------------------------------------------------------------- ```
 RE: [PyMOL] Stereo pictures, light vector and shadows From: Warren L. DeLano - 2003-04-23 16:00:15 ```Yow, good point! I'm surprise none of us realized this before : ) You need to change the direction of the light 6 degrees as well. Try using this sequence to create your stereo pair: set light=[-0.348,-0.348,-0.870] ray png image1.png turn y,6 set light=[-0.437,-0.348,-0.902] ray png image2.png turn y,-6 Cheers, Warren -- mailto:warren@... Warren L. DeLano, Ph.D. Principal DeLano Scientific LLC Voice (650)-346-1154 Fax (650)-593-4020 -----Original Message----- From: pymol-users-admin@... [mailto:pymol-users-admin@...] On Behalf Of Anthony Duff Sent: Tuesday, April 22, 2003 9:03 PM To: pymol-users@... Subject: Re: [PyMOL] Stereo pictures, light vector and shadows I make stereo pictures by making two pictures, with the command "turn y, 6" in between. Now that I am looking into a crevice, I have discovered a problem with this simple method. When the view is rotated, the light vector moves with the view. This results in the two pictures having different shadows, thus ruining the stereo picture. I don't want to give up on having shadows. Has anybody solved this problem? I am attempting to solve the problem by specifying the light setting (set light = [-0.4, -0.4, -1.0]). What are the definitions of the light parameters? Anthony ---------------------------------------------------------------------- Anthony Duff Postdoctoral Fellow School of Molecular and Microbial Biosciences Biochemistry Building, G08 University of Sydney, NSW 2006 Australia Phone. 61-2-9351-7817 Fax. 61-2-9351-4726 ---------------------------------------------------------------------- ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ PyMOL-users mailing list PyMOL-users@... https://lists.sourceforge.net/lists/listinfo/pymol-users ```
 [PyMOL] Stereo pictures, light vector and shadows From: Scott Classen - 2003-04-23 19:03:41 ```Warren, Could you explain the values for the set light command? It appears the default values are [-0.40000,-0.40000,-1.00000] how do the values below correspond to a 6 degree rotation of the light source? Thanks, Scott On Wednesday, April 23, 2003, at 08:59 AM, Warren L. DeLano wrote: > Yow, good point! I'm surprise none of us realized this before : ) You > need to change the direction of the light 6 degrees as well. > > Try using this sequence to create your stereo pair: > > set light=[-0.348,-0.348,-0.870] > ray > png image1.png > turn y,6 > set light=[-0.437,-0.348,-0.902] > ray > png image2.png > turn y,-6 > > Cheers, > Warren ============================================== Scott Classen, Ph.D. classen@... University of California, Berkeley Department of Molecular & Cell Biology 237 Hildebrand Hall #3206 Berkeley, CA 94720-3206 LAB 510.643.9491 FAX 510.643.9290 ============================================== ```
 [PyMOL] RE: Stereo pictures, light vector and shadows From: Warren L. DeLano - 2003-04-23 19:10:37 ```Scott, PyMOL's lighting model is merely a direction, not a point. The default direction vector isn't even normalized to unit length. In the script I just posted, I used unit vectors to specify the light direction and simply rotated that vector by 6 degrees. The first vector is merely [-0.4,-0.4,-1.0] normalized. The second is that same vector rotated 6 degrees about the Y axis. I then loaded the output into Illustrator and was able to view both cross-eye and wall-eye stereo pairs with clean shadows. I hope that helps. Cheers, Warren -- mailto:warren@... Warren L. DeLano, Ph.D. Principal DeLano Scientific LLC Voice (650)-346-1154 Fax (650)-593-4020 -----Original Message----- From: Scott Classen [mailto:classen@...] Sent: Wednesday, April 23, 2003 12:07 PM To: pymol-users@... Cc: warren@... Subject: Stereo pictures, light vector and shadows Warren, Could you explain the values for the set light command? It appears the default values are [-0.40000,-0.40000,-1.00000] how do the values below correspond to a 6 degree rotation of the light source? Thanks, Scott On Wednesday, April 23, 2003, at 08:59 AM, Warren L. DeLano wrote: > Yow, good point! I'm surprise none of us realized this before : ) You > need to change the direction of the light 6 degrees as well. > > Try using this sequence to create your stereo pair: > > set light=[-0.348,-0.348,-0.870] > ray > png image1.png > turn y,6 > set light=[-0.437,-0.348,-0.902] > ray > png image2.png > turn y,-6 > > Cheers, > Warren ============================================== Scott Classen, Ph.D. classen@... University of California, Berkeley Department of Molecular & Cell Biology 237 Hildebrand Hall #3206 Berkeley, CA 94720-3206 LAB 510.643.9491 FAX 510.643.9290 ============================================== ```
 Re: [PyMOL] RE: Stereo pictures, light vector and shadows From: Anthony Duff - 2003-04-30 04:07:41 Attachments: pymol light vector.xls ```Warren's script is not quite right. The value -0.902 is not correct. Apparently, my picture, with a stick peptide casting a shadow on the inner surface of a deep crevice, is particularly demanding. I have done the vector calculations. See the attached excel worksheet for light vectors for any desired stereo angle. I am using the script below. It produces perfect shadows and reflections. turn y, 3 set light=[-0.43709,-0.34800,-0.82937] ray 1120,818 png image.l.png turn y, -6 set light=[-0.34800,-0.34800,-0.87051] ray 1120,818 png image.r.png Anthony At 05:10 AM 24/04/2003, Warren L. DeLano wrote: >In the script I just posted, I used unit vectors to specify the light >direction and simply rotated that vector by 6 degrees. The first vector >is merely [-0.4,-0.4,-1.0] normalized. The second is that same vector >rotated 6 degrees about the Y axis. > >I then loaded the output into Illustrator and was able to view both >cross-eye and wall-eye stereo pairs with clean shadows. > > > > > > Try using this sequence to create your stereo pair: > > > > set light=[-0.348,-0.348,-0.870] > > ray > > png image1.png > > turn y,6 > > set light=[-0.437,-0.348,-0.902] > > ray > > png image2.png > > turn y,-6 > > > > Cheers, > > Warren ---------------------------------------------------------------------- Anthony Duff Postdoctoral Fellow School of Molecular and Microbial Biosciences Biochemistry Building, G08 University of Sydney, NSW 2006 Australia Phone. 61-2-9351-7817 Fax. 61-2-9351-4726 ---------------------------------------------------------------------- ```
 RE: [PyMOL] RE: Stereo pictures, light vector and shadows From: Warren L. DeLano - 2003-04-30 20:54:11 ```Yep, I blew it -- neglected to check my work. Scratch all of my previous emails on the subject. The following function (turn_y_light.py) will correctly rotate the light in order to offset the effect of "turn y,#" def turn_y_light(rot): # assuming "rot" has angle in degrees rot_rad = math.pi*rot/180.0 (X0,Y0,Z0)=cmd.get_setting_tuple("light")[1] X1= X0*math.cos(rot_rad) + Z0*math.sin(rot_rad) Y1= Y0 Z1= Z0*math.cos(rot_rad) - X0*math.sin(rot_rad) cmd.set("light",[X1,Y1,Z1]) sample usage: # first, load the function from a .py file run turn_y_light.py # now use it... turn y,3 turn_y_list(3) ray png image1.png turn y,-6 turn_y_light(-6) ray png image2.png Sorry for the confusion! Warren -- mailto:warren@... Warren L. DeLano, Ph.D. Principal DeLano Scientific LLC Voice (650)-346-1154 Fax (650)-593-4020 -----Original Message----- From: pymol-users-admin@... [mailto:pymol-users-admin@...] On Behalf Of Anthony Duff Sent: Tuesday, April 29, 2003 9:08 PM To: pymol-users@... Subject: Re: [PyMOL] RE: Stereo pictures, light vector and shadows Warren's script is not quite right. The value -0.902 is not correct. Apparently, my picture, with a stick peptide casting a shadow on the inner surface of a deep crevice, is particularly demanding. I have done the vector calculations. See the attached excel worksheet for light vectors for any desired stereo angle. I am using the script below. It produces perfect shadows and reflections. turn y, 3 set light=[-0.43709,-0.34800,-0.82937] ray 1120,818 png image.l.png turn y, -6 set light=[-0.34800,-0.34800,-0.87051] ray 1120,818 png image.r.png Anthony At 05:10 AM 24/04/2003, Warren L. DeLano wrote: >In the script I just posted, I used unit vectors to specify the light >direction and simply rotated that vector by 6 degrees. The first vector >is merely [-0.4,-0.4,-1.0] normalized. The second is that same vector >rotated 6 degrees about the Y axis. > >I then loaded the output into Illustrator and was able to view both >cross-eye and wall-eye stereo pairs with clean shadows. > > > > > > Try using this sequence to create your stereo pair: > > > > set light=[-0.348,-0.348,-0.870] > > ray > > png image1.png > > turn y,6 > > set light=[-0.437,-0.348,-0.902] > > ray > > png image2.png > > turn y,-6 > > > > Cheers, > > Warren ---------------------------------------------------------------------- Anthony Duff Postdoctoral Fellow School of Molecular and Microbial Biosciences Biochemistry Building, G08 University of Sydney, NSW 2006 Australia Phone. 61-2-9351-7817 Fax. 61-2-9351-4726 ---------------------------------------------------------------------- ```
 RE: [PyMOL] RE: Stereo pictures, light vector and shadows From: Warren L. DeLano - 2003-04-30 21:03:11 ```(sorry, bad day continues) fixed type in the sample usage: # first, load the function from a .py file run turn_y_light.py # now use it... turn y,3 turn_y_light(3) ray png image1.png turn y,-6 turn_y_light(-6) ray png image2.png -- mailto:warren@... Warren L. DeLano, Ph.D. Principal DeLano Scientific LLC Voice (650)-346-1154 Fax (650)-593-4020 -----Original Message----- From: pymol-users-admin@... [mailto:pymol-users-admin@...] On Behalf Of Warren L. DeLano Sent: Wednesday, April 30, 2003 1:54 PM To: 'Anthony Duff'; pymol-users@... Cc: f.H.J.van.Hoesel@... Subject: RE: [PyMOL] RE: Stereo pictures, light vector and shadows Yep, I blew it -- neglected to check my work. Scratch all of my previous emails on the subject. The following function (turn_y_light.py) will correctly rotate the light in order to offset the effect of "turn y,#" def turn_y_light(rot): # assuming "rot" has angle in degrees rot_rad = math.pi*rot/180.0 (X0,Y0,Z0)=cmd.get_setting_tuple("light")[1] X1= X0*math.cos(rot_rad) + Z0*math.sin(rot_rad) Y1= Y0 Z1= Z0*math.cos(rot_rad) - X0*math.sin(rot_rad) cmd.set("light",[X1,Y1,Z1]) sample usage: # first, load the function from a .py file run turn_y_light.py # now use it... turn y,3 turn_y_list(3) ray png image1.png turn y,-6 turn_y_light(-6) ray png image2.png Sorry for the confusion! Warren -- mailto:warren@... Warren L. DeLano, Ph.D. Principal DeLano Scientific LLC Voice (650)-346-1154 Fax (650)-593-4020 -----Original Message----- From: pymol-users-admin@... [mailto:pymol-users-admin@...] On Behalf Of Anthony Duff Sent: Tuesday, April 29, 2003 9:08 PM To: pymol-users@... Subject: Re: [PyMOL] RE: Stereo pictures, light vector and shadows Warren's script is not quite right. The value -0.902 is not correct. Apparently, my picture, with a stick peptide casting a shadow on the inner surface of a deep crevice, is particularly demanding. I have done the vector calculations. See the attached excel worksheet for light vectors for any desired stereo angle. I am using the script below. It produces perfect shadows and reflections. turn y, 3 set light=[-0.43709,-0.34800,-0.82937] ray 1120,818 png image.l.png turn y, -6 set light=[-0.34800,-0.34800,-0.87051] ray 1120,818 png image.r.png Anthony At 05:10 AM 24/04/2003, Warren L. DeLano wrote: >In the script I just posted, I used unit vectors to specify the light >direction and simply rotated that vector by 6 degrees. The first vector >is merely [-0.4,-0.4,-1.0] normalized. The second is that same vector >rotated 6 degrees about the Y axis. > >I then loaded the output into Illustrator and was able to view both >cross-eye and wall-eye stereo pairs with clean shadows. > > > > > > Try using this sequence to create your stereo pair: > > > > set light=[-0.348,-0.348,-0.870] > > ray > > png image1.png > > turn y,6 > > set light=[-0.437,-0.348,-0.902] > > ray > > png image2.png > > turn y,-6 > > > > Cheers, > > Warren ---------------------------------------------------------------------- Anthony Duff Postdoctoral Fellow School of Molecular and Microbial Biosciences Biochemistry Building, G08 University of Sydney, NSW 2006 Australia Phone. 61-2-9351-7817 Fax. 61-2-9351-4726 ---------------------------------------------------------------------- ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ PyMOL-users mailing list PyMOL-users@... https://lists.sourceforge.net/lists/listinfo/pymol-users ```