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<mglerner+sourcefo...@gmail.com> 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 <owe...@marshall.edu>
> 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

Reply via email to