Logo Search packages:      
Sourcecode: pymol version File versions  Download package

def pmg_tk::skins::normal::volume::Volume::addWithoutGUINow (   self,
  obj,
  data,
  alpha,
  col,
  kind = "triplet" 
)
try:
    if self.list_box==None:
self.update_object_list()
    self.update_listbox()
    idx = self.list_box.get(0,'end')
    if not len(idx): 
return
    idx = idx.index(obj)
except ValueError:
    return

#print "index in list is: %s for object %d" % (obj,idx)
# update the list box
self.list_box.selection_set(idx)
self.setActive()

Definition at line 385 of file volume.py.

                                                                :
        # select the new volume
        #print "--------------------------------------------------------------------------------"
        #print "obj=%s, data=%f, alpha=%d, col=%s, kind=%s" % (obj,data,alpha,str(col),kind)
        #print "--------------------------------------------------------------------------------"
        """
        try:
            if self.list_box==None:
                self.update_object_list()
            self.update_listbox()
            idx = self.list_box.get(0,'end')
            if not len(idx): 
                return
            idx = idx.index(obj)
        except ValueError:
            return

        #print "index in list is: %s for object %d" % (obj,idx)
        # update the list box
        self.list_box.selection_set(idx)
        self.setActive()
        """ 

        ramp, map = self.object_list[obj]

        # plot the data
        X = int((self.COLOR_MAP_WIDTH-2*self.padX) * (data - map.mData) / (map.MData-map.mData))
        if X<0 or X>self.COLOR_MAP_WIDTH-2*self.padX:
            return
        if alpha < 0.0 or alpha > 1.0:
            return
        """
        self.active_ramp.removePoint(200)
        self.active_ramp.removePoint(210)
        self.active_ramp.removePoint(220)
        """
        if kind=="single":
            ramp.addColor(X, (col[0], col[1], col[2], alpha))
        else:
            diff=2
            ramp.addColor(X, (col[0], col[1], col[2], 0))
            ramp.addColor(X+diff, (col[0], col[1], col[2], alpha))
            ramp.addColor(X+2*diff, (col[0], col[1], col[2], 0))


Generated by  Doxygen 1.6.0   Back to index