Re: [PyMOL] pymol question

2009-07-06 Thread Tsjerk Wassenaar
Hi,

You can draw a CGO circle in the yz plane using:

x1,y1,z1 = -0.1, 0, 0 # start point
r1,g1,b1 = 1,0,0 # color (red)
x2,y2,z2 = 0.1, 0, 0 # end point
r2,g2,b2 = 1,1,0 # color (yellow)
radius = 10
cmd.load_cgo( [ 9.0, x1, y1, z1, x2, y2, z2, radius, r1, g1, b1, r2,
g2, b2 ], "cylinder1" )

To make it transparent, change it to

cmd.load_cgo( [ 25.0, 0.25, 9.0, x1, y1, z1, x2, y2, z2, radius, r1,
g1, b1, r2, g2, b2 ], "cylinder1" )

The 9.0 stands for CYLINDER, but you'd need to 'from pymol.cgo import
*' to be able to use the keywords. Likewise, 25.0 stands for ALPHA,
controlling the transparency. Note that the cylinder may not look
quite round. It will do when you raytrace it. I couldn't find a
setting for cgo display quality...

Anyway, it may be that Micheals suggestion is better, but since the
question was for a cylinder... And with a bit of Python scripting such
a circle could be drawn with a given center and normal axis.

Hope it helps,

Tsjerk

On Tue, Jul 7, 2009 at 12:54 AM, Michael
Lerner wrote:
> I'm sure there's a way to actually draw a circle, but for your particular
> use it might be better to use a sphere. If you're comfortable with python
> scripting, you can use CGO objects. If not, you might do something like
> this:
>
> fetch 1hhp
> create thing, resi 24 and name ca # create a new object from some single
> atom selection
> alter thing, vdw=10.0 # set desired radius
> rebuild # necessary if spheres have already been shown
> show spheres, thing
> alter_state 1, thing, x,y,z = 50,60,10 # set desired x,y,z coords
> set sphere_transparency, 0.5, thing # make it transparent
> zoom
> ray
>
> you can also use something like select + within to select all residues
> within a cutoff, but I got the impression you wanted a nice visualization.
>
>
> Hope that helps,
>
> -michael
>
> On Mon, Jul 6, 2009 at 5:01 PM, Benjamin Michael Owen 
> wrote:
>>
>> Does anyone know how to draw a circle with a given radius in pymol? I have
>> a distance that I want to use to see what residues lie on the end of that
>> radius, but I have no idea how to write the command to draw the circle.
>> Could someone help me please?
>>
>>
>> --
>>
>> ___
>> 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
>
>
>
> --
> Michael Lerner, Ph.D.
> IRTA Postdoctoral Fellow
> Laboratory of Computational Biology NIH/NHLBI
> 5635 Fishers Lane, Room T909, MSC 9314
> Rockville, MD 20852 (UPS/FedEx/Reality)
> Bethesda MD 20892-9314 (USPS)
>
> --
>
> ___
> 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.
Junior UD (post-doc)
Biomolecular NMR, Bijvoet Center
Utrecht University
Padualaan 8
3584 CH Utrecht
The Netherlands
P: +31-30-2539931
F: +31-30-2537623

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have 
the opportunity to enter the BlackBerry Developer Challenge. See full prize 
details at: http://p.sf.net/sfu/blackberry
___
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] CAVER question

2009-07-06 Thread Harry M. Greenblatt

BS"D

Dear All,

  I addressed this question to the CAVER contact address, but it  
bounced.


  I downloaded and tested the latest CAVER plugin on Linux and it  
worked fine.  I also wanted to test this under OSX, but the "readme"  
file says that one needs JRE 1.6, and the latest upgrade to JRE on  
the Mac gave 1.5.0_19-b02-306.   I tried it anyways, and it seems to  
give the initial window, but when it goes to make the  search for a  
cavity it fails claiming that it can't find any.  This was true under  
OSX 10.4.11 and 10.5.7 (same JRE version).  This was the same test  
file that worked on Linux.


Suggestions?

Thanks

Harry

 
-

