Re: [PyMOL] CGOs

2014-12-22 Thread Robert Hanson
Great. Thanks very much. The ones perhaps missing there are:

#define CGO_INDENT   0x18
#define CGO_RESET_NORMAL 0x1E
#define CGO_PICK_COLOR   0x1F

And I think

#define CGO_LIGHTING 0x0B50

may be an internal flag, not a CGO command.
--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net___
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

Re: [PyMOL] CGOs

2014-12-22 Thread Schubert, Carsten [JRDUS]
Hi Bob,

a while back I attempted to document the CGO capabilities, but never finished 
it. Attached is a bit of a write-up from that attempt.

Hope it helps somewhat.

Carsten

From: Robert Hanson [mailto:hans...@stolaf.edu]
Sent: Monday, December 22, 2014 12:27 PM
To: David Hall
Cc: pymol-users
Subject: Re: [PyMOL] CGOs

OK, that explains it. I think I made that one up. It was a while ago that I 
worked on this. :)
I see the list at 
https://github.com/speleo3/pymol/blob/master/modules/pymol/cgo.py
Thanks​, David.
Bob
# CGO documentation
This documentation will attempt to shed some light on the syntax and provide
usage examples for each of the individual CGO primitives and if possible the
drawing directives

The module PyMOL\modules\pymol\cgo.py defines the following symbols,
which seem to be the current supported primitives in PyMOL. 

POINTS = 0.0
LINES  = 1.0
LINE_LOOP  = 2.0
LINE_STRIP = 3.0
TRIANGLES  = 4.0
TRIANGLE_STRIP = 5.0
TRIANGLE_FAN   = 6.0
#QUADS  = 7.0
#QUAD_STRIP = 8.0
#POLYGON= 9.0   
 

STOP   =  0.0
NULL   =  1.0
BEGIN  =  2.0
END=  3.0
VERTEX =  4.0
NORMAL =  5.0
COLOR  =  6.0
SPHERE =  7.0
TRIANGLE   =  8.0
CYLINDER   =  9.0
LINEWIDTH  = 10.0
WIDTHSCALE = 11.0
ENABLE = 12.0
DISABLE= 13.0
SAUSAGE= 14.0
CUSTOM_CYLINDER= 15.0
DOTWIDTH   = 16.0
ALPHA_TRIANGLE = 17.0
ELLIPSOID  = 18.0

#SHAPE_VERTEX   = 16.0
#SHAPE_COLOR= 17.0
#SHAPE_NORMAL   = 18.0

FONT   = 19.0
FONT_SCALE = 20.0
FONT_VERTEX= 21.0
FONT_AXES  = 22.0

CHAR   = 23.0

ALPHA  = 25.0
QUADRIC= 26.0 # NOTE: Only works with ellipsoids and disks
CONE   = 27.0 

LIGHTING   = float(0x0B50)

Header 
== 

The following header lines must be defined to import the required symbols
into the internal python interpreter:

from pymol.cgo import *
from pymol import cmd

Syntax
==

The syntax for most of the primitives seems to be of the form
PRIMITIVE ARG1 ARG2 ... ARGn

were ARG1-ARGn are the required arguments. In reality these primitives are
nothing but numbers, which represent drawing directives for the internal
OpenGL renderer and the interal raycaster. Usually they are assembled in a
list, also called a CGO object. This list can either be assembled by hand or
generated by code. In the case of "hand-assembly" into a python list the
primitives and individual arguments are comma separated. In the case of code
generated primitives the usual python list manipulation methods can be used
as well.

Example (cgo01.py from PyMOL\examples\devel)

 cgo01.py ##
from pymol.cgo import *
from pymol import cmd

# this is a trivial example of creating a cgo object consisting of a
# a single state 

# first we create a list of floats containing a GL rendering stream

obj = [
   BEGIN, LINES,# inline comments are allowed
   COLOR, 1.0, 1.0, 1.0,# white color
   
   VERTEX, 0.0, 0.0, 0.0,   # origin at (0,0,0)
   VERTEX, 1.0, 0.0, 0.0,   # extend line one unit in x
   
   VERTEX, 0.0, 0.0, 0.0,   # origin at (0,0,0)
   VERTEX, 0.0, 2.0, 0.0,   # extend line two units in y
   
   VERTEX, 0.0, 0.0, 0.0,   # origin at (0,0,0)
   VERTEX, 0.0, 0.0, 3.0,   # extend line three units in z

   END
   ]

