Ejemplo n.º 1
0
def simple(selection="(all)", _self=cmd):
    cmd = _self
    s = tmp_sele
    cmd.select(s, selection)
    _prepare(s, _self=cmd)
    util.cbc(s, _self=cmd)
    cmd.show("ribbon", s)
    cmd.show(
        "lines", "(byres ((" + s + " & r. CYS+CYX & n. SG) & bound_to (" + s +
        " & r. CYS+CYX & n. SG))) & n. CA+CB+SG")
    # try to show what covalent ligands are connected to...
    cmd.show("sticks", "(" + lig_sele + " and (" + s + ")) extend 2")
    cmd.show(
        "sticks", "byres ((" + lig_sele + " and (" + s +
        ") and not resn ACE+NAC+NME+NH2) extend 1)")
    cmd.hide("sticks", "(" + s + ") and ((not rep sticks) extend 1)")
    cmd.show("sticks", "(" + lig_sele + " and (" + s + ")) extend 2")
    # color by atom if lines or sticks are shown
    util.cnc("(( rep lines or rep sticks or (" + lig_and_solv_sele +
             ")) and (" + s + "))",
             _self=cmd)
    cmd.show("nonbonded", "(" + lig_and_solv_sele + " and (" + s + "))")
    cmd.show("lines", "(" + lig_and_solv_sele + " and (" + s + "))")
    if cmd.count_atoms(s):
        cmd.zoom(s)
    cmd.delete(s)
Ejemplo n.º 2
0
def default(selection="(all)",_self=cmd):
    cmd=_self
    s = tmp_sele
    cmd.select(s,selection)
    _prepare(s,_self=cmd)
    cmd.show("lines",s)
    cmd.show("nonbonded",s)
    color=cmd.get_object_color_index(selection)
    if color<0:
        util.cbag(selection,_self=cmd)
    else:
        util.cnc(selection,_self=cmd)
        cmd.color(str(color),"("+s+") and elem c")
Ejemplo n.º 3
0
def default(selection="(all)", _self=cmd):
    cmd = _self
    s = tmp_sele
    cmd.select(s, selection)
    _prepare(s, _self=cmd)
    cmd.show("lines", s)
    cmd.show("nonbonded", s)
    color = cmd.get_object_color_index(selection)
    if color < 0:
        util.cbag(selection, _self=cmd)
    else:
        util.cnc(selection, _self=cmd)
        cmd.color(str(color), "(" + s + ") and elem c")
Ejemplo n.º 4
0
def simple(selection="(all)",_self=cmd):
    cmd=_self
    s = tmp_sele
    cmd.select(s,selection)
    _prepare(s,_self=cmd)
    util.cbc(s,_self=cmd)
    cmd.show("ribbon",s)
    cmd.show("lines","(byres (("+s+" & r. CYS+CYX & n. SG) & bound_to ("+s+" & r. CYS+CYX & n. SG))) & n. CA+CB+SG")
    # try to show what covalent ligands are connected to...
    cmd.show("sticks","("+lig_sele+" and ("+s+")) extend 2")
    cmd.show("sticks","byres (("+lig_sele+" and ("+s+") and not resn ACE+NAC+NME+NH2) extend 1)")
    cmd.hide("sticks","("+s+") and ((not rep sticks) extend 1)")
    cmd.show("sticks","("+lig_sele+" and ("+s+")) extend 2")
    # color by atom if lines or sticks are shown
    util.cnc("(( rep lines or rep sticks or ("+lig_and_solv_sele+")) and ("+s+"))",_self=cmd)
    cmd.show("nonbonded","("+lig_and_solv_sele+" and ("+s+"))")
    cmd.show("lines","("+lig_and_solv_sele+" and ("+s+"))")
    if cmd.count_atoms(s):
        cmd.zoom(s)
    cmd.delete(s)