Harry M. Greenblatt
Associate Staff Scientist
Dept of Structural Biology   harry.greenbl...@weizmann.ac.il
Weizmann Institute of SciencePhone:  972-8-934-3625
Rehovot, 76100   Facsimile:   972-8-934-4159
Israel



--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have 
the opportunity to enter the BlackBerry Developer Challenge. See full prize 
details at: http://p.sf.net/sfu/blackberry___
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] unexpected EOF while parsing

2009-07-06 Thread jouko
I am new to pymol and python.  I have a number of cross
sections of lysozyme.  I want to display them one by one,
color them using a script file that I have written earlier,
and save the image.  I have written a script file that I had
hoped would do this.  I have a couple problems with script
file, but the one that is frustrating me the most is that
immediately after the beginning of for loop pymol says that
there in an unexpected EOF.  The other problem is that when I
try to use the variable pdb, pymol does not use the value of
the variable, but the variable name itself.  I have pasted my
script file below and part of the log file.

from pymol.cgo import *
import colorsys,sys,re
from pymol import cmd

z=-8.153
inc=0.5
Sections=100
for j in range(0, Sections):
 
pdb="c:/Users/jouko/Desktop/Research/Lysozyme/DensityCube_Lysozyme2-4a/DensityCube_Lysozyme2-4a_"
+ str(z) + ".pdb"
  load pdb
  @c:/b_color8.plm
  png pdb
  delete pdb
  z=z+inc


PyMOL>@c:/Users/jouko/CrossSections.plm
PyMOL>from pymol.cgo import *
PyMOL>import colorsys,sys,re
PyMOL>from pymol import cmd
PyMOL>z=-8.153
PyMOL>inc=0.5
PyMOL>Sections=100
PyMOL>for j in range(o, Sections):
Traceback (most recent call last):
 File "C:\Program Files\DeLano
Scientific\PyMOL/modules\pymol\parser.py", line 256, in parse
   exec(layer.com2+"\n",self.pymol_names,self.pymol_names)
 File "", line 1
for j in range(o, Sections):
^
SyntaxError: unexpected EOF while parsing
PyMOL>pdb="c:/Users/jouko/Desktop/Research/Lysozyme/DensityCube_Lysozyme2-4a/DensityCube_Lysozyme2-4a_"
+ str(z) + ".pdb"
PyMOL>load pdb
ExecutiveProcessPDBFile-Error: Unable to open file 'pdb'.

Thanks in advance for your advice.


Jouko

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have 
the opportunity to enter the BlackBerry Developer Challenge. See full prize 
details at: http://p.sf.net/sfu/blackberry
___
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] pymol question

2009-07-06 Thread Michael Lerner
I'm sure there's a way to actually draw a circle, but for your particular
use it might be better to use a sphere. If you're comfortable with python
scripting, you can use CGO objects. If not, you might do something like
this:

fetch 1hhp
create thing, resi 24 and name ca # create a new object from some single
atom selection
alter thing, vdw=10.0 # set desired radius
rebuild # necessary if spheres have already been shown
show spheres, thing
alter_state 1, thing, x,y,z = 50,60,10 # set desired x,y,z coords
set sphere_transparency, 0.5, thing # make it transparent
zoom
ray

you can also use something like select + within to select all residues
within a cutoff, but I got the impression you wanted a nice visualization.


Hope that helps,

-michael

On Mon, Jul 6, 2009 at 5:01 PM, Benjamin Michael Owen
wrote:

> Does anyone know how to draw a circle with a given radius in pymol? I have
> a distance that I want to use to see what residues lie on the end of that
> radius, but I have no idea how to write the command to draw the circle.
> Could someone help me please?
>
>
> --
>
> ___
> 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
>



-- 
Michael Lerner, Ph.D.
IRTA Postdoctoral Fellow
Laboratory of Computational Biology NIH/NHLBI
5635 Fishers Lane, Room T909, MSC 9314
Rockville, MD 20852 (UPS/FedEx/Reality)
Bethesda MD 20892-9314 (USPS)
--
___
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] pymol question

2009-07-06 Thread Benjamin Michael Owen
Does anyone know how to draw a circle with a given radius in pymol? I have a distance that I want to use to see what residues lie on the end of that radius, but I have no idea how to write the command to draw the circle. Could someone help me please?

--
___
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