Hey Fellow PyMolers,
    I should be able to figure this out but I simply haven't after much
fiddling and googling.  I'm trying to create a cell surface for a cover
figure and in Molscript I usually did this by making a PDF file with a
single atom, rendering it in CPK, and then blowing its atom_radius way up to
several thousand angstroms to create a slightly curved surface on which
molecules could be positioned.

I'm trying this in PyMol and can't figure out the command sequence.
Basically, how do I alter the radius for a single atom, especially because I
don't want all atoms I draw as a surface to have the same radius?

Alternatively I've been trying to do this with the CGO utility using one of
Gareth's scripts I found on the web:

from pymol.cgo import *
from pymol import cmd

def cgo_sphere(x,y,z,r,name="cgo_sphere"):

    # Create a CGO object
    obj = [
        SPHERE, float(x), float(y), float(z), float(r)
    ]

    # Load it into PyMOL
    cmd.load_cgo(obj,name)

# Add to PyMOL API
cmd.extend("cgo_sphere",cgo_sphere)


But in adding these lines sequentially to the PyMol command line, or running
it as a script, it fails at:

def cgo_sphere(x,y,z,r,name="cgo_sphere"):

and I get the following error message

def cgo_sphere(x,y,z,r,name="cgo_sphere"):
Traceback (most recent call last):
  File 
"/Users/delwarl/pymol/products/MacPyMOL.app/pymol/modules/pymol/parser.py",
line 144, in parse
    exec(com2[nest]+"\n",pymol_names,pymol_names)
  File "<string>", line 1
     def cgo_sphere(x,y,z,r,name="cgo_sphere"):
                                               ^
 SyntaxError: unexpected EOF while parsing


Is there some other way the script is supposed to be used. . .I'm using
MacPyMol 0.95.

Thanks for any tips/help.
        Tony



Reply via email to