[PyMOL] python as a satellite virus

2003-04-30 Thread wgscott
Coincidently that was the exact same program that hosed my python 
installation too.



I had set up my computer to run the python based AutoDock Tools
interface to the docking program AutoDock. The installer for this
program puts its own copy of python as a subdirectory in the main
application directory and adds some environment variables to the
.cshrc file. Apparently, some variable created here affected other
python based apps. When I commented these out and opened a new xterm
and ran pymol, everything worked normally.


Moreover, my attempts to re-engineer the AutoDock installation ended in 
a complete morass.  This is a great reason for installation software to 
at least allow you the option of using your already installed system 
python.






Re: [PyMOL] python as a satellite virus

2003-04-30 Thread Terry M. Gray

At 10:50 AM -0700 4/30/03, wgsc...@chemistry.ucsc.edu wrote:
Coincidently that was the exact same program that hosed my python 
installation too.



I had set up my computer to run the python based AutoDock Tools
interface to the docking program AutoDock. The installer for this
program puts its own copy of python as a subdirectory in the main
application directory and adds some environment variables to the
.cshrc file. Apparently, some variable created here affected other
python based apps. When I commented these out and opened a new xterm
and ran pymol, everything worked normally.


Moreover, my attempts to re-engineer the AutoDock installation ended 
in a complete morass.  This is a great reason for installation 
software to at least allow you the option of using your already 
installed system python.


Here's what I told my students. It seemed like a reasonable solution.

_

It appears that the problem was introduced by the installation of 
ADT. The ADT installer puts some lines in your .cshrc file that 
prevents pymol from working properly.  So here is a solution that 
worked for me.


Take out the ADT lines and put them into a separate text file--say 
call it ADTenv.csh. If you open a new xterm, pymol should not work 
properly.


If you want to run ADT, open a new xterm and source ADTenv.csh (no 
quotes). Then run adt (no quotes) from this window.

_

Although I didn't try it, I assume that you can't run pymol from that 
xterm once you've run the ADTenv.csh script.


TG
--
_
Terry M. Gray, Ph.D., Computer Support Scientist
Chemistry Department, Colorado State University
Fort Collins, Colorado  80523
gr...@lamar.colostate.edu  http://www.chm.colostate.edu/~grayt/
phone: 970-491-7003 fax: 970-491-1801



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

2003-04-30 Thread Warren L. DeLano
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:war...@delanoscientific.com
Warren L. DeLano, Ph.D. 
Principal
DeLano Scientific LLC
Voice (650)-346-1154 
Fax   (650)-593-4020
 

-Original Message-
From: pymol-users-ad...@lists.sourceforge.net
[mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of Anthony
Duff
Sent: Tuesday, April 29, 2003 9:08 PM
To: pymol-users@lists.sourceforge.net
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

2003-04-30 Thread Warren L. DeLano
(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:war...@delanoscientific.com
Warren L. DeLano, Ph.D. 
Principal
DeLano Scientific LLC
Voice (650)-346-1154 
Fax   (650)-593-4020
 

-Original Message-
From: pymol-users-ad...@lists.sourceforge.net
[mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of Warren L.
DeLano
Sent: Wednesday, April 30, 2003 1:54 PM
To: 'Anthony Duff'; pymol-users@lists.sourceforge.net
Cc: f.h.j.van.hoe...@chem.rug.nl
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:war...@delanoscientific.com
Warren L. DeLano, Ph.D. 
Principal
DeLano Scientific LLC
Voice (650)-346-1154 
Fax   (650)-593-4020
 

-Original Message-
From: pymol-users-ad...@lists.sourceforge.net
[mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of Anthony
Duff
Sent: Tuesday, April 29, 2003 9:08 PM
To: pymol-users@lists.sourceforge.net
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users




RE: [PyMOL] surface

2003-04-30 Thread Warren L. DeLano
Molecular (a discrete approximation to the Connolly surface).
 
--
mailto:war...@delanoscientific.com
Warren L. DeLano, Ph.D. 
Principal
DeLano Scientific LLC
Voice (650)-346-1154 
Fax   (650)-593-4020

-Original Message-
From: pymol-users-ad...@lists.sourceforge.net
[mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of Dennis
Wolan
Sent: Tuesday, April 29, 2003 2:42 PM
To: pymol-users@lists.sourceforge.net
Subject: [PyMOL] surface

Dear all,

This has probably been asked a thousand times, but is the default
surface representation a molecular surface or a solvent accessible
surface? 

Thanks in advance,

Dennis