Tsjerk,
Hope you are doing fine.
I was toying with your graph.py script.
I am trying to mod it to generate solid cube.( display triangles instead
of lines)
Could you toss an example how to add triangle inside your graph.py? 
I could not find details in the docs. It appears pymol needs normals for
all vertex. This kind of strange as opposed to one for each triangle.
Thanks for you help!

--Amit
 

-----Original Message-----
From: Tsjerk Wassenaar [mailto:t.a.wassen...@chem.rug.nl] 
Sent: Tuesday, May 25, 2004 1:04 AM
To: a...@sdsc.edu
Subject: Re: [PyMOL] 3d plotting in pymol


Hi Amit,

Well, that was my mistake.., I took adding the cmd.extend() a bit too
light-hearted, but I forgot to then parse the (string) elements on the
command line. So, for the size and radius these are trivial, but the
list arguments are a bit more extensive to parse in five minutes of
debugging ;) I have to do that later. You can for now try to use it as a
function graph(selection,shape,....etc) That should work.

I deliberately tried to progam it in such a way that it would be easy to
add new shapes and in a later stage also adapt coloring and such. I can
imagine it would be nice to be able to color according to coordinate,
b-factor, whatever.

But I hope this will do for now :)

Good luck,

Tsjerk

Amit Chourasia wrote:

>Tsjerk,
>This is what I tried
>
>1) load a small pdb files (10 atoms)
>2) run graph.py
>3) graph  all, star, 1, 0.10,[1,0,0], 
>[0,0,1],[[1,0,0],[0,1,0],[0,0,1]],
>"graph"
>
>This is what I am getting
>*************************************
>Traceback (most recent call last):
>  File "C:\Program Files\PyMOL/modules\pymol\parser.py", line 139, in
parse
>    result=apply(kw[nest][0],args[nest],kw_args[nest])
>  File "C:/Documents and Settings/amit/Desktop/graph.py", line 230, in 
>graph
>
>obj.extend(shapefunctions[shape](sel.atom[i].coord,size,r,rgb1,rgb2,mtx
>))
>  File "C:/Documents and Settings/amit/Desktop/graph.py", line 58, in
star
>    i[0] = mvmult(mtx,i[0])
>  File "C:/Documents and Settings/amit/Desktop/graph.py", line 7, in
mvmult
>    return [ a[0][0]*b[0]+a[0][1]*b[1]+a[0][2]*b[2],
>TypeError: can't multiply sequence to non-int
>*************************************
>
>Is this something to do with the end of line? Need to use special 
>character for line continuation when line is broken into several lines?
>
>Please let me know
>
>Thanks
>--Amit
>
>
>  
>

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- :)
-- :)   Tsjerk A. Wassenaar, M.Sc.
-- :)   Molecular Dynamics Group
-- :)   Dept. of Biophysical Chemistry
-- :)   University of Groningen
-- :)   Nijenborgh 4
-- :)   9747 AG Groningen
-- :)   The Netherlands
-- :)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- :)
-- :)   Hi! I'm a .signature virus!
-- :)   Copy me into your ~/.signature to help me spread!
-- :)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Reply via email to