forgi 2.0.0 documentation

«  forgi.threedee.visual package   ::   Contents   ::   forgi.threedee.classification package  »

forgi.threedee.visual.pymol module

class forgi.threedee.visual.pymol.PyMolRNA(name, color_modifier=1.0)[source]

Bases: future.types.newobject.newobject

add_cone(p, n, color='white', width=2.4, text='')[source]
add_dashed(point1, point2, width=0.1, color='purple')[source]

Add a dashed line from point1 to point2.

add_segment(p, n, color='green', width=0.2, text='', key='')[source]
Parameters:
  • p – start coordinates
  • n – end-coordinates
  • color – A color. Either a 3-element list with values from 0 to 1 for R, G and B, or a color name (as defined in this modules variable NAMED_COLORS)
add_sphere(p, color='green', width=0.2, text='')[source]
pymol_box_string()[source]

Pring out the CGO text to describe the boxes.

pymol_segments_string()[source]
pymol_spheres_string()[source]
pymol_text_string(rna_number)[source]
class forgi.threedee.visual.pymol.PymolPrinter[source]

Bases: future.types.newobject.newobject

add_cg(cg, labels, color_modifier=1.0)[source]
Parameters:labels – A dictionary with element names as keys and labels as values.
add_encompassing_cylinders(rna_plotter, cg, radius=7.0)[source]
add_stem_like(rna_plotter, cg, text, key, color='green', width=2.4)[source]
add_stem_like_core(rna_plotter, coords, twists, stem_len, text, key, color='green', width=2.4)[source]
draw_bounding_boxes(rna_plotter, bg, s)[source]

Draw bounding boxes for all of the residues encompassed by a stem. But only if there is a pdb file handy.

@param bg: The BulgeGraph @param s: The name of the stem

get_element_color(elem_name)[source]

Get the color for this element. The color is determined by the name of the element.

@param elem_name: The name of the element. @return: A string with a color name

pymol_axis_string()[source]
pymol_intro_string()[source]
pymol_load_cgo_string(object_id)[source]
pymol_string()[source]

Output the contents of this structure into a file that can be passed in as a pymol script.

forgi.threedee.visual.pymol.pymol_color(color, modifier)[source]

«  forgi.threedee.visual package   ::   Contents   ::   forgi.threedee.classification package  »