# PyMOL4RNA¶

Read for more interesting functions https://daslab.stanford.edu/site_data/docs_pymol_rhiju.pdf

rna_pdb_tools.utils.PyMOL4RNA.PyMOL4RNA.align_all(subset=[])[source]

Superimpose all open models onto the first one. This may not work well with selections.

This function is probably taken from https://daslab.stanford.edu/site_data/docs_pymol_rhiju.pdf

rna_pdb_tools.utils.PyMOL4RNA.PyMOL4RNA.clarna()[source]

Get contacts classification of the selected fragment based on ClaRNA.

rna_pdb_tools.utils.PyMOL4RNA.PyMOL4RNA.color_aa_types()[source]

Color aminoacides types like in Cider (http://pappulab.wustl.edu/CIDER/)

rna_pdb_tools.utils.PyMOL4RNA.PyMOL4RNA.color_by_text(txt)[source]

Helper function used for color-coding based on residue indexes ranges.

rna_pdb_tools.utils.PyMOL4RNA.PyMOL4RNA.color_obj(rainbow=0)[source]
stolen from :)
AUTHOR
Gareth Stockwell
USAGE

color_obj(rainbow=0)

This function colours each object currently in the PyMOL heirarchy with a different colour. Colours used are either the 22 named colours used by PyMOL (in which case the 23rd object, if it exists, gets the same colour as the first), or are the colours of the rainbow

rna_pdb_tools.utils.PyMOL4RNA.PyMOL4RNA.color_rbw(rainbow=0)[source]

similar to color_obj() but this time colors every obect as rainbow

rna_pdb_tools.utils.PyMOL4RNA.PyMOL4RNA.exe(cmd, verbose=False)[source]

Helper function to run cmd. Using in this Python module.

rna_pdb_tools.utils.PyMOL4RNA.PyMOL4RNA.get_pdb()[source]

Get PDB content of selection.

rna_pdb_tools.utils.PyMOL4RNA.PyMOL4RNA.get_seq()[source]

Get contacts classification based on ClaRNA.

rna_pdb_tools.utils.PyMOL4RNA.PyMOL4RNA.ino()[source]

Sphare and yellow inorganic, such us Mg.

rna_pdb_tools.utils.PyMOL4RNA.PyMOL4RNA.names()[source]
rna_pdb_tools.utils.PyMOL4RNA.PyMOL4RNA.p()[source]

A shortcut for putting a seq at the bottom. Pretty cool for screenshots with names of objects.

rna_pdb_tools.utils.PyMOL4RNA.PyMOL4RNA.rcomp()[source]

RNA like in papers ;-)

Similar to rc() but this time it colors each (and every) structure in different colour. Great on viewing-comparing superimposed structures.

rna_pdb_tools.utils.PyMOL4RNA.PyMOL4RNA.rgyration(selection='(all)', quiet=1)[source]

[PyMOL] RES: radius of gyration From: Tsjerk Wassenaar <tsjerkw@gm…> - 2011-03-31 14:07:03 https://sourceforge.net/p/pymol/mailman/message/27288491/ DESCRIPTION

USAGE

rgyrate [ selection ]

:::warning::: if nothing is selected function is calculating radius of gyration for all pdbs in current Pymol session

rna_pdb_tools.utils.PyMOL4RNA.PyMOL4RNA.rna_cartoon()[source]

http://www-cryst.bioc.cam.ac.uk/members/zbyszek/figures_pymol

rna_pdb_tools.utils.PyMOL4RNA.PyMOL4RNA.rp()[source]

rna_pdb_tools.utils.PyMOL4RNA.PyMOL4RNA.rp17()[source]

Color-coding for secondary structure elements for the RNA Puzzle 17.

For the variant:

CGUGGUUAGGGCCACGUUAAAUAGUUGCUUAAGCCCUAAGCGUUGAUAAAUAUCAGGUGCAA
((((.[[[[[[.))))........((((.....]]]]]]...(((((....)))))..))))
# len 62-nt

rna_pdb_tools.utils.PyMOL4RNA.PyMOL4RNA.rp172()[source]

Color-coding for secondary structure elements for the RNA Puzzle 17.

For the variant:

