<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.pymol.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=SavinaRoja</id>
	<title>PyMOL Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pymol.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=SavinaRoja"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php/Special:Contributions/SavinaRoja"/>
	<updated>2026-04-25T13:47:09Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Talk:Set_View&amp;diff=10683</id>
		<title>Talk:Set View</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Talk:Set_View&amp;diff=10683"/>
		<updated>2012-11-25T23:28:17Z</updated>

		<summary type="html">&lt;p&gt;SavinaRoja: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I've edited the description to reflect the broken flag at index 17, if there's just something I missed, or if it gets fixed, please edit it back --[[User:AdShea|AdShea]] 15:53, 8 Aug 2006 (CDT)&lt;br /&gt;
&lt;br /&gt;
I recently came across an issue with using cmd.set_view() in PyMOL v1.5.0.1 which I think might warrant a mention on this page. I tried using the command with the 18 float values from get_view as arguments and it stated that it would take only 5 arguments at most. I passed them all as a list and it worked as expected, I will take a look at it in more depth later. Does anyone know if this is a recent change, or did I make a mistake? --[[User:SavinaRoja|SavinaRoja]] 17:28, 25 November 2012 (CST)&lt;/div&gt;</summary>
		<author><name>SavinaRoja</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Label&amp;diff=13850</id>
		<title>Label</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Label&amp;diff=13850"/>
		<updated>2010-12-09T04:00:06Z</updated>

		<summary type="html">&lt;p&gt;SavinaRoja: /* Settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Pl.png|right|500px]]&lt;br /&gt;
&lt;br /&gt;
The [[Label]] command controls how PyMOL draws text labels for PyMOL objects.&lt;br /&gt;
&lt;br /&gt;
= Details =&lt;br /&gt;
Labeling is important so there are many options for your fine tuning needs.  You can change the [[Label_size|label size]], [[Label_color|label color]], positioning, [[Label_font_id|font]], the [[Label_outline_color|label outline color]] that masks the font and much, much more.&lt;br /&gt;
&lt;br /&gt;
You can have PyMOL label atoms by properties or arbitrary strings as you want; you can even use Unicode fonts for special symbols like, &amp;lt;math&amp;gt;\alpha, \beta, \pm, \textrm{\AA}&amp;lt;/math&amp;gt;, etc.&lt;br /&gt;
&lt;br /&gt;
The following gallery shows some examples of how extensible the [[Label]] command is.  &lt;br /&gt;
&amp;lt;gallery heights=&amp;quot;180px&amp;quot; widths=&amp;quot;200px&amp;quot; align=&amp;quot;center&amp;quot; perrow=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
Image:Label_pre.png|Simple label&lt;br /&gt;
Image:New_fonts.jpeg|Example showing usage of Unicode fonts for special characters&lt;br /&gt;
Image:Font_ex.png|Another example with Unicode fonts&lt;br /&gt;
Image:Label_ex.png|Example label&lt;br /&gt;
Image:Ls0.png|Label shadows turned off&lt;br /&gt;
Image:Ls2.png|Label shadows turned on&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Built-in Object Properties==&lt;br /&gt;
Aside from arbitrary string labels, like &amp;quot;This is the catalytic residue&amp;quot; for an atom/residue you can also use the following built-in molecular properties:&lt;br /&gt;
* '''name''', the atom name&lt;br /&gt;
* '''resn''', the residue name&lt;br /&gt;
*'''resi''', the residue number/identifier&lt;br /&gt;
*'''chain''', the chain name&lt;br /&gt;
*'''q''', charge&lt;br /&gt;
*'''b''', the occupancy/b-factor&lt;br /&gt;
*'''segi''', the segment identifier&lt;br /&gt;
*'''type''' ''(ATOM,HETATM)'', the type of atom&lt;br /&gt;
*'''formal_charge''', the formal charge&lt;br /&gt;
*'''partial_charge''', the partial charge&lt;br /&gt;
*'''numeric_type''', the numeric type&lt;br /&gt;
*'''text_type''', the text type&lt;br /&gt;
&lt;br /&gt;
You can use one of these properties as:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# simple example: label residue 22's atoms with their names&lt;br /&gt;
label i. 22, name&lt;br /&gt;
&lt;br /&gt;
# Label residue #44's alpha carbon with it's residue name, residue number and B-factor.&lt;br /&gt;
label n. CA and i. 44, &amp;quot;(%s, %s, %s&amp;quot;) % (resn, resi, b)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See the syntax and examples below for more info.&lt;br /&gt;
&lt;br /&gt;
=Syntax=&lt;br /&gt;
To use the label command follow this syntax:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# labeling syntax&lt;br /&gt;
label [ selection[, expression]]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
where '''selection''' is some object/selection you want to label and '''expression''' is some string (or set of strings) which PyMOL is to use to label the given selection.&lt;br /&gt;
&lt;br /&gt;
We have plenty of examples.  See [[#Examples|the examples]] below.&lt;br /&gt;
&lt;br /&gt;
=Settings=&lt;br /&gt;
Here are all the label settings and their general effect.  For each label setting, see the respective web page for more details.&lt;br /&gt;
&lt;br /&gt;
'''[[label_angle_digits]]'''&lt;br /&gt;
:: sets the number of decimals in angle label.&lt;br /&gt;
'''[[label_distance_digits]]'''&lt;br /&gt;
:: sets the number of decimals in distance label.&lt;br /&gt;
'''[[label_shadow_mode]]'''&lt;br /&gt;
:: sets whether or not PyMOL will ray trace shadows for your label text.  Eg: &amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;set label_shadow_mode, 2&amp;lt;/source&amp;gt;&lt;br /&gt;
'''[[label_color]]'''&lt;br /&gt;
:: sets the color of the label text.  Note that you can have labels of different colors for different objects or selections. Some examples:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# per-object:&lt;br /&gt;
set label-color, color-name, object-name  #eg, set label-color, magenta, /protein&lt;br /&gt;
&lt;br /&gt;
# per-atom:&lt;br /&gt;
set label-color, color-name, selection    #eg, set label-color, marine, /protein/A/A/23/CA&lt;br /&gt;
&lt;br /&gt;
# another example&lt;br /&gt;
fragment arg&lt;br /&gt;
label all, name&lt;br /&gt;
set label_color, yellow, arg&lt;br /&gt;
set label_color, red, elem c&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''[[label_font_id]]'''&lt;br /&gt;
:: sets the font to render your label.  There are 12 different fonts from 5&amp;amp;mdash;16.  Numbers 15 and 16 are special for unicode.  Eg: &amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;set label_font_id, 12&amp;lt;/source&amp;gt;&lt;br /&gt;
'''[[label_size]]'''&lt;br /&gt;
:: sets the size of the text.  You can use positive numbers 2, 3, 4, etc for point sizes, or negative numbers for Angstrom-based sizes. Default is 14 points. Labels in Angstrom-size scale with the distance from the front plane, labels in point-size don't.  Eg: &amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;set label_size, -2  #results in a size of 2 Angstroms&amp;lt;/source&amp;gt;&lt;br /&gt;
'''[[label_digits]]'''&lt;br /&gt;
:: sets the number of decimals in label. It affects all digits only if label_distance_digits or label_dihedral_digits or label_angle_digits are set to -1.&lt;br /&gt;
'''[[label_outline_color]]'''&lt;br /&gt;
:: each label is outlined (so you can do white-on-white labels, for example).  This options sets the color of the label outline.  Eg. &amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;set label_outline_color, orange&amp;lt;/source&amp;gt;&lt;br /&gt;
'''[[label_dihedral_digits]]'''&lt;br /&gt;
:: sets the number of decimals in dihedral label.&lt;br /&gt;
'''[[label_position]]'''&lt;br /&gt;
:: sets any offset from the original X,Y,Z coordinates for the label.  If you like to use the mouse, you can enter [[edit_mode]] and '''ctrl-middle-click''' to drag labels around; '''ctrl-shift-left_click''' will let you move the labels in the z-direction. '''&amp;quot;Save labels&amp;quot;-workaround''' If you want to save the position of your labels, the best way might be to create a new object and move the atoms in this object. Since the labels are positioned from the atom positions this is an indirect way of moving the labels and being able to save them.&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#1.&lt;br /&gt;
# make a very simple label on the 14th alpha carbon.&lt;br /&gt;
label n. CA and i. 14, &amp;quot;This is carbon 14.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#2.&lt;br /&gt;
# make a fake scene label; use this to label entire scenes, not just atoms/bonds.&lt;br /&gt;
pseudoatom foo&lt;br /&gt;
label foo, &amp;quot;Once upon a time...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#3.&lt;br /&gt;
# make a huge label&lt;br /&gt;
set label_size, -5&lt;br /&gt;
pseudoatom foo&lt;br /&gt;
label foo, &amp;quot;This is large text&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#4. Partial Charge&lt;br /&gt;
label (chain A),chain&lt;br /&gt;
label (n;ca),&amp;quot;%s-%s&amp;quot; % (resn,resi)&lt;br /&gt;
label (resi 200),&amp;quot;%1.3f&amp;quot; % partial_charge&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#5. The gallery image above Label_ex.png was created with this code&lt;br /&gt;
#   and finally, some labels were moved around in '''edit_mode'''.&lt;br /&gt;
label (resi 200),&amp;quot;%1.3f&amp;quot; % b&lt;br /&gt;
set label_font_id, 10&lt;br /&gt;
set label_size, 10&lt;br /&gt;
&lt;br /&gt;
#6. This example shows how to label a selection with the &lt;br /&gt;
#   XYZ coordinates of the atoms &lt;br /&gt;
from pymol import stored&lt;br /&gt;
stored.pos = []&lt;br /&gt;
# select the carbon atoms in my hetero atoms to label&lt;br /&gt;
select nn, het and e. C&lt;br /&gt;
# get the XYZ coordinates and put htem into stored.pos&lt;br /&gt;
iterate_state 1, (nn), stored.pos.append((x,y,z))&lt;br /&gt;
# label all N atoms.  You need the pop() function or else&lt;br /&gt;
# PyMOL will complain b/c you didn't provide enough coords.&lt;br /&gt;
label nn, (&amp;quot;%5.5s, %5.5s, %5.5s&amp;quot;) %  stored.pos.pop()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= User Comments =&lt;br /&gt;
==Labels Using ID Numbers==&lt;br /&gt;
The following commnent,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
label SELECTION, &amp;quot; %s&amp;quot; % ID &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
labels the SELECTION with atom ID numbers.&lt;br /&gt;
&lt;br /&gt;
You can make more complicated selections/lables such as&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
label SELECTION, &amp;quot; %s:%s %s&amp;quot; % (resi, resn, name)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
which will give you something like &amp;quot;GLU:139 CG&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Labels Using One Letter Abbreviations==&lt;br /&gt;
* First, Add this to your $HOME/.pymolrc  file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# start $HOME/.pymolrc modification&lt;br /&gt;
one_letter ={'VAL':'V', 'ILE':'I', 'LEU':'L', 'GLU':'E', 'GLN':'Q', \&lt;br /&gt;
'ASP':'D', 'ASN':'N', 'HIS':'H', 'TRP':'W', 'PHE':'F', 'TYR':'Y',    \&lt;br /&gt;
'ARG':'R', 'LYS':'K', 'SER':'S', 'THR':'T', 'MET':'M', 'ALA':'A',    \&lt;br /&gt;
'GLY':'G', 'PRO':'P', 'CYS':'C'}&lt;br /&gt;
# end modification&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Second, instead of:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
label n. ca, resn&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
label n. ca, one_letter[resn]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or: ( to get something like D85)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
label n. ca, &amp;quot;%s%s&amp;quot; %(one_letter[resn],resi)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
[[:Category:Labeling]]&lt;br /&gt;
&lt;br /&gt;
All the settings posted above.&lt;br /&gt;
&lt;br /&gt;
[[Category:Labeling|Label]]&lt;br /&gt;
[[Category:Commands|Label]]&lt;/div&gt;</summary>
		<author><name>SavinaRoja</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Cartoon&amp;diff=4960</id>
		<title>Cartoon</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Cartoon&amp;diff=4960"/>
		<updated>2010-12-08T05:06:07Z</updated>

		<summary type="html">&lt;p&gt;SavinaRoja: /* Adjusting width of cartoon */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Cartoon Command==&lt;br /&gt;
