Sphere transparency example included below...

ALPHA must preceed COLOR to be effective.

PyMOL does not yet do a global sort of tranparent triangles, so there will
be artifacts in OpenGL.  Raytracing should look fine however.

# from within a .py OR .pym file...

from pymol.cgo import *
from pymol import cmd

obj = [

   ALPHA,  1.0,
   COLOR,  1.0, 1.0, 1.0,
   SPHERE, 0.0, 0.0, 0.0, 0.5, 

   ALPHA,  0.66,
   COLOR,  1.0, 0.0, 0.0,
   SPHERE, 1.0, 0.0, 0.0, 0.5, 

   ALPHA,  0.33,
   COLOR,  0.0, 1.0, 0.0,
   SPHERE, 0.0, 1.0, 0.0, 0.5, 

   ALPHA,  0.11,
   COLOR,  0.0, 0.0, 1.0,
   SPHERE, 0.0, 0.0, 1.0, 0.5, 
]

cmd.load_cgo(obj,'cgo01')

Cheers,
Warren

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

. DeLano Scientific LLC  
. 400 Oyster Point Blvd., Suite 213           
. South San Francisco, CA 94080    
. 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 
> Michael George Lerner
> Sent: Wednesday, November 17, 2004 9:43 AM
> To: pymol-users@lists.sourceforge.net
> Subject: [PyMOL] wire-mesh spheres?
> 
> 
> Hi,
> 
> I want to draw a bunch of spheres of various sizes and 
> colors.  I'm currently using cgos for this.  No problem.  
> Now, I also want to draw wire-mesh spheres.  Does anyone have 
> a script for making these?  While I'm at it, is there a way 
> to make cgos transparent?
> 
> Thanks,
> 
> -Michael
> 
> --
> This isn't a democracy;|                        _  |Michael Lerner
>   it's a cheer-ocracy.  | ASCII ribbon campaign ( ) |   Michigan
> -Torrence,  Bring It On|  - against HTML email  X  |  Biophysics
>                         |                       / \ | mler...@umich
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: InterSystems CACHE FREE 
> OODBMS DOWNLOAD - A multidimensional database that combines 
> robust object and relational technologies, making it a 
> perfect match for Java, C++,COM, XML, ODBC and JDBC. 
> www.intersystems.com/match8 
> _______________________________________________
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
> 



Reply via email to