CGUGGUUAGGGCCACGUUAAAUAGUUGCUUAAGCCCUAAGCGUUGAUAUCAGGUGCAA
((((.[[[[[[.))))........((((.....]]]]]]...((((()))))..))))
# len 58-nt


See rp17()

rna_pdb_tools.utils.PyMOL4RNA.PyMOL4RNA.rs()[source]

The function creates super-cool cartoon-like RNA and colors each structure as a rainbow. Good to view aligned structures in a grid.

rna_pdb_tools.utils.PyMOL4RNA.PyMOL4RNA.spli()[source]
rna_pdb_tools.utils.PyMOL4RNA.PyMOL4RNA.ss()[source]

Get Secondary Structure of (sele) based on py3dna.py.

rna_pdb_tools.utils.PyMOL4RNA.PyMOL4RNA.ss_all()[source]

The same as ss() but for all objects.

## PyMOL Drawing¶

rna_pdb_tools.utils.pymol_drawing.pymol_drawing.draw_circle(x, y, z, r=8.0, cr=1.0, cg=0.4, cb=0.8, w=2.0)[source]

Create a CGO circle

PARAMS
x, y, z
X, Y and Z coordinates of the origin
r
cr, cg, cb
Color triplet, [r,g,b] where r,g,b are all [0.0,1.0].
w
Line width of the circle
RETURNS
the CGO object (it also loads it into PyMOL, too).
rna_pdb_tools.utils.pymol_drawing.pymol_drawing.draw_circle_selection(selName, r=None, cr=1.0, cg=0.4, cb=0.8, w=2.0)[source]

circleSelection – draws a cgo circle around a given selection or object

PARAMS
selName
Name of the thing to encircle.
r
Radius of circle. DEFAULT: This cript automatically defines the radius for you. If you select one atom and the resultant circle is too small, then you can override the script’s calculation of r and specify your own.
cr, cg, cb
red, green and blue coloring, each a value in the range [0.0, 1.0]
RETURNS
The circle object.
rna_pdb_tools.utils.pymol_drawing.pymol_drawing.draw_dist(54.729, 28.9375, 41.421, 55.342, 35.3605, 42.745)[source]

https://sourceforge.net/p/pymol/mailman/message/25795427/

rna_pdb_tools.utils.pymol_drawing.pymol_drawing.draw_dists(interactions)[source]
rna_pdb_tools.utils.pymol_drawing.pymol_drawing.draw_vector(x1, y1, z1, x2, y2, z2)[source]

https://pymolwiki.org/index.php/CGOCylinder

Install PyMOL plugin to view the interactions with PyMOL:

run <path>rna-pdb-tools/utils/pymol_drawing/pymol_dists.py


and type:

draw_dists([[29, 41], [7, 66], [28, 42], [51, 63], [50, 64], [2, 71], [5, 68], [3, 70], [31, 39], [4, 69], [6, 67], [12, 23], [52, 62], [30, 40], [49, 65], [27, 43], [11, 24], [1, 72], [10, 25], [15, 48], [53, 61], [19, 56], [13, 22], [36, 37], [18, 19], [22, 46], [35, 73], [32, 38], [9, 13], [19, 20], [18, 20], [54, 60], [9, 23], [34, 35], [36, 38], [53, 54], [20, 56], [9, 12], [26, 44], [18, 55], [54, 61], [32, 36]])


## Install¶

Open your ~/.pymolrc and set up following variables as you need:

# rna-pdb-tools
RNA_PDB_TOOLS="/Users/magnus/work-src/rna-pdb-tools"
EXECUTABLE="/bin/zsh" # set up your shell, usually /bin/bash or /bin/zsh
SOURCE="source ~/.zshrc" # set up the path to the file where you keep your shell variables
CLARNA_RUN="/Users/magnus/work-src/clarna_play/clarna_run.py"  # if you want to run clarna_run.py set up the path
sys.path.append('/Users/magnus/work-src/rna-pdb-tools')
run ~/work-src/rna-pdb-tools/rna_pdb_tools/utils/PyMOL4RNA/PyMOL4RNA.py
run ~/work-src/rna-pdb-tools/rna_pdb_tools/utils/pymol_drawing/pymol_drawing.py
run ~/work-src/rna-pdb-tools/rna_pdb_tools/utils/rna_filter/pymol_dists.py


The plugins have been tested with MacPyMOL version 1.7.4.5 Edu.