# then we load it into PyMOL ads the object 'cgo01'

cmd.load_cgo(obj,'cgo01')

# move the read clipping plane back a bit to that that is it brighter

cmd.clip('far',-5)
 END cgo01.py ##

The whole object could have also been defined as:

obj =[2.0, 1.0, 6.0, 1.0, 1.0, 1.0, 4.0, 0.0, 0.0, 0.0, 4.0, 1.0, 0.0, 0.0,
4.0, 0.0, 0.0, 0.0, 4.0, 0.0, 2.0, 0.0, 4.0, 0.0, 0.0, 0.0, 4.0, 0.0, 0.0,
3.0, 3.0]

but much less readable.

Color
=
The color of CGO objects is set by the COLOR command and it has the form

COLOR, r,g,b,

where r g and b are floating point numbers ranging from 0.0 to 1.0 for each
of the red, green and blue channels of a colour. You may be familiar with RGB
colourspace expressed in different ways for example as integers 0 to 255
(RGB-255) or percentages (RGB-100). So you may have to do a simple numeric
conversion to get your favourite colours.


Lines
=

The LINES command draws a lines between a set of coordinates defined by the
VERTEX command. The colour of the lines can be changed at any time even
between vertices, so that the start and end line color can be different. The
color of the line will be interpolated between the start and end color. The
thickness of the line is set by LINEWIDTH. However ther

Re: [PyMOL] CGOs

2014-12-22 Thread Robert Hanson
OK, that explains it. I think I made that one up. It was a while ago that I
worked on this. :)
I see the list at
https://github.com/speleo3/pymol/blob/master/modules/pymol/cgo.py

Thanks​, David.

Bob
--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net___
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

Re: [PyMOL] CGOs

2014-12-22 Thread Benjamin Barad
I am not sure where the LINE command is coming in, but when I have worked
with CGO I have done "BEGIN LINES COLOR cr cg cb VERTEX x1 y1 z1 VERTEX x2
y2 z2".

On Mon Dec 22 2014 at 8:56:29 AM David Hall  wrote:

> where are you getting this from? I don’t see a LINE command in
> pymol/modules/cgo.py
>
> -David
>
>
>
> On Dec 22, 2014, at 11:40 AM, Robert Hanson  wrote:
>
> OK. I will look at the PyMOL code if I need to. For instance:
>
> LINE  has eight parameters. I don't know what the first two are.
>
> LINE ? ? x1 y1 z1  x2 y2 z2
>
>
>
>
> On Sun, Dec 21, 2014 at 3:17 PM, Tsjerk Wassenaar 
> wrote:
>
>> Hi Bob,
>>
>> Unfortunately, there is little documentation on CGO objects. You can have
>> a look in modules/cgo.py and in the example scripts in examples/devel/ in
>> the pymol directory to get some more information. If there is something
>> specific you want to do, please let us know.
>>
>> Cheers,
>>
>> Tsjerk
>>
>>
>> On Sun, Dec 21, 2014 at 9:57 PM, Robert Hanson 
>> wrote:
>>>
>>> I'm looking for something that is relatively comprehensive. There are
>>> far more commands than VERTEX, CYLINDER, CONE, and SPHERE, I think.
>>>
>>>
>>>
>>> --
>>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>>> with Interactivity, Sharing, Native Excel Exports, App Integration & more
>>> Get technology previously reserved for billion-dollar corporations, FREE
>>>
>>> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&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
>>>
>>
>>
>> --
>> Tsjerk A. Wassenaar, Ph.D.
>>
>>
>
>
> --
> Robert M. Hanson
> Larson-Anderson Professor of Chemistry
> Chair, Department of Chemistry
> St. Olaf College
> Northfield, MN
> http://www.stolaf.edu/people/hansonr
>
>
> If nature does not answer first what we want,
> it is better to take what answer we get.
>
> -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
>
>
> --
> Dive into the World of Parallel Programming! The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now.
> http://goparallel.sourceforge.net___
> 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
>
>
> 
> --
> Dive into the World of Parallel Programming! The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net
> ___
> 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
--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net___
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

Re: [PyMOL] CGOs

2014-12-22 Thread David Hall
where are you getting this from? I don’t see a LINE command in 
pymol/modules/cgo.py 

-David



