Hi Timo,

I think you may have to switch to a different drawing primitive like TRIANGLES 
or TRIANGLE_STRIP. Since these are closed objects I assume that the enclosing 
area  should be fillable with a color of choice. Unfortunately I have not 
actually had a chance to play with these primitives, so I can't provide any 
docs. Check out \PyMOL\PyMOL\examples\devel\cgo08.py and/or cgo07.py for 
examples of TRIANGLE_STRIPS.

HTH

Carsten

From: Timo Stein [mailto:m...@timo-stein.com]
Sent: Wednesday, July 17, 2013 7:21 AM
To: pymol-users@lists.sourceforge.net
Subject: Re: [PyMOL] Creating coloured and transparent polyhedra

Hi PyMOL users,

thank you for your help. I tried to apply Carsten's suggestions using the 
LINE_STRIP approach. This is what I tested:
from pymol.cgo import *    # get constants
from pymol import cmd

obj = [
LINEWIDTH, 50,
BEGIN, LINE_STRIP,
COLOR, 255, 0, 0,
VERTEX, 11.335700035095215, 7.798659801483154, 7.798659801483154,
VERTEX, 11.335700035095215, 5.352089881896973, 5.352089881896973,
VERTEX, 14.965800285339355, 5.352089881896973, 5.352089881896973,
VERTEX, 14.965800285339355, 7.798659801483154, 7.798659801483154,
VERTEX, 11.335700035095215, 7.798659801483154, 7.798659801483154,
END
   ]

cmd.load_cgo(obj,'cgo01')
where four atoms make up a square. This snippet creates - when called by "run 
<path-to-script>" - four lines between these coordinates I got by using "print 
cmd.get_model('<selection-name>', 1).get_coord_list()". How can I have the the 
area between those four points filled with a colour of my choice and have it be 
partly transparent? The next step would be to create polyhedra with 
corresponding surfaces with atoms spanning a three dimensional object.

Thanks in advance
Timo
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Reply via email to