Logo Search packages:      
Sourcecode: pymol version File versions

def pymol::rpc::rpcSphere (   pos,
  rad,
  color,
  id = 'cgo',
  extend = 1 
)

create a sphere

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

Definition at line 118 of file rpc.py.

00118                                               :
  """ create a sphere

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

  """
  r,g,b = color
  x,y,z = pos
  if extend:
    obj = cgoDict.get(id,[])
  else:
    obj = []
  obj.extend([cgo.COLOR,r,g,b,cgo.SPHERE,x,y,z,rad])
  cgoDict[id] = obj
  cmd.load_cgo(obj,id,1)
  return 1


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


Generated by  Doxygen 1.6.0   Back to index