Hi Alastair,

The CGO file should come out something like:

cgo_obj = [
  BEGIN, TRIANGLES, ALPHA, 1.0,
  COLOR, 1.0, 1.0, 1.0,
  NORMAL,   -1.70693,  -11.93375,   23.78227,
  VERTEX,   39.96822,   39.96822,  -36.33474,
  VERTEX,   34.37814,   37.81595,  -37.81595,
  VERTEX,   38.78347,   35.25770,  -38.78347,
  COLOR, 1.0, 1.0, 1.0,
  NORMAL,   -8.49790,   -9.67383,  -13.55758,
  VERTEX,   36.09036,   36.09036,   32.80942,
  VERTEX,   35.67732,   32.43392,   35.67732,
  VERTEX,   32.32192,   35.55411,   35.55411,
  ...
]

and then you can do cmd.load_cgo(...), but that I guess you already
know. Right after the TRIANGLES directive, you can notice the ALPHA
directive, followed by the value for the alpha channel. In this
example it's set to 1.0, so it's completely opaque; lowering it will
make it transparent. I have a simple C program somewhere to convert a
set of triangles specified as vertices and indices into a cgo
representation. If you're interested I can send you that. I've been
able to work with quite large triangulated surfaces with this (4096
triangles, and I think even up to 16384, but that was too slow to work
with).

Hope it helps,

Tsjerk


On Mon, Apr 19, 2010 at 7:09 PM, Alastair Fyfe <[email protected]> wrote:
> Hi,
> I'm using cgos of fairly large triangulated surfaces from other programs
> and was wondering if anyone had guidance regarding the following:
> - the cgo encoding of individual triangles is somewhat bulky and makes
> for huge files which are slow for pymol to load. Is there an
> alternative, more efficient means of cgo input?
> - set cgo-transparency() does not seem to behave as expected, the
> surface remains opaque. Is there a way to specify alpha along with RGB
> for individual triangles or any way to investigate why cgo-transparency
> might not be working?
> - is there a way to have obtain a VDW surface colored by atom name (eg
> N3,N7 etc., not atom type)?
> thanks!
> Alastair
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> PyMOL-users mailing list ([email protected])
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/[email protected]
>



-- 
Tsjerk A. Wassenaar, Ph.D.

post-doctoral researcher
Molecular Dynamics Group
Groningen Institute for Biomolecular Research and Biotechnology
University of Groningen
The Netherlands

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
PyMOL-users mailing list ([email protected])
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/[email protected]

Reply via email to