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?=20
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
=20
-----Original Message-----
From: Tsjerk Wassenaar [mailto:t.a.wassenaar@...
Sent: Tuesday, May 25, 2004 1:04 AM
To: amit@...
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],=20
>[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=3Dapply(kw[nest][0],args[nest],kw_args[nest])
> File "C:/Documents and Settings/amit/Desktop/graph.py", line 230, in=20
>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] =3D 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=20
>character for line continuation when line is broken into several lines?
>
>Please let me know
>
>Thanks
>--Amit
>
>
> =20
>
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- :)
-- :) 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!
-- :)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|