Logo Search packages:      
Sourcecode: pymol version File versions

def pymol::rpc::colorObj (   objName,
  colorScheme 
)

sets an molecule's color scheme
  Arguments:
    - objName: the object (molecule) to change
    - colorScheme: name of the color scheme to use
      for the object (should be either 'std' or one of the
      color schemes defined in pymol.utils)

Definition at line 213 of file rpc.py.

00213                                  :
  """ sets an molecule's color scheme
    Arguments:
      - objName: the object (molecule) to change
      - colorScheme: name of the color scheme to use
        for the object (should be either 'std' or one of the
        color schemes defined in pymol.utils)
  """
  if colorScheme:
    if colorScheme == 'std':
      # this is an adaptation of the cbag scheme from util.py, but
      # with a gray carbon.
      cmd.color("magenta","("+objName+")",quiet=1)
      cmd.color("oxygen","(elem O and "+objName+")",quiet=1)
      cmd.color("nitrogen","(elem N and "+objName+")",quiet=1)
      cmd.color("sulfur","(elem S and "+objName+")",quiet=1)
      cmd.color("hydrogen","(elem H and "+objName+")",quiet=1)
      cmd.color("gray","(elem C and "+objName+")",quiet=1)
    elif hasattr(utils,colorScheme):
      fn = getattr(utils,colorScheme)
      fn(objName,quiet=1)
    res = 1
  else:
    res = 0
  return res

def rpcLoadMolBlock(data,objName,colorScheme=''):


Generated by  Doxygen 1.6.0   Back to index