Code Duplication    Length = 26-28 lines in 2 locations

rna_tools/tools/PyMOL4RNA/libs/pymol_daslab.py 2 locations

@@ 215-242 (lines=28) @@
212
def render_x():
213
  rx()
214
215
def rj():
216
  """
217
  rhiju's residue-level favorite coloring of proteins
218
  """
219
  cmd.bg_color( "white" )
220
  AllObj=cmd.get_names("all")
221
222
  for x in AllObj:
223
    #print(AllObj[0],x)
224
    print(x)
225
    cmd.show( "cartoon", x )
226
    #cmd.hide( "line", x )
227
    cmd.show( "line", x )
228
    cmd.color( "gray", x+" and resn trp+phe+ala+val+leu+ile+pro+met" )
229
    cmd.color( "orange", x+" and resn gly" )
230
    cmd.color( "red", x+" and resn asp+glu" )
231
    cmd.color( "blue", x+" and resn lys+arg+his" )
232
    cmd.color( "purple", x+" and resn cys" )
233
    cmd.color( "forest", x+" and resn tyr+thr+ser+gln+asn" )
234
    #cmd.spectrum( "count", "rainbow", x+" and name CA" )
235
    cmd.show( "sticks", x +" and not elem H and not name C+N+O" )
236
    cmd.show( "sticks", x +" and resn PRO and name N" )
237
    cmd.hide( "sticks", x + " and name NR+CR+CS+CP+CQ" )
238
    cmd.show( "sticks", x + " and not elem H and neighbor name NR+CQ+CR+CS+CP" )
239
  cmd.set( "cartoon_rect_length", 0.75 )
240
  cmd.set( "cartoon_rect_width", 0.1 )
241
  cmd.set( "cartoon_oval_length", 0.6 )
242
  cmd.set( "cartoon_oval_width", 0.2 )
243
244
def render_rhiju():
245
  rj()
@@ 157-182 (lines=26) @@
154
def render_molecules():
155
  rd()
156
157
def rd():
158
  """
159
  rhiju's favorite coloring of proteins and generic molecules
160
  side chains are all-heavy-atom and colored CPK, backbone is
161
  rainbow cartoon from N to C terminus.
162
  """
163
  cmd.bg_color( "white" )
164
  AllObj=cmd.get_names("all")
165
166
  for x in AllObj:
167
    #print(AllObj[0],x)
168
    print(x)
169
    cmd.show( "cartoon", x )
170
    cmd.hide( "line", x )
171
    cmd.color( "white", x+" and elem C" )
172
    cmd.color( "blue", x+" and elem N" )
173
    cmd.color( "red", x+" and elem O" )
174
    cmd.color( "yellow", x+" and elem S" )
175
    cmd.spectrum( "count", "rainbow", x+" and name CA+C" )
176
    cmd.show( "sticks", x +" and not elem H and not name C+N+O" )
177
    cmd.show( "sticks", x +" and resn PRO and name N" )
178
    cmd.show( "sticks", x + " and name NR+CR+CS+CP+CQ" )
179
    cmd.show( "sticks", x + " and not elem H and neighbor name NR+CQ+CR+CS+CP" )
180
    cmd.show( "sticks", x + " and not elem H and neighbor neighbor name NR+CQ+CR+CS+CP" )
181
    cmd.set( "cartoon_oval_width", 0.1 )
182
    cmd.set( "cartoon_oval_length", 0.5 )
183
184
def rx():
185
  """