Dear pymol users,

 

Probably it is an easy to solve problem that I have with pymol, but I couldn’t find any help on the internet on it this far. What I am trying to do is the following:

 

I am using a java program to create a simple pymol script which displays some spheres in pymol. The preliminary created python-script looks like this:

 

from pymol.cgo import *

from pymol import cmd

 

spherelist = [

                COLOR,                0.000,    1.000,    1.000,    SPHERE,               19.041, 22.485, 16.323, 1.0,

                COLOR,                0.000,    1.000,    1.000,    SPHERE,               18.987, 20.458, 17.797, 1.0,

                COLOR,                0.000,    1.000,    0.000,    SPHERE,               26.90574,            21.20171,            18.23115,            1.0,

                COLOR,                1.000,    0.500,    0.000,    SPHERE,               25.94383,            23.29517,            13.85017,            1.0,

                ]

 

cmd.load_cgo(spherelist, 'segment',   1)

 

so I am creating a list of spheres where each sphere has a color, location and a radius. I would like to have every sphere labeled in this spherelist, such that the label that is written in the script is shown next to the spheres in pymol Is there an easy way to do this? If possible without running through the whole list again. So the best would be that I define the label of the sphere directly where it is created, but I can’t figure out how.

 

I really appreciate any help on this issue! Thx J

 

Alexander Schmitz