From: Michael L. <mgl...@gm...> - 2009-07-07 18:45:56
|
Aha! I knew there was a better way of doing this, but I was stuck on a machine that only had an old version of PyMOL. Assuming you're using PyMOL 1.0 or newer, you can just use pseudoatom. To create a sphere of radius 10.0 at the xyz position (50.0,60.0,12.0), just do this: pseudoatom mysphere, pos=[50.0,60.0,12.0], vdw=[10.0] it will appear as a kind of cross at first. to show it as a sphere, type show spheres, mysphere to make it partially transparent, type set sphere_transparency, 0.5, mysphere The sphere that you get will look kind of blocky. You can get a perfect sphere by raytracing, e.g. typing ray If you don't mind the fact that it won't be transparent, you can get a perfect sphere in the normal viewer by typing set sphere_mode, 5 To go back to normal spheres after you've done that, type unset sphere_mode I think this will be easier than the other way I recommended. Cheers, -michael On Tue, Jul 7, 2009 at 1:55 PM, Benjamin Michael Owen <ow...@ma...>wrote: > I'm trying to use a suggestion another pymol user sent to create a sphere > of a specific size in a pdb file. Is this the correct coding? I have no > experience doing any kind of programming so I am not sure if I did this > right. I put the text I entered in in red if that helps anything. > > ben > > create sphere, resi 24 and resi 864 create a new object from resi 864 > > alter sphere, vdw=10.0 # 28.5 > > rebuild # necessary if spheres have already been shown > > show spheres, sphere > > alter_state 1, sphere, x,y,z = 50,60,10 # set desired x,y,z coords > > set sphere_transparency, 0.5, sphere # make it transparent > > zoom > > ray > > > ------------------------------------------------------------------------------ > 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 (PyM...@li...) > Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users > Archives: http://www.mail-archive.com/pym...@li... > -- 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) |