> On Dec 22, 2014, at 11:40 AM, Robert Hanson  wrote:
> 
> OK. I will look at the PyMOL code if I need to. For instance:
> 
> LINE  has eight parameters. I don't know what the first two are.
> 
> LINE ? ? x1 y1 z1  x2 y2 z2
> 
> 
> 
> 
> On Sun, Dec 21, 2014 at 3:17 PM, Tsjerk Wassenaar  > wrote:
> Hi Bob,
> 
> Unfortunately, there is little documentation on CGO objects. You can have a 
> look in modules/cgo.py and in the example scripts in examples/devel/ in the 
> pymol directory to get some more information. If there is something specific 
> you want to do, please let us know.
> 
> Cheers,
> 
> Tsjerk
> 
> 
> On Sun, Dec 21, 2014 at 9:57 PM, Robert Hanson  > wrote:
> I'm looking for something that is relatively comprehensive. There are far 
> more commands than VERTEX, CYLINDER, CONE, and SPHERE, I think. 
> 
> 
> --
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&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 
> 
> 
> 
> -- 
> Tsjerk A. Wassenaar, Ph.D.
> 
> 
> 
> 
> -- 
> Robert M. Hanson
> Larson-Anderson Professor of Chemistry
> Chair, Department of Chemistry
> St. Olaf College
> Northfield, MN
> http://www.stolaf.edu/people/hansonr 
> 
> 
> If nature does not answer first what we want,
> it is better to take what answer we get. 
> 
> -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
> 
> --
> Dive into the World of Parallel Programming! The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. 
> http://goparallel.sourceforge.net___
>  
> 
> 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 
> 
--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net___
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

Re: [PyMOL] CGOs

2014-12-22 Thread Robert Hanson
OK. I will look at the PyMOL code if I need to. For instance:

LINE  has eight parameters. I don't know what the first two are.

LINE ? ? x1 y1 z1  x2 y2 z2




On Sun, Dec 21, 2014 at 3:17 PM, Tsjerk Wassenaar  wrote:

> Hi Bob,
>
> Unfortunately, there is little documentation on CGO objects. You can have
> a look in modules/cgo.py and in the example scripts in examples/devel/ in
> the pymol directory to get some more information. If there is something
> specific you want to do, please let us know.
>
> Cheers,
>
> Tsjerk
>
>
> On Sun, Dec 21, 2014 at 9:57 PM, Robert Hanson  wrote:
>>
>> I'm looking for something that is relatively comprehensive. There are far
>> more commands than VERTEX, CYLINDER, CONE, and SPHERE, I think.
>>
>>
>>
>> --
>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>> with Interactivity, Sharing, Native Excel Exports, App Integration & more
>> Get technology previously reserved for billion-dollar corporations, FREE
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&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
>>
>
>
> --
> Tsjerk A. Wassenaar, Ph.D.
>
>


-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Department of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net___
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

Re: [PyMOL] CGOs

2014-12-21 Thread Tsjerk Wassenaar
Hi Bob,

Unfortunately, there is little documentation on CGO objects. You can have a
look in modules/cgo.py and in the example scripts in examples/devel/ in the
pymol directory to get some more information. If there is something
specific you want to do, please let us know.

Cheers,

Tsjerk


On Sun, Dec 21, 2014 at 9:57 PM, Robert Hanson  wrote:
>
> I'm looking for something that is relatively comprehensive. There are far
> more commands than VERTEX, CYLINDER, CONE, and SPHERE, I think.
>
>
>
> --
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&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
>


-- 
Tsjerk A. Wassenaar, Ph.D.
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&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

Re: [PyMOL] CGOs

2014-12-21 Thread Robert Hanson
I'm looking for something that is relatively comprehensive. There are far
more commands than VERTEX, CYLINDER, CONE, and SPHERE, I think.
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&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

Re: [PyMOL] CGOs

2014-12-21 Thread Osvaldo Martin
Hi Robert,

I do not have a proper answer to your question, but two other resources to
try to learn about CGO in PyMOL are.

http://www.pymolwiki.org/index.php/Category:CGO
the folder  examples/devel/ in your PyMOL installation


On Sun, Dec 21, 2014 at 3:06 PM, Robert Hanson  wrote:

> Happy holidays!
>
> Q: Is there a resource that describes the syntax for compiled graphical
> objects in PyMOL?
>
> I see http://pymol.sourceforge.net/newman/user/S0500cgo.html, but that is
> pretty minimal.
>
> Bob
>
>
>
> --
> Robert M. Hanson
> Larson-Anderson Professor of Chemistry
> Chair, Department of Chemistry
> St. Olaf College
> Northfield, MN
> http://www.stolaf.edu/people/hansonr
>
>
> If nature does not answer first what we want,
> it is better to take what answer we get.
>
> -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
>
>
>
> --
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&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
>
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&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