===DESCRIPTION===&lt;br /&gt;
'''cartoon''' changes the default cartoon for a set of atoms.&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 cartoon type, (selection)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''type:'''&lt;br /&gt;
#skip&lt;br /&gt;
#automatic&lt;br /&gt;
#loop&lt;br /&gt;
#rectangle&lt;br /&gt;
#oval&lt;br /&gt;
#tube&lt;br /&gt;
#arrow&lt;br /&gt;
#dumbbell&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;200px&amp;quot; heights=&amp;quot;200px&amp;quot;&amp;gt;&lt;br /&gt;
Image:Cartoon_skip.png|cartoon_skip; yes, blank.&lt;br /&gt;
Image:Cartoon_automatic.png|cartoon_automatic&lt;br /&gt;
Image:Cartoon_loop.png|cartoon_loop&lt;br /&gt;
Image:Cartoon_rectangle.png|cartoon_rectangle&lt;br /&gt;
Image:Cartoon_oval.png|cartoon_oval&lt;br /&gt;
Image:Cartoon_tube.png|cartoon_tube&lt;br /&gt;
Image:Cartoon_arrow.png|cartoon_arrow&lt;br /&gt;
Image:Cartoon_dumbbell.png|cartoon_dumbbell&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===PYMOL API===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.cartoon(string type, string selection )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
 cartoon rectangle,(chain A)&lt;br /&gt;
 cartoon skip,(resi 145:156)&lt;br /&gt;
&lt;br /&gt;
===NOTES===&lt;br /&gt;
the &amp;quot;automatic&amp;quot; mode utilizes ribbons according to the information in the PDB HELIX and SHEET records.&lt;br /&gt;
&lt;br /&gt;
==Adjusting width of cartoon==&lt;br /&gt;
Try varying the following.&lt;br /&gt;
&lt;br /&gt;
For &amp;amp;beta;-strands:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cartoon_rect_length&lt;br /&gt;
cartoon_rect_width&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For &amp;amp;alpha;-helices:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cartoon_oval_length&lt;br /&gt;
cartoon_oval_width&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For loops:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cartoon_loop_radius&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For nucleic acid backbones which resemble 'loops'; however, are not classified as such by Pymol (see more about nucleic acid representation settings at bottom of page):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cartoon_tube_radius,0.8&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For &amp;quot;fancy&amp;quot; &amp;amp;alpha;-helices:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cartoon_dumbbell_length&lt;br /&gt;
cartoon_dumbbell_width&lt;br /&gt;
cartoon_dumbbell_radius  (radius of cylinder at edge of helix ribbon)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In each case &amp;quot;length&amp;quot; refers to what some might call the width and &amp;quot;width&amp;quot; refers to what some might call the thickness.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Cartoon_ex.png|thumb|center|Cartoon Representation Example|300px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Forcing Exact Boundaries in Coloring Secondary Structures===&lt;br /&gt;
To force PyMol to respect secondary structural elements color-wise (PyMol smooths out colors near color chagnes for a prettier image) use the following &lt;br /&gt;
PyMol command:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
set cartoon_discrete_colors, on&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Cartoon_discrete_color0.png|Discrete Coloring Off|center|thumb]] [[Image:Cartoon_discrete_color1.png|Discrete Coloring On|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
== Sausage Representation ==&lt;br /&gt;
The familiar sausage representation in PyMol is called, &amp;quot;putty&amp;quot;.  To enable the putty/sausage view simply do,&lt;br /&gt;
 show cartoon&lt;br /&gt;
 cartoon putty&lt;br /&gt;
 unset cartoon_smooth_loops&lt;br /&gt;
 unset cartoon_flat_sheets&lt;br /&gt;
&lt;br /&gt;
As of v 0.98 or so, there's a Putty option.  Use this.&lt;br /&gt;
&lt;br /&gt;
[[Image:B_factor_putty.png|thumb|Example of B-factor Putty|center|250px]]&lt;br /&gt;
&lt;br /&gt;
==Black and White Representation==&lt;br /&gt;
'''UPDATE''': This method is essentially obseleted by the new setting '''set ray_trace_mode,2'''.  More information on this at [[Ray]].&lt;br /&gt;
For those who want a nifty black and white representation of their protein try the following:&lt;br /&gt;
# Ray trace your protein of choice in a cartoon representation use a BLACK background&lt;br /&gt;
# Save the image&lt;br /&gt;
# Load the image in GIMP. [[Image:Bw1.jpeg|thumb|Black BG Ribbon|center|350px]]&lt;br /&gt;
# Desaturate or Grayscale the image. [[Image:Bw2.jpeg|thumb|Grayscale|center|350px]]&lt;br /&gt;
# Run the filter: Filter-&amp;gt;Edge-Detect-&amp;gt;Edge. [[Image:Bw3.jpeg|thumb|Edge Detect|center|350px]]&lt;br /&gt;
# Select: Layers-&amp;gt;Color-&amp;gt;Invert. [[Image:Bw4.jpeg|thumb|Invert Color|center|350px]]&lt;br /&gt;
# Different methods of edge detection will give you different results.  In the last example, I used Laplace Edge-Detect, then painted an all white layer beneath the current layer to achieve the results. [[Image:Bw5.jpeg|thumb|Other Styles|center|350px|Comments]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I'm sure there are other ways to do this.  If you want to include it in a publication make sure you ray traced it large enough.  For that, see [[Publication_Quality_Images|Creating Publication Quality Images]].&lt;br /&gt;
&lt;br /&gt;
==CA (Alpha Carbon) Trace==&lt;br /&gt;
If you have a structure with just a alpha carbon trace, you can get a cartoon by&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set cartoon_trace,1&lt;br /&gt;
show cartoon&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If your structure is more than just the CA backbone, the cartoon representation will look incorrect, so use it just with CA trace.&lt;br /&gt;
&lt;br /&gt;
==Various Transparency Levels==&lt;br /&gt;
[[Image:Cartoon_multi_transp.png|thumb|center|Example of Cartoon Multi-level Transparency.  The near cartoon has transparency setting '''0.2''', the segment in the BG '''0.5'''.]]&lt;br /&gt;
One can make different cartoon selections have different transparency values, in PyMol.  The trick here is to use &amp;quot;create&amp;quot; instead of &amp;quot;select&amp;quot;.  Create makes new objects that can have independent settings.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
load mol_obj.pdb&lt;br /&gt;
&lt;br /&gt;
# transfer a piece of the molecule into a new object&lt;br /&gt;
&lt;br /&gt;
create new_obj, chain A&lt;br /&gt;
remove mol_obj in new_obj&lt;br /&gt;
&lt;br /&gt;
# adjust trasparency for the new object&lt;br /&gt;
&lt;br /&gt;
set cartoon_transparency, 0.5, new_obj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Nucleic Acid Representation ==&lt;br /&gt;
[[Image:Nucleic1.png|thumb|center|Showing Nucleic Acids]]&lt;br /&gt;
To control radius of nucleic acids default backbone cartoon:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set cartoon_tube_radius,0.8   #0.5 seems close to the default setting&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To show nucleic acids in a nicer format do:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 set cartoon_ring_mode,1&lt;br /&gt;
 show cartoon&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Other Nucleic Acids &amp;amp; Cartoon Settings ===&lt;br /&gt;
Here are some things to try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set cartoon_ring_mode, 1   # (or 2 or 3)&lt;br /&gt;
set cartoon_ring_finder, 1 # (or 2 or 3 or 4)&lt;br /&gt;
set cartoon_nucleic_acid_mode, 0   # (or 1 or 2 or 3 or 4)&lt;br /&gt;
&lt;br /&gt;
set cartoon_side_chain_helper&lt;br /&gt;
rebuild&lt;br /&gt;
&lt;br /&gt;
set cartoon_ring_transparency, 0.5&lt;br /&gt;
&lt;br /&gt;
set cartoon_ladder_mode, 0 # or 1&lt;br /&gt;
&lt;br /&gt;
set cartoon_ladder_color, color-name&lt;br /&gt;
set cartoon_nucleic_acid_color, color-name&lt;br /&gt;
&lt;br /&gt;
cartoon oval&lt;br /&gt;
set cartoon_oval_width, 0.8&lt;br /&gt;
&lt;br /&gt;
cartoon rect&lt;br /&gt;
&lt;br /&gt;
cartoon dumbbell&lt;br /&gt;
set cartoon_dumbbell_width, 0.4&lt;br /&gt;
set cartoon_dumbbell_radius, 0.4&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
[[Overview of nucleic acid cartoons]]&lt;br /&gt;
&lt;br /&gt;
[[Examples of nucleic acid cartoons]]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[[Displaying_Biochemical_Properties]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Representations|Cartoon]]&lt;br /&gt;
[[Category:Nucleic_Acids|Cartoon]]&lt;br /&gt;
[[Category:Putty]]&lt;/div&gt;</summary>
		<author><name>SavinaRoja</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Talk:Turn&amp;diff=155</id>
		<title>Talk:Turn</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Talk:Turn&amp;diff=155"/>
		<updated>2010-12-07T20:44:26Z</updated>

		<summary type="html">&lt;p&gt;SavinaRoja: Incongruity between article and implementation?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Is there an inconsistency between this article and the actual implementation of Turn in PyMOL? Reading this article gives the impression that the camera rotates about its axes at its origin in camera space. If this were true, an issued command such as &amp;quot;cmd.turn('y',180)&amp;quot; should actually move an object placed before the camera (perhaps centered with its position in +z, for instance) to a position *behind* the camera (-z). In practice, that is not what I observe. Instead the object of interest appears to rotate about its own central axes.&lt;br /&gt;
&lt;br /&gt;
I have posted here: [http://codepad.org/NgCsHgSk] An example of view matrix alteration produced by Turn, in this case a 180 degree rotation about the y-axis.&lt;br /&gt;
&lt;br /&gt;
To me it seems that what it actually being effected is the alteration of the relationship between model and camera spaces rather than applying a rotation matrix to the object coordinates in camera space. &lt;br /&gt;
&lt;br /&gt;
My recollection of the involved mathematics is a bit vague, but these are relatively intuitive concepts of notable distinction. I'll brush up on the math, but I think the problem lies with a misunderstanding of PyMOL's workings or a lingual inaccuracy of the article. I am relatively new to PyMOL and only recently have started peering inside its source code. Perhaps my understanding of its workings is flawed? If so I hope some discussion can help inform how to improve the PyMOLWiki.&lt;br /&gt;
&lt;br /&gt;
--[[User:SavinaRoja|SavinaRoja]] 20:44, 7 December 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>SavinaRoja</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Orthoscopic&amp;diff=7914</id>
		<title>Orthoscopic</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Orthoscopic&amp;diff=7914"/>
		<updated>2010-12-07T19:46:15Z</updated>

		<summary type="html">&lt;p&gt;SavinaRoja: /* See Also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
'''orthoscopic''' turns on and off the perspective handling.  Turning '''on''' orthoscopic rendering removes the effects of perspective.  To adjust perspective rendering see, the [[Field_Of_View|Field of View]] command.&lt;br /&gt;
&lt;br /&gt;
=== [[:Category:Performance|Performance]] Notes ===&lt;br /&gt;
Turning '''on''' orthoscopic rendering improves the [[Ray|rendering speed]] by a factor of 2x-4x! So, if you have large images, or are rendering a movie that does not need perspective in the images, try turning off perspective by setting orthoscopic to '''1'''.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:orthoon2.png|orthoscopic on (perspective off)&lt;br /&gt;
&lt;br /&gt;
Image:orthooff2.png |orthoscopic off (perspective on)&lt;br /&gt;
For many images, the difference is hardly visible.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:orthoon.png|orthoscopic on (perspective off)&lt;br /&gt;
&lt;br /&gt;
Image:orthooff.png |orthoscopic off (perspective on)&lt;br /&gt;
Especially when straight features parallel to the z axis are shown, the effect may be large.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set orthoscopic, on&lt;br /&gt;
set orthoscopic, off&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[[Field_Of_View|Field of View]], [[Ray#Perspective_Example_Images|Perspective Settings]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>SavinaRoja</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Scene&amp;diff=9674</id>
		<title>Scene</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Scene&amp;diff=9674"/>
		<updated>2010-12-07T19:30:21Z</updated>

		<summary type="html">&lt;p&gt;SavinaRoja: /* Scenes as Movies */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===DESCRIPTION===&lt;br /&gt;
'''scene''' makes it possible to save and restore multiple scenes scene within a single session.  A scene consists of the view, all object activity information, all atom-wise visibility, color, representations, and the global frame index.&lt;br /&gt;
&lt;br /&gt;
===USAGE (newer v1.1.b4)===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
scene [key [,action [, message, [ new_key=new-key-value ]]]]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* '''key''' = string, new, auto, or *: use new for an automatically numbered new scene, use auto for the current scene (if one exists), and use * for all scenes (clear and recall actions only).&lt;br /&gt;
* '''action''' = store, recall, insert_after, insert_before, next, previous, update, rename, clear or append: (default = recall).  If rename, then a new_key argument must be explicitly defined.&lt;br /&gt;
* '''message''' = string: a text message to display with the scene.&lt;br /&gt;
* '''new_key''' = string: the new name for the scene&lt;br /&gt;
&lt;br /&gt;
=== Using Scene ===&lt;br /&gt;
The [[Scene]] command has quite a few actions/options that can be enabled by using the mouse and the keyboard through the usual [[Scene]] command or hot-keys.  Also, you can shift the scenes around using the new [[Scene_buttons]] and just dragging the scene names.&lt;br /&gt;
&lt;br /&gt;
'''Storing scenes''':&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# store this scene in the next spot, giving it the default name.&lt;br /&gt;
scene auto, store&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
has the hot-key equivalent of '''CTRL-PageDown''' (FN+CTRL+DownArrow on the Mac).  Try turning on [[Scene_Buttons]] and then doing CTRL-PageDown; see the scene buttons popping up?&lt;br /&gt;
&lt;br /&gt;
==== Scenes as Movies ====&lt;br /&gt;
If you desire to make a movie that only has camera changes or representation changes, then scenes are your friend.  Simply setup each view and then when ready you can do Scene-&amp;gt;Store from the PyMOL menus (or ''scene auto, store'' on the command line or the third method Ctrl+PgDn (Fn+Ctrl+DownArrow on the Mac)).  Do this for each view you setup.  Once done, you can scroll through your scenes by pushing PgUp/PgDn.  PyMOL automatically interpolates when you use the PgUp/PgDn buttons, so you get the desired smooth transitions.  Mix this with [http://delsci.com/axpymol/ AxPyMOL] and you have movies in PowerPoint with very little work.&lt;br /&gt;
&lt;br /&gt;
===USAGE (older)===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
scene key [,action [,message [ ,view [,color [,active [,rep [,frame]]]]]]]&lt;br /&gt;
scene *&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
*key can be any string&lt;br /&gt;
*action should be 'store' or 'recall' (default: 'recall')&lt;br /&gt;
*view: 1 or 0 controls whether the view is stored&lt;br /&gt;
*color: 1 or 0 controls whether colors are stored&lt;br /&gt;
*active: 1 or 0 controls whether activity is stored&lt;br /&gt;
*rep: 1 or 0 controls whether the representations are stored&lt;br /&gt;
*frame: 1 or 0 controls whether the frame is stored&lt;br /&gt;
&lt;br /&gt;
===PYMOL API===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.scene(string key,string action,string-or-list message,int view,&lt;br /&gt;
             int color, int active, int rep, int frame)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
Simple Examples.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
scene F1, store&lt;br /&gt;
scene F2, store, This view shows you the critical hydrogen bond.&lt;br /&gt;
 &lt;br /&gt;
scene F1&lt;br /&gt;
scene F2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example shows how to use scenes in a movie!&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# SUMMARY&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# This script demonstrates one way of creating a movie from scenes.&lt;br /&gt;
# It assumes that we have three scenes, each running for 10 seconds&lt;br /&gt;
# (300 frames apiece) including 2-second transitions.&lt;br /&gt;
&lt;br /&gt;
# 1) Load or create content for three scenes (this could just as easily&lt;br /&gt;
#    come from a session file).&lt;br /&gt;
&lt;br /&gt;
load $TUT/1hpv.pdb&lt;br /&gt;
util.cbc&lt;br /&gt;
turn x,180&lt;br /&gt;
orient&lt;br /&gt;
as cartoon&lt;br /&gt;
scene 001, store&lt;br /&gt;
&lt;br /&gt;
show sticks, organic&lt;br /&gt;
orient organic&lt;br /&gt;
scene 002, store&lt;br /&gt;
&lt;br /&gt;
hide cartoon&lt;br /&gt;
show lines, byres organic expand 5&lt;br /&gt;
turn x,45&lt;br /&gt;
turn y,45&lt;br /&gt;
scene 003, store&lt;br /&gt;
&lt;br /&gt;
# 2) Specify a 30-second movie -- state 1, 900 frames at 30 frames per second.&lt;br /&gt;
&lt;br /&gt;
mset 1 x900&lt;br /&gt;
&lt;br /&gt;
# 3) Program scene matrices as movie views at appopriate frames&lt;br /&gt;
#    and also add y-axis rocking between scenes.&lt;br /&gt;
&lt;br /&gt;
scene 001, animate=0&lt;br /&gt;
mview store, 1&lt;br /&gt;
mview store, 240&lt;br /&gt;
&lt;br /&gt;
turn y,-30&lt;br /&gt;
mview store, 70&lt;br /&gt;
turn y,60&lt;br /&gt;
mview store, 170&lt;br /&gt;
&lt;br /&gt;
scene 002, animate=0&lt;br /&gt;
mview store, 300&lt;br /&gt;
mview store, 540&lt;br /&gt;
&lt;br /&gt;
turn y,-30&lt;br /&gt;
mview store, 370&lt;br /&gt;
turn y,60&lt;br /&gt;
mview store, 470&lt;br /&gt;
&lt;br /&gt;
scene 003, animate=0&lt;br /&gt;
mview store, 600&lt;br /&gt;
mview store, 840&lt;br /&gt;
&lt;br /&gt;
turn y,-30&lt;br /&gt;
mview store, 670&lt;br /&gt;
turn y,60&lt;br /&gt;
mview store, 770&lt;br /&gt;
&lt;br /&gt;
# 4) Now interpolate the movie camera.&lt;br /&gt;
&lt;br /&gt;
mview interpolate&lt;br /&gt;
mview smooth&lt;br /&gt;
mview smooth&lt;br /&gt;
&lt;br /&gt;
# 5) Activate scene content at the appropriate movie frames.&lt;br /&gt;
 &lt;br /&gt;
mdo 1: scene 001, view=0, quiet=1&lt;br /&gt;
mdo 240: scene 002, view=0, quiet=1&lt;br /&gt;
mdo 540: scene 003, view=0, quiet=1&lt;br /&gt;
mdo 840: scene 001, view=0, quiet=1&lt;br /&gt;
&lt;br /&gt;
# 6) Force frame 1 content to load.&lt;br /&gt;
&lt;br /&gt;
rewind&lt;br /&gt;
&lt;br /&gt;
# 6) And play the movie.&lt;br /&gt;
&lt;br /&gt;
mplay&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Courtesy of Warren DeLano.&lt;br /&gt;
&lt;br /&gt;
===NOTES===&lt;br /&gt;
* To scroll through your frames, as in a presentation, just use the PG-UP and PG-DN keys.  Very handy.&lt;br /&gt;
*Scenes F1 through F12 are automatically bound to function keys provided that &amp;quot;set_key&amp;quot; hasn't been used to redefine the behaviour of the respective key.&lt;br /&gt;
*If you have a script that modifies the representation of the molecules and stores them, quickly, then the stored frames may not be up to date.  I suggest calling &amp;quot;refresh&amp;quot; between the commands.&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[View]], [[Set_View]], [[Get_View]], [[Movie_from_scenes]]&lt;br /&gt;
&lt;br /&gt;
===DEVELOPMENT TO DO===&lt;br /&gt;
Add support for save/restore of a certain global and object-and-state specific settings, such as: state, surface_color, ribbon_color, stick_color, transparency, sphere_transparency, etc.  This would probably best be done by defining a class of &amp;quot;scene&amp;quot; settings which are treated in this manner.  The current workaround is to create separate objects which are enabled/disabled differentially.&lt;br /&gt;
&lt;br /&gt;
[[Category:Scenes]]&lt;br /&gt;
[[Category:States]]&lt;/div&gt;</summary>
		<author><name>SavinaRoja</name></author>
	</entry>
</feed>