Logo Search packages:      
Sourcecode: pymol version File versions

def pymol::rpc::rpcCylinder (   end1,
  end2,
  rad,
  color1,
  id = 'cgo',
  color2 = None,
  extend = 1 
)

create a cylinder

  Arguments:
    end1: a 3 tuple with the position of end1 of the sphere
    end2: a 3 tuple with the position of end1 of the sphere
    rad: a float with the radius
    color1: a 3 tuple with the color of end1 of the sphere. (1,1,1) is white
    id: (OPTIONAL) the name of the object to be created
    color2: (OPTIONAL) a 3 tuple with the color of end2 of the sphere. (1,1,1) is white
    extend: (OPTIONAL) if this is nonzero, the object will be cleared
      before adding the new sphere.  Otherwise the sphere is appended
      to the ojbect

  NOTE: the reason that color2 follows id is that I think clients are
  going to be interested in setting the id more often than they are going
  to care about the second color.
  

Definition at line 143 of file rpc.py.

00143                                                                    :
  """ create a cylinder

    Arguments:
      end1: a 3 tuple with the position of end1 of the sphere
      end2: a 3 tuple with the position of end1 of the sphere
      rad: a float with the radius
      color1: a 3 tuple with the color of end1 of the sphere. (1,1,1) is white
      id: (OPTIONAL) the name of the object to be created
      color2: (OPTIONAL) a 3 tuple with the color of end2 of the sphere. (1,1,1) is white
      extend: (OPTIONAL) if this is nonzero, the object will be cleared
        before adding the new sphere.  Otherwise the sphere is appended
        to the ojbect

    NOTE: the reason that color2 follows id is that I think clients are
    going to be interested in setting the id more often than they are going
    to care about the second color.
    
  """
  global cgoDict
  
  if color2 is None: color2 = color1
  r1,g1,b1 = color1
  r2,g2,b2 = color2
  x1,y1,z1 = end1
  x2,y2,z2 = end2
  if extend:
    obj = cgoDict.get(id,[])
  else:
    obj = []
  obj.extend([cgo.CYLINDER,x1,y1,z1,x2,y2,z2,rad,r1,g1,b1,r2,g2,b2,])
  cgoDict[id] = obj
  cmd.load_cgo(obj,id,1)
  return 1

def rpcShow(objName):


Generated by  Doxygen 1.6.0   Back to index