[PyMOL] CGOs

2014-12-21 Thread Robert Hanson
Happy holidays!

Q: Is there a resource that describes the syntax for compiled graphical
objects in PyMOL?

I see http://pymol.sourceforge.net/newman/user/S0500cgo.html, but that is
pretty minimal.

Bob



-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Department of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&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

RE: [PyMOL] CGOs, where to start?

2003-07-10 Thread Warren L. DeLano
Felix,

> I've read over the manual, and I think I understand the principle
behind a
> CGO.  What I would like to do is generate  a wall-&-floor type
background
> for an animation I'm putting together.  I've followed the example
given by
> David Cooper
(http://ginsberg.med.virginia.edu/~dcoop/Help/morph.html),
> and
> I like the simple triangle formulation.  I still have some questions,
> though:
> 
> 1.  How do I position the CGO relative to other objects (it looks like
> trial
> and error to me)?

Yes, trial and error at present (unfortunately).  CGO Mouse dragging is
in the future, but you can drag the molecule relative to the CGO if
you're simply creating a figure.

> 2.  Is the coloring just the 3-number RGB code (which I always thought
was
> 0-255, 0-255, 0-255, but David has it as 0-1,0-1,0-1)?

PyMOL uses 0-1 internally, hence the choice of these values.

> 3.  Is there a repository of sample CGO's that I could use/look at/be
> inspired by?

That's a great idea, but no, it doesn't exist yet.


Cheers,

Warren





[PyMOL] CGOs, where to start?

2003-07-10 Thread Vajdos, Felix
As a novice to CGOs, I am turning to the Pymol power users out there to help
me get started.  

I've read over the manual, and I think I understand the principle behind a
CGO.  What I would like to do is generate  a wall-&-floor type background
for an animation I'm putting together.  I've followed the example given by
David Cooper (http://ginsberg.med.virginia.edu/~dcoop/Help/morph.html), and
I like the simple triangle formulation.  I still have some questions,
though:

1.  How do I position the CGO relative to other objects (it looks like trial
and error to me)?
2.  Is the coloring just the 3-number RGB code (which I always thought was
0-255, 0-255, 0-255, but David has it as 0-1,0-1,0-1)?
3.  Is there a repository of sample CGO's that I could use/look at/be
inspired by?

Thanks!
Felix

Felix Vajdos
Research Scientist
Pfizer Inc
Eastern Point Road
Groton, CT  06340

860-715-6504



LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be 
privileged. It is intended for the addressee(s) only. Access to this E-mail by 
anyone else is unauthorized. If you are not an addressee, any disclosure or 
copying of the contents of this E-mail or any action taken (or not taken) in 
reliance on it is unauthorized and may be unlawful. If you are not an 
addressee, please inform the sender immediately.



RE: [PyMOL] CGOs and TRIANGLE primitive

2003-06-04 Thread Mike Brown
Thanks for taking the time to answer. I understand the concepts of blending
normals and the importance of vertex ordering in terms of normal generation.

Is vertex ordering important to PyMol CGOs  (after normals have already been
generated).?

My ray traced images look good, however, they can only be displayed during
ray tracing.

If you have time, can you give me an example of a triangle primitive (not
begin, triangles, end) that can be displayed without having to ray trace
it

The point is, I would like to be able to see the surface while I am rotating
it.  Thanks again. - Mike

-Original Message-
From: Warren L. DeLano [mailto:war...@delanoscientific.com]
Sent: Tuesday, June 03, 2003 6:15 PM
To: 'Mike Brown'; pymol-users@lists.sourceforge.net
Subject: RE: [PyMOL] CGOs and TRIANGLE primitive


Mike,

Triangle rendering isn't as simple as you might think -- you
need to make sure your triangles have the correct handedness (vertex
ordering), and if you are trying to create a surface, then you need to
blend the normals at each vertex.

I left transparent CGOs out of this release...perhaps in the
next version -- I'll need to in order to make cartoons transparent,
which is a planned enhancement.  For now, you're probably out of luck,
unless you call OpenGL Directly via PyOpenGL.

Cheers,
Warren


--
mailto:war...@delanoscientific.com
Warren L. DeLano
Principal Scientist
DeLano Scientific LLC
Voice (650)-346-1154
Fax   (650)-593-4020

-Original Message-
From: pymol-users-ow...@lists.sourceforge.net
[mailto:pymol-users-ow...@lists.sourceforge.net] On Behalf Of Mike Brown
Sent: Sunday, June 01, 2003 11:26 AM
To: pymol-users@lists.sourceforge.net
Subject: [PyMOL] CGOs and TRIANGLE primitive

I am developing software for lead optimization that analyzes the
differences
between multiple enzymes implicated in drug targets.  I wanted to
implement
some method for visualization of these differences and PyMol seemed like
an
ideal tool for rendering since it is already capable of displaying
molecular
structures and accepts outside graphics objects.

I am having trouble rendering triangulated surfaces using CGO's however
(Please know that I am no expert in computer graphics).  When the CGO
contains the triangles/normals in the BEGIN, TRIANGLES, ... , END
format,
the surface is displayed, but is very "angular" and ray tracing does not
smooth the edges.  When the CGO uses TRIANGLE primitives instead, the
surface is ray traced very nicely, but cannot be seen until it is ray
traced.  When I rotate the surface, it disappears again.

Also, it would be nice if there was a method by which I could make the
surfaces loaded as a CGO transparent.

Any help would be GREATLY appreciated.  Thanks for your time. - Mike



---
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users







RE: [PyMOL] CGOs and TRIANGLE primitive

2003-06-03 Thread Warren L. DeLano
Mike,

Triangle rendering isn't as simple as you might think -- you
need to make sure your triangles have the correct handedness (vertex
ordering), and if you are trying to create a surface, then you need to
blend the normals at each vertex.  

I left transparent CGOs out of this release...perhaps in the
next version -- I'll need to in order to make cartoons transparent,
which is a planned enhancement.  For now, you're probably out of luck,
unless you call OpenGL Directly via PyOpenGL.

Cheers,
Warren


--
mailto:war...@delanoscientific.com
Warren L. DeLano
Principal Scientist
DeLano Scientific LLC
Voice (650)-346-1154 
Fax   (650)-593-4020

-Original Message-
From: pymol-users-ow...@lists.sourceforge.net
[mailto:pymol-users-ow...@lists.sourceforge.net] On Behalf Of Mike Brown
Sent: Sunday, June 01, 2003 11:26 AM
To: pymol-users@lists.sourceforge.net
Subject: [PyMOL] CGOs and TRIANGLE primitive

I am developing software for lead optimization that analyzes the
differences
between multiple enzymes implicated in drug targets.  I wanted to
implement
some method for visualization of these differences and PyMol seemed like
an
ideal tool for rendering since it is already capable of displaying
molecular
structures and accepts outside graphics objects.

I am having trouble rendering triangulated surfaces using CGO's however
(Please know that I am no expert in computer graphics).  When the CGO
contains the triangles/normals in the BEGIN, TRIANGLES, ... , END
format,
the surface is displayed, but is very "angular" and ray tracing does not
smooth the edges.  When the CGO uses TRIANGLE primitives instead, the
surface is ray traced very nicely, but cannot be seen until it is ray
traced.  When I rotate the surface, it disappears again.

Also, it would be nice if there was a method by which I could make the
surfaces loaded as a CGO transparent.

Any help would be GREATLY appreciated.  Thanks for your time. - Mike



---
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users






[PyMOL] CGOs and TRIANGLE primitive

2003-06-01 Thread Mike Brown
I am developing software for lead optimization that analyzes the differences
between multiple enzymes implicated in drug targets.  I wanted to implement
some method for visualization of these differences and PyMol seemed like an
ideal tool for rendering since it is already capable of displaying molecular
structures and accepts outside graphics objects.

I am having trouble rendering triangulated surfaces using CGO's however
(Please know that I am no expert in computer graphics).  When the CGO
contains the triangles/normals in the BEGIN, TRIANGLES, ... , END format,
the surface is displayed, but is very "angular" and ray tracing does not
smooth the edges.  When the CGO uses TRIANGLE primitives instead, the
surface is ray traced very nicely, but cannot be seen until it is ray
traced.  When I rotate the surface, it disappears again.

Also, it would be nice if there was a method by which I could make the
surfaces loaded as a CGO transparent.

Any help would be GREATLY appreciated.  Thanks for your time. - Mike