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




-----Original Message-----
From: pymol-users-ad...@lists.sourceforge.net
[mailto:pymol-users-ad...@lists.sourceforge.net]on Behalf Of Amit
Chourasia
Sent: Monday, May 24, 2004 2:31 PM
To: PyMOL-users@lists.sourceforge.net
Subject: RE: [PyMOL] 3d plotting in pymol


Tsjerk,
        Thanks for providing the script. I was going through the code. It seems 
to
have a a lot of potential for easy expansion.
I am not able to use it though. Could you please provide a little
descriptive documentation for using this.

--Amit



-----Original Message-----
From: Tsjerk Wassenaar [mailto:t.a.wassen...@chem.rug.nl]
Sent: Monday, May 24, 2004 4:59 AM
To: a...@sdsc.edu; PyMOL-users@lists.sourceforge.net
Subject: Re: [PyMOL] 3d plotting in pymol



Hi Amit (and other users),

Here's a script which can be used to put marks on the positions of every
atom in a selection. There are several types of marks included now, e.g.
cube, rhombic dodecahedron, tetrahedron, plus and star. Using a matrix
operator these can be extended a bit, to 2D counterparts for example, or
to elongated or rotated shapes. I should still include some
documentation but in brief the usage is as follows:

graph selection = '(all)', shape = 'plus' | 'sphere' | 'star' |
'tetrahedron' | 'dodecahedron', size = 1, r = 0.10, rgb1 = [1,0,0], rgb2
= [0,0,1], mtx = [[1,0,0],[0,1,0],[0,0,1]], name = "graph"

Selection should be obvious, as is shape. Size is a relative indicator
for the size, though at present I haven't fixed things such that a size
1 tetrahedron matches a size 1 dodecahedron. r is the radius of the
lines. rgb1 and rgb2 are the start and end color for each line. mtx is
the matrix operator, which works on the original shape centered around
the origin (before translation to the point of the atom from the selection).

Hope this already works a bit as wanted. I'll be trying to make it a bit
better in the future ;)

Cheers,

Tsjerk

Amit Chourasia wrote:

>Tsjerk,
>
>Great I'll look forward to see your script.
>By that time I'll also gain some familiarity with Python.
>
>For spline related stuff I found this in archive.
>set ribbon_trace,1
>This will create ribbons for arbitrary atoms, but they should be seperate
>objects if we dont want them connected by one ribbon.
>
>Have a nice time in Rome. I wish to travel to Venice sometime.
>
>Thanks and Regards
>--Amit
>
>
>
>-----Original Message-----
>From: Tsjerk Wassenaar [mailto:t.a.wassen...@chem.rug.nl]
>Sent: Thursday, May 13, 2004 3:04 AM
>To: a...@sdsc.edu
>Subject: Re: [PyMOL] 3d plotting in pymol
>
>
>
>Hi Amit,
>
>This isn't too difficult actually, and I have done something alike
>recently. What it comes down to is to write some python extensions and
>have definitions for the CGO shapes you want to use. Then you can read
>the coordinates for the atoms ( sel =
>cmd.get_selection("selection_string")  and reading coordinates from
>sel.atom[i].coord ) and add these coordinates to your CGO object. Doing
>this for all atoms and loading it back into pymol would give you what
>you want. I'm not completely sure where I have the script I wrote. But I
>can have a look in about a week (when I get back from Rome) and write
>the script if it hasn't been done already (the feature sounds cool
>enough ;) ).
>
>Wouldn't have ideas on the spline at this moment.
>
>Cheers,
>
>Tsjerk
>
>Amit Chourasia wrote:
>
>
>
>>Hi,
>>I am trying to use pymol as a 3d plotting tool.
>>
>>I have few questions
>>
>>1)Is there a way to add represenation in pymol. ?
>>For instance I would like to see the atom as a triangle or nhedron.
>>I was going through CGO objects that looks promising to what I want to
>>accomplish. What I am looking for is to add represenation module and
>>use them.
>>
>>2)Is there a method to represent a group of atoms connected by cartoon
>>even if the chains are not biologically feasable. What I am looking
>>for is you have bunch of points(atoms) through which the ribbon should
>>pass like a spline curve.
>>
>>Any inputs and pointers would be most appreciated.
>>
>>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!
>-- :)
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>
>


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- :)
-- :)   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!
-- :)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users


Reply via email to