<?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=Speleo3</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=Speleo3"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php/Special:Contributions/Speleo3"/>
	<updated>2026-06-01T07:18:51Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Get_sasa_relative&amp;diff=14927</id>
		<title>Get sasa relative</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Get_sasa_relative&amp;diff=14927"/>
		<updated>2021-11-23T22:15:22Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: created&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[get_sasa_relative]] calculates the [https://en.wikipedia.org/wiki/Relative_accessible_surface_area relative per-residue solvent accessible surface area] and optionally labels and colors residues.&lt;br /&gt;
The value is relative to full exposure of the residue, calculated by removing all other residues except its two next neighbors, if present.&lt;br /&gt;
&lt;br /&gt;
The command loads a value beteween 0.0 (fully buried) and 1.0 (fully exposed) into the b-factor property, available in [[iterate]], [[alter]] and [[label]] as '''b'''.&lt;br /&gt;
&lt;br /&gt;
''New in Incentive PyMOL 1.8 and Open-Source PyMOL 2.1''&lt;br /&gt;
&lt;br /&gt;
''Changed in PyMOL 2.6: Added '''subsele''' argument''&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
 get_sasa_relative [ selection [, state [, vis [, var [, quiet [, outfile [, subsele ]]]]]]]&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
 fetch 1ubq&lt;br /&gt;
 get_sasa_relative polymer&lt;br /&gt;
&lt;br /&gt;
Side-chain exposure, including C-alpha atom, using '''subsele''' argument (new in PyMOL 2.6):&lt;br /&gt;
&lt;br /&gt;
 get_sasa_relative polymer, subsele=sidechain guide&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[get_area]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|get_sasa_relative]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Get_Area&amp;diff=14933</id>
		<title>Get Area</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Get_Area&amp;diff=14933"/>
		<updated>2021-11-23T22:12:19Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: Speleo3 moved page Get Area to Get area: lower case spelling&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Get area]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Talk:Get_Area&amp;diff=14931</id>
		<title>Talk:Get Area</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Talk:Get_Area&amp;diff=14931"/>
		<updated>2021-11-23T22:12:19Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: Speleo3 moved page Talk:Get Area to Talk:Get area: lower case spelling&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Talk:Get area]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Jupyter&amp;diff=14935</id>
		<title>Jupyter</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Jupyter&amp;diff=14935"/>
		<updated>2021-10-27T18:27:44Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: cmd.ipython_image()&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Some PyMOL functionality can be used inside [https://jupyter.org/ Jupyter Notebooks]. Since PyMOL's nature is primarily that of an application and not of a library, there are various ways to do PyMOL+Jupyter integration, each way with its own limitations.&lt;br /&gt;
&lt;br /&gt;
== Ways of Integration ==&lt;br /&gt;
&lt;br /&gt;
* Directly using the PyMOL API&lt;br /&gt;
** Running PyMOL and Jupyter in the same interpreter&lt;br /&gt;
*** Same thread (headless only)&lt;br /&gt;
*** Asynchronous thread (GUI possible)&lt;br /&gt;
** Running PyMOL standalone, with [[RPC]] communication (GUI possible)&lt;br /&gt;
* Using third party libraries which add their own intermediate layer&lt;br /&gt;
** [https://pypi.org/project/ipymol/ IPyMOL] controls a PyMOL instance via [[RPC]]&lt;br /&gt;
** [https://www.rdkit.org/docs/source/rdkit.Chem.PyMol.html RDKit] controls a PyMOL instance via [[RPC]]&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
If PyMOL and Jupyter should run in the same interpreter, they need to be installed into the same Python environment. [[RPC]] also works with two independent environments.&lt;br /&gt;
&lt;br /&gt;
=== Incentive PyMOL ===&lt;br /&gt;
&lt;br /&gt;
Install [https://docs.conda.io/en/latest/miniconda.html Miniconda] or [https://www.anaconda.com/ Anaconda] (or grab a bundle from [https://pymol.org/#download pymol.org] which includes conda). Then install:&lt;br /&gt;
&lt;br /&gt;
 conda install jupyter schrodinger::pymol&lt;br /&gt;
&lt;br /&gt;
=== Open-Source PyMOL ===&lt;br /&gt;
&lt;br /&gt;
[[Linux Install|Compile and install]] PyMOL with the same Python that you use with Jupyter, into the same environment.&lt;br /&gt;
&lt;br /&gt;
== Example 1: Same interpreter, same thread ==&lt;br /&gt;
&lt;br /&gt;
This example will render an image and display it inside the Jupyter notebook.&lt;br /&gt;
&lt;br /&gt;
Open a notebook, then execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from pymol import cmd&lt;br /&gt;
cmd.fragment('ala')&lt;br /&gt;
cmd.orient()&lt;br /&gt;
&lt;br /&gt;
# since PyMOL 2.5&lt;br /&gt;
cmd.ipython_image()&lt;br /&gt;
&lt;br /&gt;
# before PyMOL 2.5&lt;br /&gt;
cmd.png('/tmp/foo.png', ray=1)&lt;br /&gt;
from IPython.display import Image&lt;br /&gt;
Image(filename='/tmp/foo.png')&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example 2: Same interpreter, asynchronous thread ==&lt;br /&gt;
&lt;br /&gt;
''Note: This doesn't work on macOS, see https://github.com/schrodinger/pymol-open-source/issues/28 ''&lt;br /&gt;
&lt;br /&gt;
This example will control a PyMOL window (see also [[Launching_From_a_Script#STDOUT|stdout notice]]).&lt;br /&gt;
&lt;br /&gt;
Open a notebook, then execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# open a PyMOL window&lt;br /&gt;
import sys&lt;br /&gt;
import pymol&lt;br /&gt;
_stdouterr = sys.stdout, sys.stderr&lt;br /&gt;
pymol.finish_launching(['pymol', '-q'])&lt;br /&gt;
sys.stdout, sys.stderr = _stdouterr&lt;br /&gt;
&lt;br /&gt;
# load something into the PyMOL window&lt;br /&gt;
from pymol import cmd&lt;br /&gt;
cmd.fragment('ala')&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example 3: RPC ==&lt;br /&gt;
&lt;br /&gt;
Launch PyMOL with the &amp;quot;-R&amp;quot; option:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
pymol -R&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open a Python 3 notebook, then execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# load something into the PyMOL window&lt;br /&gt;
import xmlrpc.client as xmlrpclib&lt;br /&gt;
cmd = xmlrpclib.ServerProxy('http://localhost:9123')&lt;br /&gt;
cmd.fragment('ala')&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Launching From a Script]]&lt;br /&gt;
* [[RPC]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Spaceball_plugin&amp;diff=14855</id>
		<title>Spaceball plugin</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Spaceball_plugin&amp;diff=14855"/>
		<updated>2021-02-22T08:04:16Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: Added &amp;quot;Incentive&amp;quot; to note&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = plugin&lt;br /&gt;
|download  = http://divites.de/files/pymol/spaceball.tar.gz&lt;br /&gt;
|author    = [[User:RaphaelDives|Raphael Dives]]&lt;br /&gt;
|license   = BSD-3-Clause&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #9f9; padding: 10px; margin-bottom: 20px; text-align: center&amp;quot;&amp;gt;&lt;br /&gt;
'''Note:''' Incentive PyMOL 2.1 has built-in SpaceNavigator support for all platforms, see https://pymol.org/spacenavigator&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
This plugin integrates Spaceball devices on Linux Systems.&lt;br /&gt;
&lt;br /&gt;
It was developed and tested with the SpaceNavigator(TM) by 3DConnexion.&lt;br /&gt;
&lt;br /&gt;
But it *should* work with other (Linux based) systems and Spacenav Driver compatible devices as well.&lt;br /&gt;
&lt;br /&gt;
The used software was:&lt;br /&gt;
:PyMOL version 1.7&lt;br /&gt;
:Ubuntu-12.04 / 14.04&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
[http://divites.de/files/pymol/spaceball.tar.gz Download] the plugin and install it using the PyMOL plugin wizard.&lt;br /&gt;
&lt;br /&gt;
Please consider the following requirements:&lt;br /&gt;
#Install the &amp;quot;libspnav0&amp;quot; and &amp;quot;libspnav-dev&amp;quot; packages from the repositories&lt;br /&gt;
#Obtain and install the current version of the Spacenav driver from [http://www.spacenav.sourceforge.net/ http://www.spacenav.sourceforge.net/]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Important ==&lt;br /&gt;
&lt;br /&gt;
The name &amp;quot;SpaceMouse&amp;quot; is registered trademark of 3DConnexion.&lt;br /&gt;
&lt;br /&gt;
This plugin uses the spnav-0.9 package&lt;br /&gt;
:Copyright (c) 2011, Stanley Seibert&lt;br /&gt;
:All rights reserved.&lt;br /&gt;
:The BSD-License agreement and the Readme for this package are located in the spnav_docs folder.&lt;br /&gt;
:Please see the http://bitbucket.org/seibert/spnav/ for more information.&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;br /&gt;
[[Category:Pymol-script-repo]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Get_Symmetry&amp;diff=14811</id>
		<title>Get Symmetry</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Get_Symmetry&amp;diff=14811"/>
		<updated>2021-02-19T06:53:12Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: maps&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''get_symmetry''' can be used to obtain the crystal and spacegroup parameters for a molecule or map object.&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
 get_symmetry object-name-or-selection&lt;br /&gt;
&lt;br /&gt;
===DESCRIPTION===&lt;br /&gt;
&lt;br /&gt;
Returns a tuple containing the following 7 values:&lt;br /&gt;
&lt;br /&gt;
* The unit cell lengths (a,b,c)&lt;br /&gt;
* The unit cell angles (alpha, beta, gamma)&lt;br /&gt;
* The space group name (e.g. &amp;quot;P 21 21 21&amp;quot;)&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.get_symmetry(string selection) &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===See Also===&lt;br /&gt;
&lt;br /&gt;
* [[Set_Symmetry|set_symmetry]]&lt;br /&gt;
* [[symmetry_copy]]&lt;br /&gt;
* [[Supercell]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Get Symmetry]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Unset&amp;diff=14857</id>
		<title>Unset</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Unset&amp;diff=14857"/>
		<updated>2021-01-29T09:55:13Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: 2.5 updates&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
'''unset''' behaves in two ways.&lt;br /&gt;
 &lt;br /&gt;
If selection is not provided:&lt;br /&gt;
&lt;br /&gt;
* Since PyMOL 2.5: Changes the named global setting to the default value.&lt;br /&gt;
* Before PyMOL 2.5: Changes the named global setting to a zero or off value.&lt;br /&gt;
 &lt;br /&gt;
If a selection is provided, then &amp;quot;unset&amp;quot; undefines object-specific or state-specific settings so that the global setting will be in effect.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
 unset name [,selection [,state ]]&lt;br /&gt;
&lt;br /&gt;
== Python API ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.unset ( string name, string selection = '',&lt;br /&gt;
         int state=0, int updates=1, int log=0 ) &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[unset_deep]]&lt;br /&gt;
* [[set]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Unset]]&lt;br /&gt;
[[Category:States]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Properties_Inspector&amp;diff=14853</id>
		<title>Properties Inspector</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Properties_Inspector&amp;diff=14853"/>
		<updated>2021-01-29T09:37:53Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: created&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The [[Properties Inspector]] panel lets you inspect and modify object, object-state, atom, and atom-state properties and settings. It opens when clicking the &amp;quot;Properties&amp;quot; button in the upper right.&lt;br /&gt;
&lt;br /&gt;
''New in PyMOL 2.0''&lt;br /&gt;
&lt;br /&gt;
== Screenshot ==&lt;br /&gt;
&lt;br /&gt;
Screenshot of PyMOL with the properties panel open, after applying &amp;quot;A &amp;gt; preset &amp;gt; pretty&amp;quot; to PDB 1rx1:&lt;br /&gt;
&lt;br /&gt;
[[File:Properties-Inspector.png]]&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
* The panel doesn't refresh automatically. After loading new objects, press the refresh button (next to the atom index field).&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[iterate]]&lt;br /&gt;
* [[get]], [[set]], [[unset]]&lt;br /&gt;
* [[Get_Title|get_title]], [[set_title]]&lt;br /&gt;
&lt;br /&gt;
[[Category:GUI]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Quit&amp;diff=14802</id>
		<title>Quit</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Quit&amp;diff=14802"/>
		<updated>2020-12-02T20:21:29Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: return code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[quit]] terminates the program.&lt;br /&gt;
&lt;br /&gt;
''Changed in PyMOL 1.6: Added return code''&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
 quit [code]&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
&lt;br /&gt;
* '''code''' = int: Return code {default: 0}&lt;br /&gt;
&lt;br /&gt;
== Python API ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.quit(code: int)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Quit]]&lt;br /&gt;
[[Category:Input Output Module|Quit]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Isomesh&amp;diff=14786</id>
		<title>Isomesh</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Isomesh&amp;diff=14786"/>
		<updated>2020-10-01T13:38:09Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: better example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''isomesh''' creates a mesh isosurface object from a map object.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
 isomesh name, map, level [,(selection) [,buffer [,state [,carve ]]]] &lt;br /&gt;
&lt;br /&gt;
*name = str: the name for the new mesh isosurface object.&lt;br /&gt;
*map = str: the name of the map object to use for computing the mesh.&lt;br /&gt;
*level = float: the contour level (in sigma units) {default: 1.0}&lt;br /&gt;
*selection = str: an atom selection about which to display the mesh with an additional &amp;quot;buffer&amp;quot; (if provided).&lt;br /&gt;
*buffer = float: (see selection)&lt;br /&gt;
*state = int: the state into which the object should be loaded (default=1) (set state=0 to append new mesh as a new state) {default: 1}&lt;br /&gt;
*carve = float: a radius about each atom in the selection for which to include density. If &amp;quot;carve&amp;quot; is not provided, then the whole brick is displayed.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 6sps&lt;br /&gt;
fetch 6sps, type=2fofc&lt;br /&gt;
&lt;br /&gt;
# mesh for entire map object&lt;br /&gt;
isomesh mesh_all, 6sps_2fofc&lt;br /&gt;
&lt;br /&gt;
# mesh within bounding box of ligand, enlarged by 2 Angstrom&lt;br /&gt;
isomesh mesh_ligand, 6sps_2fofc, selection=(resn LR5), buffer=2&lt;br /&gt;
&lt;br /&gt;
# mesh only within 2 Angstrom radius of any ligand atom&lt;br /&gt;
isomesh mesh_ligand_carved, 6sps_2fofc, selection=(resn LR5), carve=2&lt;br /&gt;
&lt;br /&gt;
set_view (\&lt;br /&gt;
     0.001600198,   -0.993020296,    0.117938228,\&lt;br /&gt;
    -0.999629617,    0.001603606,    0.027057989,\&lt;br /&gt;
    -0.027055763,   -0.117936097,   -0.992654920,\&lt;br /&gt;
     0.000000000,    0.000000000,  -55.829845428,\&lt;br /&gt;
    12.989342690,    2.425159931,   19.217729568,\&lt;br /&gt;
    51.427371979,   60.232315063,  -19.999994278 )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! mesh_all&lt;br /&gt;
! mesh_ligand&lt;br /&gt;
! mesh_ligand_carved&lt;br /&gt;
|-&lt;br /&gt;
| [[File:6sps-mesh-all.png]]&lt;br /&gt;
| [[File:6sps-mesh-ligand.png]]&lt;br /&gt;
| [[File:6sps-mesh-ligand-carved.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
&lt;br /&gt;
==== Selection Argument ====&lt;br /&gt;
&lt;br /&gt;
The arguments &amp;lt;code&amp;gt;selection&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;buffer&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;carve&amp;lt;/code&amp;gt; can limit the mesh display to a selected area, and/or extend the area by symmetry operators if the selection is located outside the map bounding box itself.&lt;br /&gt;
&lt;br /&gt;
[[File:isomesh-buffer-carve.png]]&lt;br /&gt;
&lt;br /&gt;
==== State Arguments ====&lt;br /&gt;
&lt;br /&gt;
If the mesh object already exists, then the new mesh will be appended onto the object as a new state (unless you indicate a state).&lt;br /&gt;
&lt;br /&gt;
*state &amp;gt; 0: specific state&lt;br /&gt;
*state = 0: all states&lt;br /&gt;
*state = -1: current state&lt;br /&gt;
&lt;br /&gt;
*source_state &amp;gt; 0: specific state&lt;br /&gt;
*source_state = 0: include all states starting with 0&lt;br /&gt;
*source_state = -1: current state&lt;br /&gt;
*source_state = -2: last state in map&lt;br /&gt;
&lt;br /&gt;
====MAP AROUND THE CENTER====&lt;br /&gt;
&lt;br /&gt;
You can create mesh around the center of the view by specifying &amp;quot;center&amp;quot; as the selection argument.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
isomesh normal, fake_map, 1.0, center&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====MAP OUTSIDE THE CALCULATED AREA====&lt;br /&gt;
&lt;br /&gt;
When [[map_auto_expand_sym]] is ON, you can create mesh beyond the precalculated volume. In this&lt;br /&gt;
case, symmetry information (lattice constants, space group) of the model specified in the selection &lt;br /&gt;
argument if available, or (new in 1.7) from the map object.&lt;br /&gt;
&lt;br /&gt;
====MAP LEVELS====&lt;br /&gt;
* Generally speaking there is some ambiguity with visualization tools as to how map data is to treated:  Some map file formats are normalized by convention (in the file data itself) and others do not.  Some visualization tools automatically normalize maps upon reading, others do not.  PyMOL's default behavior is dependent upon map file type: CCP4 and O/BRIX/DSN6 maps are automatically normalized upon reading (disable via '''normalize_*''' settings), other maps types are not.  PyMOL's normalization is a straight statistical average of all map points -- this may or may not be what you want.   If migrating to PyMOL from another tool, then it is definitely worth comparing how the maps are being represented by creating an equivalent figure in both, making sure that they match, and if they do not, then figuring out why not. ''From the PyMOL list.  Author: Warren DeLano.''&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
*[[isodot]]&lt;br /&gt;
*[[load]]&lt;br /&gt;
*[[fetch]]&lt;br /&gt;
*[[dynamic_mesh]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Isomesh]]&lt;br /&gt;
[[Category:States|Isomesh]]&lt;br /&gt;
[[Category:Electron_Density]]&lt;br /&gt;
[[Category:Maps]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Cartoon_cylindrical_helices&amp;diff=14784</id>
		<title>Cartoon cylindrical helices</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Cartoon_cylindrical_helices&amp;diff=14784"/>
		<updated>2020-09-30T08:25:07Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: cartoon_smooth_cylinder_* settings&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The [[cartoon_cylindrical_helices]] setting makes [[cartoon]] helices appear as simple cylinders.&lt;br /&gt;
&lt;br /&gt;
''Changed in PyMOL 2.5: Cylinders are not straight anymore but follow the actual curved shape of a helix. Straight helices are still available as mode 2.''&lt;br /&gt;
&lt;br /&gt;
== Modes ==&lt;br /&gt;
&lt;br /&gt;
* 0: Off (helices will be rendered according to the [[cartoon]] property or settings like [[cartoon_fancy_helices]])&lt;br /&gt;
* 1: Curved helices (since PyMOL 2.5)&lt;br /&gt;
* 2: Straight helices&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
 fetch 1bb1&lt;br /&gt;
 set cartoon_cylindrical_helices, 1&lt;br /&gt;
 as cartoon&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! set cartoon_cylindrical_helices, 1&lt;br /&gt;
! set cartoon_cylindrical_helices, 2&lt;br /&gt;
|-&lt;br /&gt;
| [[File:cartoon_cylindrical_helices-1.png]]&lt;br /&gt;
| [[File:cartoon_cylindrical_helices-2.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Related Settings ==&lt;br /&gt;
&lt;br /&gt;
* [[cartoon_smooth_cylinder_window]]: half-window size for window average smoothing (mode 1)&lt;br /&gt;
* [[cartoon_smooth_cylinder_cycles]]: number of cycles for window average smoothing (mode 1)&lt;br /&gt;
* [[cartoon_loop_quality]] affects &amp;quot;roundness&amp;quot; of mode 1 curved cylindrical helices (and loops of course).&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Cartoon Helix Settings]]&lt;br /&gt;
* [[cartoon_smooth_loops]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Settings]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=CCTBX&amp;diff=14781</id>
		<title>CCTBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=CCTBX&amp;diff=14781"/>
		<updated>2020-09-24T09:22:17Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: conda-forge::cctbx-base&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how to use the [https://github.com/cctbx/cctbx_project Computational Crystallography Toolbox (cctbx)] with PyMOL.&lt;br /&gt;
&lt;br /&gt;
cctbx and PyMOL need to be compiled with the same Python distribution, otherwise they won't be compatible.&lt;br /&gt;
&lt;br /&gt;
=== Incentive PyMOL ===&lt;br /&gt;
&lt;br /&gt;
Create a [https://repo.continuum.io/miniconda/ conda] environment with [https://anaconda.org/schrodinger/pymol schrodinger::pymol] and [https://anaconda.org/conda-forge/cctbx-base conda-forge::cctbx-base].&lt;br /&gt;
&lt;br /&gt;
On Linux and Windows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;conda create -n env1 schrodinger::pymol conda-forge::cctbx-base&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On macOS, you also need [https://anaconda.org/schrodinger/pymol schrodinger::tk] and [https://www.xquartz.org/ XQuartz]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;conda create -n env1 schrodinger::pymol conda-forge::cctbx-base schrodinger::tk&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Open-Source PyMOL ===&lt;br /&gt;
&lt;br /&gt;
See [[CCTBX-fedora32]].&lt;br /&gt;
&lt;br /&gt;
[[Category:PyMol_Integration|cctbx]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Cartoon_cylindrical_helices&amp;diff=14783</id>
		<title>Cartoon cylindrical helices</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Cartoon_cylindrical_helices&amp;diff=14783"/>
		<updated>2020-09-22T13:56:23Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: changes in PyMOL 2.5&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The [[cartoon_cylindrical_helices]] setting makes [[cartoon]] helices appear as simple cylinders.&lt;br /&gt;
&lt;br /&gt;
''Changed in PyMOL 2.5: Cylinders are not straight anymore but follow the actual curved shape of a helix. Straight helices are still available as mode 2.''&lt;br /&gt;
&lt;br /&gt;
== Modes ==&lt;br /&gt;
&lt;br /&gt;
* 0: Off (helices will be rendered according to the [[cartoon]] property or settings like [[cartoon_fancy_helices]])&lt;br /&gt;
* 1: Curved helices (since PyMOL 2.5)&lt;br /&gt;
* 2: Straight helices&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
 fetch 1bb1&lt;br /&gt;
 set cartoon_cylindrical_helices, 1&lt;br /&gt;
 as cartoon&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! set cartoon_cylindrical_helices, 1&lt;br /&gt;
! set cartoon_cylindrical_helices, 2&lt;br /&gt;
|-&lt;br /&gt;
| [[File:cartoon_cylindrical_helices-1.png]]&lt;br /&gt;
| [[File:cartoon_cylindrical_helices-2.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Related Settings ==&lt;br /&gt;
&lt;br /&gt;
[[cartoon_loop_quality]] affects &amp;quot;roundness&amp;quot; of mode 1 curved cylindrical helices (and loops of course).&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Cartoon Helix Settings]]&lt;br /&gt;
* [[cartoon_smooth_loops]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Settings]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Map_double&amp;diff=14797</id>
		<title>Map double</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Map_double&amp;diff=14797"/>
		<updated>2020-09-18T09:56:32Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''map_double''' resamples a map at twice the current resolution.  The amount of memory required to store the map will increase eight-fold.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=250px perrow=4&amp;gt;&lt;br /&gt;
Image:Map_normal.png|Std. map mesh spacing&lt;br /&gt;
Image:Map_double.png|Map doubled&lt;br /&gt;
Image:Map_double2.png|Map double, doubled&lt;br /&gt;
Image:Map_double3.png|Map double, double, doubled&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Usage=&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
map_double map_name [, state ]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
&lt;br /&gt;
 fetch 1rx1&lt;br /&gt;
 fetch 1rx1, type=2fofc&lt;br /&gt;
 map_double 1rx1_2fofc&lt;br /&gt;
 isomesh mesh, 1rx1_2fofc&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[[Map_Halve]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Map Double]]&lt;br /&gt;
[[Category:States|Map Double]]&lt;br /&gt;
[[Category:Electron_Density]]&lt;br /&gt;
[[Category:Maps]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=SuperSym&amp;diff=14770</id>
		<title>SuperSym</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=SuperSym&amp;diff=14770"/>
		<updated>2020-07-01T09:41:53Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: Infobox&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = plugin&lt;br /&gt;
|filename  = plugins/SuperSymPlugin.py&lt;br /&gt;
|author    = [[User:Srballard|Stuart Ballard]]&lt;br /&gt;
|license   = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[File:SuperSymExample.png|300px|thumb|right|Symmetry partners for 1hpv showing 6-1 screw axis]]&lt;br /&gt;
[[File:SuperSymExample2.png|300px|thumb|right|Full cell of symmetry partners with symmetry axes displayed]]&lt;br /&gt;
SuperSym is a PyMOL plugin providing a large number of tools for visualization of space groups; unit cells; and symmetry axes, operators, and partners.&lt;br /&gt;
&lt;br /&gt;
The original source code is available from https://sourceforge.net/projects/supersym/&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
* [[CCTBX|cctbx]]&lt;br /&gt;
* numpy&lt;br /&gt;
&lt;br /&gt;
'''PyMOL, cctbx and numpy must all be compiled with the same Python distribution!'''&lt;br /&gt;
See [[CCTBX]].&lt;br /&gt;
&lt;br /&gt;
This plugin was developed in 2010 for PyMOL version 1.2r1 and has not been updated since.&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
Symmetry axes are not defined for all space groups, and do not display properly for some.&lt;br /&gt;
&lt;br /&gt;
== Acknowledgments ==&lt;br /&gt;
&lt;br /&gt;
Primary coding and development was done by Stuart Ballard. All comments, questions, and issues should be directed to him at srballard@wisc.edu.&lt;br /&gt;
&lt;br /&gt;
Code for unit cell and symmetry axis building is borrowed from scripts created by Robert Campbell and Ralf W. Grosse-Kunstleve, available at [http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/ http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/]. Some of this code has been modified for use in SuperSym.&lt;br /&gt;
&lt;br /&gt;
[[FindSurfaceResidues]] is utilized for some of SuperSym's graphics generation, with some modifications.&lt;br /&gt;
&lt;br /&gt;
==Installing SuperSym==&lt;br /&gt;
&lt;br /&gt;
To install SuperSym v1.2, download SuperSymPlugin12.py from [https://sourceforge.net/projects/supersym/ https://sourceforge.net/projects/supersym/]. In PyMOL, go to:&lt;br /&gt;
*Plugin &amp;gt; Manage Plugins &amp;gt; Install...&lt;br /&gt;
A file selector dialog will appear. Select SuperSymPlugin12.py. PyMOL will direct you to restart, and upon doing so SuperSym will be accessible through the Plugin menu.&lt;br /&gt;
&lt;br /&gt;
To use functions of SuperSym directly, without creating a drop-down menu, use the run command in PyMOL on SuperSymPlugin12.py.&lt;br /&gt;
&lt;br /&gt;
Note: previous errors resulting from incorrect naming of the plugin file have been resolved in v1.2.&lt;br /&gt;
&lt;br /&gt;
==Feedback==&lt;br /&gt;
&lt;br /&gt;
Please post any comments, complaints, bug fix requests, useful tricks, or cool adaptations of SuperSym here.&lt;br /&gt;
&lt;br /&gt;
==The Menu==&lt;br /&gt;
*'''Default Symmetry Partner Set'''&lt;br /&gt;
** See '''Build Symmetry Partners &amp;gt; Cell [0,0,0] (default)'''&lt;br /&gt;
*'''Draw Unit Cell'''&lt;br /&gt;
**Creates a cgo object with unit cell axes as cylinders. This functions similarly to ''show cell'', but the cell axes are cylinders instead of lines, allowing for printing.&lt;br /&gt;
*'''Build Symmetry Partners &amp;gt;'''&lt;br /&gt;
**All options in this submenu generate sets of symmetry partners&lt;br /&gt;
**'''Cell [0,0,0] (default)'''&lt;br /&gt;
***Generates a suite of symmetry partners for a given object for the default unit cell, which is lattice position [0,0,0]&lt;br /&gt;
**'''Cell [x,y,z] (custom)'''&lt;br /&gt;
***Generates a suite of symmetry partners for a given object for a lattice position which you specify&lt;br /&gt;
**'''2x2x2 Block'''&lt;br /&gt;
***Generates 8 sets of symmetry partners for a given object, filling lattice positions [0,0,0] through [1,1,1]&lt;br /&gt;
**'''3x3x3 Block'''&lt;br /&gt;
***Generates 27 sets of symmetry partners for a given object, filling lattice positions [-1,-1,-1] through [1,1,1]. This option may take a long time to execute&lt;br /&gt;
**'''By Partner'''&lt;br /&gt;
***Generates only those symmetry partners which the user specifies by their defining symmetry operators&lt;br /&gt;
*'''Coloring &amp;gt;'''&lt;br /&gt;
**'''Default Rainbow'''&lt;br /&gt;
***Colors all symmetry objects with a specified by their symmetry operations automatically&lt;br /&gt;
**'''Select color for each operation'''&lt;br /&gt;
***Select symmetry partners to color by their defining symmetry operation and select the color for each&lt;br /&gt;
**'''Select one color for custom set of operations'''&lt;br /&gt;
***Select a set of symmetry partners defined by symmetry operations and select one color for all of them&lt;br /&gt;
*'''Graphics &amp;gt;'''&lt;br /&gt;
**'''Lines'''&lt;br /&gt;
***Convenience function to display symmetry partners as lines&lt;br /&gt;
**'''Ribbon'''&lt;br /&gt;
**Convenience function to display symmetry partners as ribbons&lt;br /&gt;
**'''Cartoon'''&lt;br /&gt;
***Convenience function to display symmetry partners as cartoons&lt;br /&gt;
**'''Sphere Surface (best for printing)'''&lt;br /&gt;
***Uses the findSurfaceResidues function and shows surface residues as spheres. If printing, this option saves at least 60% of materials relative to regular surfaces, with minimal loss in resolution&lt;br /&gt;
**'''Surface (high load render)'''&lt;br /&gt;
***Displays symmetry partners as surfaces. This option may take a very long time to execute&lt;br /&gt;
*'''Symmetry Axes &amp;gt;'''&lt;br /&gt;
**'''Build Axes'''&lt;br /&gt;
***Builds all symmetry axes for the given object. This functionality will be customizable and extended in future versions&lt;br /&gt;
*'''Move symmetry partners'''&lt;br /&gt;
**Merely displays instructions for using built in hotkeys to move symmetry partners&lt;br /&gt;
*'''About'''&lt;br /&gt;
**Developer info&lt;br /&gt;
*'''Help'''&lt;br /&gt;
**Reference to this page&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Math_Scripts]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=SuperSymSource&amp;diff=14772</id>
		<title>SuperSymSource</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=SuperSymSource&amp;diff=14772"/>
		<updated>2020-07-01T09:35:12Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: move code to Pymol-script-repo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page contains source files for the [[SuperSym]] plugin. For documentation and use instructions, see [[SuperSym]].&lt;br /&gt;
&lt;br /&gt;
==Source Code==&lt;br /&gt;
&lt;br /&gt;
See https://github.com/Pymol-Scripts/Pymol-script-repo/blob/master/plugins/SuperSymPlugin.py&lt;br /&gt;
&lt;br /&gt;
[[Category:Electron_Density]]&lt;br /&gt;
[[Category:Maps]]&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Supercell&amp;diff=14774</id>
		<title>Supercell</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Supercell&amp;diff=14774"/>
		<updated>2020-07-01T08:24:46Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: remove code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox psico&lt;br /&gt;
|module    =  psico.xtal&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[File:SupercellExample.png|200px|thumb|right|Example with 2 unit cells in c-direction, created with: supercell 1,1,2,2x19]]&lt;br /&gt;
&lt;br /&gt;
'''supercell''' can display multiple copies of the unit cell.&lt;br /&gt;
Can also fill the unit cell (and its copies) with symmetry mates.&lt;br /&gt;
&lt;br /&gt;
See [http://sourceforge.net/mailarchive/forum.php?thread_name=l2vdcf611bd1004140816zeca28714mf76b9f72008099ab%40mail.gmail.com&amp;amp;forum_name=pymol-users thread on pymol-users mailing list].&lt;br /&gt;
&lt;br /&gt;
Requires [http://numpy.scipy.org numpy].&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# import psico.xtal, or run the standalone script:&lt;br /&gt;
run https://raw.githubusercontent.com/speleo3/pymol-psico/master/psico/xtal.py&lt;br /&gt;
&lt;br /&gt;
fetch 2x19, async=0&lt;br /&gt;
supercell 2,1,1, 2x19, green&lt;br /&gt;
supercell 1,1,2, 2x19, orange, name=super2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[SuperSym]]&lt;br /&gt;
* [[symexp]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Math_Scripts]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Get_Area&amp;diff=14768</id>
		<title>Get Area</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Get_Area&amp;diff=14768"/>
		<updated>2020-06-23T06:48:32Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: flag ignore in PyMOL 2.5&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''get_area''' calculates the surface area in square Angstroms of the selection given. Note that the accessibility is assessed in the context of the object(s) that the selection is part of. So, to get the surface areas of e.g. a component of a complex, you should make a new object containing a copy of just that component and calculate its area.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;get_area selection&amp;quot; command will return the effective surface area of the dots that you would see from &amp;quot;[[show]] [[dots]], selection&amp;quot;.  This is a discrete approximation -- not an exact calculation.&lt;br /&gt;
&lt;br /&gt;
'''Attention:''' Atoms with the &amp;quot;[[Surface#Calculating_a_partial_surface|ignore]]&amp;quot; [[flag]] may lead to unexpected results. Clear the &amp;quot;ignore&amp;quot; flag first or exclude those atoms from the calculation.&lt;br /&gt;
''Fixed in PyMOL 2.5, [https://github.com/schrodinger/pymol-open-source/commit/1659fde83d2a125f86cad13414cead6b8f74abe9 ignored atoms are now excluded]. Previously, their entire sphere surface was added to the surface area.''&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
 get_area [ selection [, state [, load_b ]]]&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
&lt;br /&gt;
* '''selection''' = str: atom selection {default: all}&lt;br /&gt;
* '''state''' = int: object state {default: 1}&lt;br /&gt;
* '''load_b''' = 0/1: Load the surface area per atom into the b-factor {default: 0}&lt;br /&gt;
&lt;br /&gt;
== Settings ==&lt;br /&gt;
&lt;br /&gt;
The following PyMOL settings control how '''get_area''' works:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Setting&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[dot_solvent]]&lt;br /&gt;
| '''0''' = calculate '''molecular surface''' area {default}&lt;br /&gt;
'''1''' = calculate '''solvent accessible surface''' area (SASA)&lt;br /&gt;
|-&lt;br /&gt;
| [[dot_density]]&lt;br /&gt;
| 1-4 {default: 2}. Sampling density. Higher density (more dots) means higher accuracy but slower performance.&lt;br /&gt;
|-&lt;br /&gt;
| [[solvent_radius]]&lt;br /&gt;
| The solvent radius {default: 1.4}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The [[dot_hydrogens]] setting is '''not''' used.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
PyMOL&amp;gt; load $TUT/1hpv.pdb&lt;br /&gt;
PyMOL&amp;gt; show dots, resn arg&lt;br /&gt;
PyMOL&amp;gt; get_area resn arg&lt;br /&gt;
cmd.get_area: 1147.956 Angstroms^2.&lt;br /&gt;
PyMOL&amp;gt;set dot_solvent, on&lt;br /&gt;
PyMOL&amp;gt;get_area resn arg&lt;br /&gt;
 cmd.get_area: 673.084 Angstroms^2.&lt;br /&gt;
PyMOL&amp;gt;set dot_density, 3&lt;br /&gt;
PyMOL&amp;gt;get_area resn arg&lt;br /&gt;
 cmd.get_area: 674.157 Angstroms^2.&lt;br /&gt;
PyMOL&amp;gt;set dot_density, 4&lt;br /&gt;
PyMOL&amp;gt;get_area resn arg&lt;br /&gt;
 cmd.get_area: 672.056 Angstroms^2.&lt;br /&gt;
PyMOL&amp;gt;get_area all&lt;br /&gt;
 cmd.get_area: 13837.804 Angstroms^2.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
This code has not been recently validated though it was checked a couple years back. We suggest that people perform some kind of independent check on their system before trusting the results.  &lt;br /&gt;
&lt;br /&gt;
== Python API ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
float cmd.get_area(str selection=&amp;quot;(all)&amp;quot;, int state=1, int load_b=0)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
== Example 1 - starting with a complex in a single file ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# load complex&lt;br /&gt;
# Haemoglobin in this example illustrates careful use of selection algebra&lt;br /&gt;
load 2HHB.pdb&lt;br /&gt;
&lt;br /&gt;
# create objects for alpha1, beta1 and alpha1,beta1 pair of subunits&lt;br /&gt;
create alpha1, 2HHB and chain A&lt;br /&gt;
create beta1, 2HHB and chain B&lt;br /&gt;
create ab1, 2HHB and chain A+B&lt;br /&gt;
&lt;br /&gt;
# get hydrogens onto everything (NOTE: must have valid valences on e.g. small organic molecules)&lt;br /&gt;
h_add&lt;br /&gt;
&lt;br /&gt;
# make sure all atoms within an object occlude one another&lt;br /&gt;
flag ignore, none&lt;br /&gt;
&lt;br /&gt;
# use solvent-accessible surface with high sampling density&lt;br /&gt;
set dot_solvent, 1&lt;br /&gt;
set dot_density, 3&lt;br /&gt;
&lt;br /&gt;
# measure the components individually storing the results for later&lt;br /&gt;
alpha1_area=cmd.get_area(&amp;quot;alpha1&amp;quot;)&lt;br /&gt;
beta1_area=cmd.get_area(&amp;quot;beta1&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# measure the alpha1,beta1 pair&lt;br /&gt;
ab1_area=cmd.get_area(&amp;quot;ab1&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# now print results and do some maths to get the buried surface&lt;br /&gt;
print alpha1_area&lt;br /&gt;
print beta1_area&lt;br /&gt;
print ab1_area&lt;br /&gt;
print (alpha1_area + beta1_area) - ab1_area&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example 2 - starting with two components in separate files ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# load components separately&lt;br /&gt;
load my_ligand.pdb&lt;br /&gt;
load my_target.pdb&lt;br /&gt;
&lt;br /&gt;
# get hydrogens onto everything (NOTE: must have valid valences on the ligand...)&lt;br /&gt;
h_add&lt;br /&gt;
&lt;br /&gt;
# make sure all atoms within an object occlude one another&lt;br /&gt;
flag ignore, none&lt;br /&gt;
&lt;br /&gt;
# use solvent-accessible surface with high sampling density&lt;br /&gt;
set dot_solvent, 1&lt;br /&gt;
set dot_density, 3&lt;br /&gt;
&lt;br /&gt;
# measure the components individually&lt;br /&gt;
ligand_area=cmd.get_area(&amp;quot;my_ligand&amp;quot;)&lt;br /&gt;
target_area=cmd.get_area(&amp;quot;my_target&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# create the complex&lt;br /&gt;
create my_complex, my_ligand my_target&lt;br /&gt;
&lt;br /&gt;
# measure the complex&lt;br /&gt;
complex_area=cmd.get_area(&amp;quot;my_complex&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# now print results&lt;br /&gt;
print ligand_area&lt;br /&gt;
print target_area&lt;br /&gt;
print complex_area&lt;br /&gt;
print (ligand_area + target_area) - complex_area&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example 3 - using load_b to get surface area per atom ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# example usage of load_b&lt;br /&gt;
# select some organic small molecule&lt;br /&gt;
select ligand, br. first organic&lt;br /&gt;
# get its area and load it into it's b-factor column&lt;br /&gt;
get_area ligand, load_b=1&lt;br /&gt;
# print out the b-factor/areas per atom&lt;br /&gt;
iterate ligand, print b&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Example 4 - using a Python script to compute the SASA for individual residues==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import __main__&lt;br /&gt;
__main__.pymol_argv = ['pymol','-qc']&lt;br /&gt;
import pymol&lt;br /&gt;
from pymol import cmd, stored&lt;br /&gt;
pymol.finish_launching()&lt;br /&gt;
&lt;br /&gt;
cmd.set('dot_solvent', 1)&lt;br /&gt;
cmd.set('dot_density', 3)&lt;br /&gt;
&lt;br /&gt;
cmd.load('file.pdb')  # use the name of your pdb file&lt;br /&gt;
stored.residues = []&lt;br /&gt;
cmd.iterate('name ca', 'stored.residues.append(resi)')&lt;br /&gt;
&lt;br /&gt;
sasa_per_residue = []&lt;br /&gt;
for i in stored.residues:&lt;br /&gt;
    sasa_per_residue.append(cmd.get_area('resi %s' % i))&lt;br /&gt;
&lt;br /&gt;
print sum(sasa_per_residue)&lt;br /&gt;
print cmd.get_area('all')  # just to check that the sum of sasa per residue equals the total area&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
* For an example of '''load_b''' in use check out [[FindSurfaceResidues]].&lt;br /&gt;
* [[Surface]], most notably [[Surface#Calculating_a_partial_surface]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Get Area]]&lt;br /&gt;
[[Category:Biochemical_Properties|Get Area]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Flag&amp;diff=14763</id>
		<title>Flag</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Flag&amp;diff=14763"/>
		<updated>2020-06-23T06:42:06Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: table&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Flag]] is a command to set or clear ''flags'' on atom sets. A flag is just some atom-specific property. A flag is either on or off for a residue. Possible flags are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Flag name&lt;br /&gt;
! Value&lt;br /&gt;
! Description&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| '''focus'''&lt;br /&gt;
| 0&lt;br /&gt;
| Atoms of Interest (i.e. a ligand in an active site)&lt;br /&gt;
|rowspan=&amp;quot;6&amp;quot;| Reserved for molecular modeling.&lt;br /&gt;
&lt;br /&gt;
Affects [[Molecular Sculpting|sculpting]].&lt;br /&gt;
|-&lt;br /&gt;
| '''free'''&lt;br /&gt;
| 1&lt;br /&gt;
| Free Atoms (free to move subject to a force-field)&lt;br /&gt;
|-&lt;br /&gt;
| '''restrain'''&lt;br /&gt;
| 2&lt;br /&gt;
| Restrained Atoms (typically harmonically constrained)&lt;br /&gt;
|-&lt;br /&gt;
| '''fix'''&lt;br /&gt;
| 3&lt;br /&gt;
| Fixed Atoms (no movement allowed)&lt;br /&gt;
|-&lt;br /&gt;
| '''exclude'''&lt;br /&gt;
| 4&lt;br /&gt;
| Atoms which should not be part of any simulation&lt;br /&gt;
|-&lt;br /&gt;
| '''study'''&lt;br /&gt;
| 5&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| 6&lt;br /&gt;
| Protein (&amp;lt;code&amp;gt;polymer.protein&amp;lt;/code&amp;gt; selector)&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;| See [[auto_classify_atoms]] and [[auto_show_classified]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| 7&lt;br /&gt;
| Nucleic acid (&amp;lt;code&amp;gt;polymer.nucleic&amp;lt;/code&amp;gt; selector)&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
| 8-15&lt;br /&gt;
| ''Free for end users to manipulate''&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| 16-23&lt;br /&gt;
| Reserved for external GUIs and linked applications&lt;br /&gt;
|-&lt;br /&gt;
| '''exfoliate'''&lt;br /&gt;
| 24&lt;br /&gt;
| Remove surface from atoms when surfacing (redundant with excluding those atoms from the selection in &amp;lt;code&amp;gt;show surface, sele&amp;lt;/code&amp;gt;)&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;| Affects [[surface]] (with [[surface_mode]]=0), [[dots]] (with [[trim_dots]]=on), [[Get_Area|get_area]]&lt;br /&gt;
|-&lt;br /&gt;
| '''ignore'''&lt;br /&gt;
| 25&lt;br /&gt;
| Ignore atoms altogether when surfacing&lt;br /&gt;
|-&lt;br /&gt;
| '''no_smooth'''&lt;br /&gt;
| 26&lt;br /&gt;
| Do not smooth atom position&lt;br /&gt;
|rowspan=&amp;quot;1&amp;quot;| Affects [[cartoon]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| 27&lt;br /&gt;
| Polymer&lt;br /&gt;
|rowspan=&amp;quot;5&amp;quot;| See [[auto_classify_atoms]] and [[auto_show_classified]]&lt;br /&gt;
&lt;br /&gt;
See [[Selection Algebra]] &amp;quot;Chemical classes&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| 28&lt;br /&gt;
| Solvent&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| 29&lt;br /&gt;
| Organic&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| 30&lt;br /&gt;
| Inorganic&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| 31&lt;br /&gt;
| Guide atom (e.g. CA in proteins)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
 flag flag, selection [, action [, quiet ]]&lt;br /&gt;
&lt;br /&gt;
If the [[auto_indicate_flags]] setting is true, then PyMOL will automatically create a selection called &amp;quot;indicate&amp;quot; which contains all atoms with that flag after applying the command.&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
&lt;br /&gt;
* '''flag''' = int or str: Flag name or value&lt;br /&gt;
* '''selection''' = str: atom selection&lt;br /&gt;
* '''action''' = set|clear|reset: ''Note that &amp;quot;reset&amp;quot; will set the flag on the given selection, and clear it on all other atoms'' {default: reset}&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
[[File:flags-ignore-exfoliate.png|thumb|right|CYS residue with flag &amp;quot;ignore&amp;quot; (left) and flag &amp;quot;exfoliate&amp;quot; (right)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fab AC&lt;br /&gt;
&lt;br /&gt;
# Image on the left&lt;br /&gt;
flag ignore, resn CYS&lt;br /&gt;
show surface&lt;br /&gt;
&lt;br /&gt;
# Image on the right&lt;br /&gt;
flag ignore, all, clear&lt;br /&gt;
flag exfoliate, resn CYS&lt;br /&gt;
rebuild surface&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# in sculpting, ensure the newMethyl group just added doesn't move around&lt;br /&gt;
flag fix, newMethyl&lt;br /&gt;
&lt;br /&gt;
# Introspect the flags bitmask&lt;br /&gt;
iterate all, print(hex(flags))&lt;br /&gt;
&lt;br /&gt;
# Select atoms with &amp;quot;fix&amp;quot; flag&lt;br /&gt;
select fixedatoms, flag 3&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Color_By_Mutations&amp;diff=14755</id>
		<title>Color By Mutations</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Color_By_Mutations&amp;diff=14755"/>
		<updated>2020-06-20T06:52:17Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: Python 3&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This script creates an alignment of two proteins and superimposes them. Aligned residues that are different in the two (i.e. mutations) are highlighted and colored according to their difference in the BLOSUM90 matrix. It is meant to be used for similar proteins, e.g. close homologs or point mutants, to visualize their differences.&lt;br /&gt;
&lt;br /&gt;
Example&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
color_by_mutation protein1, protein2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example: rat trypsin and cow trypsin colored by color_by_mutation.&lt;br /&gt;
&lt;br /&gt;
[[File:color_by_mutation.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''&lt;br /&gt;
created by Christoph Malisi.&lt;br /&gt;
&lt;br /&gt;
Creates an alignment of two proteins and superimposes them. &lt;br /&gt;
Aligned residues that are different in the two (i.e. mutations) are highlighted and &lt;br /&gt;
colored according to their difference in the BLOSUM90 matrix. &lt;br /&gt;
Is meant to be used for similar proteins, e.g. close homologs or point mutants, &lt;br /&gt;
to visualize their differences.&lt;br /&gt;
&lt;br /&gt;
'''&lt;br /&gt;
&lt;br /&gt;
from pymol import cmd&lt;br /&gt;
&lt;br /&gt;
aa_3l = {'ALA':0, 'ARG':1, 'ASN':2, 'ASP':3, 'CYS':4, 'GLN':5, 'GLU':6, 'GLY':7, 'HIS':8, 'ILE':9, 'LEU':10, 'LYS':11,&lt;br /&gt;
        'MET':12, 'PHE':13, 'PRO':14, 'SER':15, 'THR':16, 'TRP':17, 'TYR':18, 'VAL':19, 'B':20, 'Z':21, 'X':22, '*':23}&lt;br /&gt;
&lt;br /&gt;
#            A   R   N   D   C   Q   E   G   H   I   L   K   M   F   P   S   T   W   Y   V   B   Z   X   *&lt;br /&gt;
blosum90 = [[ 5, -2, -2, -3, -1, -1, -1,  0, -2, -2, -2, -1, -2, -3, -1,  1,  0, -4, -3, -1, -2, -1, -1, -6], &lt;br /&gt;
            [-2,  6, -1, -3, -5,  1, -1, -3,  0, -4, -3,  2, -2, -4, -3, -1, -2, -4, -3, -3, -2,  0, -2, -6], &lt;br /&gt;
            [-2, -1,  7,  1, -4,  0, -1, -1,  0, -4, -4,  0, -3, -4, -3,  0,  0, -5, -3, -4,  4, -1, -2, -6], &lt;br /&gt;
            [-3, -3,  1,  7, -5, -1,  1, -2, -2, -5, -5, -1, -4, -5, -3, -1, -2, -6, -4, -5,  4,  0, -2, -6], &lt;br /&gt;
            [-1, -5, -4, -5,  9, -4, -6, -4, -5, -2, -2, -4, -2, -3, -4, -2, -2, -4, -4, -2, -4, -5, -3, -6], &lt;br /&gt;
            [-1,  1,  0, -1, -4,  7,  2, -3,  1, -4, -3,  1,  0, -4, -2, -1, -1, -3, -3, -3, -1,  4, -1, -6], &lt;br /&gt;
            [-1, -1, -1,  1, -6,  2,  6, -3, -1, -4, -4,  0, -3, -5, -2, -1, -1, -5, -4, -3,  0,  4, -2, -6], &lt;br /&gt;
            [ 0, -3, -1, -2, -4, -3, -3,  6, -3, -5, -5, -2, -4, -5, -3, -1, -3, -4, -5, -5, -2, -3, -2, -6], &lt;br /&gt;
            [-2,  0,  0, -2, -5,  1, -1, -3,  8, -4, -4, -1, -3, -2, -3, -2, -2, -3,  1, -4, -1,  0, -2, -6], &lt;br /&gt;
            [-2, -4, -4, -5, -2, -4, -4, -5, -4,  5,  1, -4,  1, -1, -4, -3, -1, -4, -2,  3, -5, -4, -2, -6], &lt;br /&gt;
            [-2, -3, -4, -5, -2, -3, -4, -5, -4,  1,  5, -3,  2,  0, -4, -3, -2, -3, -2,  0, -5, -4, -2, -6], &lt;br /&gt;
            [-1,  2,  0, -1, -4,  1,  0, -2, -1, -4, -3,  6, -2, -4, -2, -1, -1, -5, -3, -3, -1,  1, -1, -6], &lt;br /&gt;
            [-2, -2, -3, -4, -2,  0, -3, -4, -3,  1,  2, -2,  7, -1, -3, -2, -1, -2, -2,  0, -4, -2, -1, -6], &lt;br /&gt;
            [-3, -4, -4, -5, -3, -4, -5, -5, -2, -1,  0, -4, -1,  7, -4, -3, -3,  0,  3, -2, -4, -4, -2, -6], &lt;br /&gt;
            [-1, -3, -3, -3, -4, -2, -2, -3, -3, -4, -4, -2, -3, -4,  8, -2, -2, -5, -4, -3, -3, -2, -2, -6], &lt;br /&gt;
            [ 1, -1,  0, -1, -2, -1, -1, -1, -2, -3, -3, -1, -2, -3, -2,  5,  1, -4, -3, -2,  0, -1, -1, -6], &lt;br /&gt;
            [ 0, -2,  0, -2, -2, -1, -1, -3, -2, -1, -2, -1, -1, -3, -2,  1,  6, -4, -2, -1, -1, -1, -1, -6], &lt;br /&gt;
            [-4, -4, -5, -6, -4, -3, -5, -4, -3, -4, -3, -5, -2,  0, -5, -4, -4, 11,  2, -3, -6, -4, -3, -6], &lt;br /&gt;
            [-3, -3, -3, -4, -4, -3, -4, -5,  1, -2, -2, -3, -2,  3, -4, -3, -2,  2,  8, -3, -4, -3, -2, -6], &lt;br /&gt;
            [-1, -3, -4, -5, -2, -3, -3, -5, -4,  3,  0, -3,  0, -2, -3, -2, -1, -3, -3,  5, -4, -3, -2, -6], &lt;br /&gt;
            [-2, -2,  4,  4, -4, -1,  0, -2, -1, -5, -5, -1, -4, -4, -3,  0, -1, -6, -4, -4,  4,  0, -2, -6], &lt;br /&gt;
            [-1,  0, -1,  0, -5,  4,  4, -3,  0, -4, -4,  1, -2, -4, -2, -1, -1, -4, -3, -3,  0,  4, -1, -6], &lt;br /&gt;
            [-1, -2, -2, -2, -3, -1, -2, -2, -2, -2, -2, -1, -1, -2, -2, -1, -1, -3, -2, -2, -2, -1, -2, -6], &lt;br /&gt;
            [-6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6, -6,  1]] &lt;br /&gt;
&lt;br /&gt;
def getBlosum90ColorName(aa1, aa2):&lt;br /&gt;
    '''returns a rgb color name of a color that represents the similarity of the two residues according to&lt;br /&gt;
       the BLOSUM90 matrix. the color is on a spectrum from blue to red, where blue is very similar, and &lt;br /&gt;
       red very disimilar.'''&lt;br /&gt;
    # return red for residues that are not part of the 20 amino acids&lt;br /&gt;
    if aa1 not in aa_3l or aa2 not in aa_3l:&lt;br /&gt;
        return 'red'&lt;br /&gt;
    &lt;br /&gt;
    # if the two are the same, return blue&lt;br /&gt;
    if aa1 == aa2:&lt;br /&gt;
        return 'blue'&lt;br /&gt;
    i1 = aa_3l[aa1]&lt;br /&gt;
    i2 = aa_3l[aa2]&lt;br /&gt;
    b = blosum90[i1][i2]&lt;br /&gt;
&lt;br /&gt;
    # 3 is the highest score for non-identical substitutions, so substract 4 to get into range [-10, -1]&lt;br /&gt;
    b = abs(b - 4)&lt;br /&gt;
&lt;br /&gt;
    # map to (0, 1]:&lt;br /&gt;
    b = 1. - (b / 10.0)&lt;br /&gt;
&lt;br /&gt;
    # red = [1.0, 0.0, 0.0], blue = [0.0, 0.0, 1.0]&lt;br /&gt;
    colvec = [(0., 0., 1.), (1.,0.,0.)]&lt;br /&gt;
    bcolor = (1.-b, 0., b)&lt;br /&gt;
    col_name = '0x%02x%02x%02x' % tuple(int(b * 0xFF) for b in bcolor)&lt;br /&gt;
    return col_name&lt;br /&gt;
&lt;br /&gt;
def color_by_mutation(obj1, obj2, waters=0, labels=0):&lt;br /&gt;
    '''&lt;br /&gt;
    DESCRIPTION&lt;br /&gt;
    &lt;br /&gt;
        Creates an alignment of two proteins and superimposes them. &lt;br /&gt;
        Aligned residues that are different in the two (i.e. mutations) are highlighted and &lt;br /&gt;
        colored according to their difference in the BLOSUM90 matrix. &lt;br /&gt;
        Is meant to be used for similar proteins, e.g. close homologs or point mutants, &lt;br /&gt;
        to visualize their differences.      &lt;br /&gt;
    &lt;br /&gt;
    USAGE&lt;br /&gt;
    &lt;br /&gt;
        color_by_mutation selection1, selection2 [,waters [,labels ]]&lt;br /&gt;
        &lt;br /&gt;
    ARGUMENTS&lt;br /&gt;
    &lt;br /&gt;
        obj1: object or selection&lt;br /&gt;
        &lt;br /&gt;
        obj2: object or selection    &lt;br /&gt;
        &lt;br /&gt;
        waters: bool (0 or 1). If 1, waters are included in the view, colored&lt;br /&gt;
                differently for the both input structures.&lt;br /&gt;
                default = 0&lt;br /&gt;
&lt;br /&gt;
        labels: bool (0 or 1). If 1, the possibly mutated sidechains are &lt;br /&gt;
                labeled by their chain, name and id&lt;br /&gt;
                default = 0&lt;br /&gt;
        &lt;br /&gt;
    EXAMPLE&lt;br /&gt;
        &lt;br /&gt;
        color_by_mutation protein1, protein2&lt;br /&gt;
        &lt;br /&gt;
    SEE ALSO&lt;br /&gt;
&lt;br /&gt;
        super&lt;br /&gt;
    '''&lt;br /&gt;
    from pymol import stored, CmdException&lt;br /&gt;
&lt;br /&gt;
    if cmd.count_atoms(obj1) == 0:&lt;br /&gt;
        print('%s is empty'%obj1)&lt;br /&gt;
        return&lt;br /&gt;
    if cmd.count_atoms(obj2) == 0:&lt;br /&gt;
        print('%s is empty'%obj2)&lt;br /&gt;
        return&lt;br /&gt;
    waters = int(waters)&lt;br /&gt;
    labels = int(labels)&lt;br /&gt;
    &lt;br /&gt;
    # align the two proteins&lt;br /&gt;
    aln = '__aln'&lt;br /&gt;
    &lt;br /&gt;
    # first, an alignment with 0 cycles (no atoms are rejected, which maximized the number of aligned residues)&lt;br /&gt;
    # for some mutations in the same protein this works fine). This is essentially done to get a&lt;br /&gt;
    # sequence alignment&lt;br /&gt;
    cmd.super(obj1, obj2, object=aln, cycles=0)&lt;br /&gt;
    &lt;br /&gt;
    # superimpose the the object using the default parameters to get a slightly better superimposition,&lt;br /&gt;
    # i.e. get the best structural alignment    &lt;br /&gt;
    cmd.super(obj1, obj2)&lt;br /&gt;
&lt;br /&gt;
    stored.resn1, stored.resn2 = [], []&lt;br /&gt;
    stored.resi1, stored.resi2 = [], []&lt;br /&gt;
    stored.chain1, stored.chain2 = [], []&lt;br /&gt;
    &lt;br /&gt;
    # store residue ids, residue names and chains of aligned residues&lt;br /&gt;
    cmd.iterate(obj1 + ' and name CA and ' + aln, 'stored.resn1.append(resn)')&lt;br /&gt;
    cmd.iterate(obj2 + ' and name CA and ' + aln, 'stored.resn2.append(resn)')&lt;br /&gt;
&lt;br /&gt;
    cmd.iterate(obj1 + ' and name CA and ' + aln, 'stored.resi1.append(resi)')&lt;br /&gt;
    cmd.iterate(obj2 + ' and name CA and ' + aln, 'stored.resi2.append(resi)')&lt;br /&gt;
&lt;br /&gt;
    cmd.iterate(obj1 + ' and name CA and ' + aln, 'stored.chain1.append(chain)')&lt;br /&gt;
    cmd.iterate(obj2 + ' and name CA and ' + aln, 'stored.chain2.append(chain)')&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    mutant_selection = '' &lt;br /&gt;
    non_mutant_selection = 'none or '&lt;br /&gt;
    colors = []&lt;br /&gt;
&lt;br /&gt;
    # loop over the aligned residues&lt;br /&gt;
    for n1, n2, i1, i2, c1, c2 in zip(stored.resn1, stored.resn2,&lt;br /&gt;
                                      stored.resi1, stored.resi2,&lt;br /&gt;
                                      stored.chain1, stored.chain2):&lt;br /&gt;
        # take care of 'empty' chain names&lt;br /&gt;
        if c1 == '':&lt;br /&gt;
            c1 = '&amp;quot;&amp;quot;'&lt;br /&gt;
        if c2 == '':&lt;br /&gt;
            c2 = '&amp;quot;&amp;quot;'&lt;br /&gt;
        if n1 == n2:&lt;br /&gt;
            non_mutant_selection += '((%s and resi %s and chain %s) or (%s and resi %s and chain %s)) or '%(obj1, i1, c1, obj2, i2, c2 )            &lt;br /&gt;
        else:&lt;br /&gt;
            mutant_selection += '((%s and resi %s and chain %s) or (%s and resi %s and chain %s)) or '%(obj1, i1, c1, obj2, i2, c2 )&lt;br /&gt;
            # get the similarity (according to the blosum matrix) of the two residues and&lt;br /&gt;
            c = getBlosum90ColorName(n1, n2)&lt;br /&gt;
            colors.append((c, '%s and resi %s and chain %s and elem C'%(obj2, i2, c2)))&lt;br /&gt;
&lt;br /&gt;
    if mutant_selection == '':&lt;br /&gt;
        raise CmdException('No mutations found')&lt;br /&gt;
&lt;br /&gt;
    # create selections        &lt;br /&gt;
    cmd.select('mutations', mutant_selection[:-4])&lt;br /&gt;
    cmd.select('non_mutations', non_mutant_selection[:-4])&lt;br /&gt;
    cmd.select('not_aligned', '(%s or %s) and not mutations and not non_mutations'%(obj1, obj2))&lt;br /&gt;
    &lt;br /&gt;
    # create the view and coloring&lt;br /&gt;
    cmd.hide('everything', '%s or %s'%(obj1, obj2))&lt;br /&gt;
    cmd.show('cartoon', '%s or %s'%(obj1, obj2))&lt;br /&gt;
    cmd.show('lines', '(%s or %s) and ((non_mutations or not_aligned) and not name c+o+n)'%(obj1, obj2))&lt;br /&gt;
    cmd.show('sticks', '(%s or %s) and mutations and not name c+o+n'%(obj1, obj2))&lt;br /&gt;
    cmd.color('gray', 'elem C and not_aligned')&lt;br /&gt;
    cmd.color('white', 'elem C and non_mutations')&lt;br /&gt;
    cmd.color('blue', 'elem C and mutations and %s'%obj1)&lt;br /&gt;
    for (col, sel) in colors:&lt;br /&gt;
        cmd.color(col, sel)&lt;br /&gt;
&lt;br /&gt;
    cmd.hide('everything', '(hydro) and (%s or %s)'%(obj1, obj2))        &lt;br /&gt;
    cmd.center('%s or %s'%(obj1, obj2))&lt;br /&gt;
    if labels:&lt;br /&gt;
        cmd.label('mutations and name CA','&amp;quot;(%s-%s-%s)&amp;quot;%(chain, resi, resn)')    &lt;br /&gt;
    if waters:&lt;br /&gt;
        cmd.set('sphere_scale', '0.1')&lt;br /&gt;
        cmd.show('spheres', 'resn HOH and (%s or %s)'%(obj1, obj2))&lt;br /&gt;
        cmd.color('red', 'resn HOH and %s'%obj1)&lt;br /&gt;
        cmd.color('salmon', 'resn HOH and %s'%obj2)&lt;br /&gt;
    print('''&lt;br /&gt;
             Mutations are highlighted in blue and red.&lt;br /&gt;
             All mutated sidechains of %s are colored blue, the corresponding ones from %s are&lt;br /&gt;
             colored on a spectrum from blue to red according to how similar the two amino acids are&lt;br /&gt;
             (as measured by the BLOSUM90 substitution matrix).&lt;br /&gt;
             Aligned regions without mutations are colored white.&lt;br /&gt;
             Regions not used for the alignment are gray.&lt;br /&gt;
             NOTE: There could be mutations in the gray regions that were not detected.'''%(obj1, obj2))&lt;br /&gt;
    cmd.delete(aln)&lt;br /&gt;
    cmd.deselect()&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
cmd.extend(&amp;quot;color_by_mutation&amp;quot;, color_by_mutation)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
[[Category:Script_Library|Color By Mutation]]&lt;br /&gt;
[[Category:Script_Library]] [[Category:Structural_Biology_Scripts]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Get_Area&amp;diff=14757</id>
		<title>Get Area</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Get_Area&amp;diff=14757"/>
		<updated>2020-06-16T13:35:00Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: dot_hydrogens&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''get_area''' calculates the surface area in square Angstroms of the selection given. Note that the accessibility is assessed in the context of the object(s) that the selection is part of. So, to get the surface areas of e.g. a component of a complex, you should make a new object containing a copy of just that component and calculate its area.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;get_area selection&amp;quot; command will return the effective surface area of the dots that you would see from &amp;quot;[[show]] [[dots]], selection&amp;quot;.  This is a discrete approximation -- not an exact calculation.&lt;br /&gt;
&lt;br /&gt;
'''Attention:''' Atoms with the &amp;quot;[[Surface#Calculating_a_partial_surface|ignore]]&amp;quot; [[flag]] may lead to unexpected results (their entire sphere surface is counted instead of their molecular surface contribution). Clear the &amp;quot;ignore&amp;quot; flag first or exclude those atoms from the calculation.&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
 get_area [ selection [, state [, load_b ]]]&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
&lt;br /&gt;
* '''selection''' = str: atom selection {default: all}&lt;br /&gt;
* '''state''' = int: object state {default: 1}&lt;br /&gt;
* '''load_b''' = 0/1: Load the surface area per atom into the b-factor {default: 0}&lt;br /&gt;
&lt;br /&gt;
== Settings ==&lt;br /&gt;
&lt;br /&gt;
The following PyMOL settings control how '''get_area''' works:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Setting&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[dot_solvent]]&lt;br /&gt;
| '''0''' = calculate '''molecular surface''' area {default}&lt;br /&gt;
'''1''' = calculate '''solvent accessible surface''' area (SASA)&lt;br /&gt;
|-&lt;br /&gt;
| [[dot_density]]&lt;br /&gt;
| 1-4 {default: 2}. Sampling density. Higher density (more dots) means higher accuracy but slower performance.&lt;br /&gt;
|-&lt;br /&gt;
| [[solvent_radius]]&lt;br /&gt;
| The solvent radius {default: 1.4}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The [[dot_hydrogens]] setting is '''not''' used.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
PyMOL&amp;gt; load $TUT/1hpv.pdb&lt;br /&gt;
PyMOL&amp;gt; show dots, resn arg&lt;br /&gt;
PyMOL&amp;gt; get_area resn arg&lt;br /&gt;
cmd.get_area: 1147.956 Angstroms^2.&lt;br /&gt;
PyMOL&amp;gt;set dot_solvent, on&lt;br /&gt;
PyMOL&amp;gt;get_area resn arg&lt;br /&gt;
 cmd.get_area: 673.084 Angstroms^2.&lt;br /&gt;
PyMOL&amp;gt;set dot_density, 3&lt;br /&gt;
PyMOL&amp;gt;get_area resn arg&lt;br /&gt;
 cmd.get_area: 674.157 Angstroms^2.&lt;br /&gt;
PyMOL&amp;gt;set dot_density, 4&lt;br /&gt;
PyMOL&amp;gt;get_area resn arg&lt;br /&gt;
 cmd.get_area: 672.056 Angstroms^2.&lt;br /&gt;
PyMOL&amp;gt;get_area all&lt;br /&gt;
 cmd.get_area: 13837.804 Angstroms^2.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
This code has not been recently validated though it was checked a couple years back. We suggest that people perform some kind of independent check on their system before trusting the results.  &lt;br /&gt;
&lt;br /&gt;
== Python API ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
float cmd.get_area(str selection=&amp;quot;(all)&amp;quot;, int state=1, int load_b=0)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
== Example 1 - starting with a complex in a single file ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# load complex&lt;br /&gt;
# Haemoglobin in this example illustrates careful use of selection algebra&lt;br /&gt;
load 2HHB.pdb&lt;br /&gt;
&lt;br /&gt;
# create objects for alpha1, beta1 and alpha1,beta1 pair of subunits&lt;br /&gt;
create alpha1, 2HHB and chain A&lt;br /&gt;
create beta1, 2HHB and chain B&lt;br /&gt;
create ab1, 2HHB and chain A+B&lt;br /&gt;
&lt;br /&gt;
# get hydrogens onto everything (NOTE: must have valid valences on e.g. small organic molecules)&lt;br /&gt;
h_add&lt;br /&gt;
&lt;br /&gt;
# make sure all atoms within an object occlude one another&lt;br /&gt;
flag ignore, none&lt;br /&gt;
&lt;br /&gt;
# use solvent-accessible surface with high sampling density&lt;br /&gt;
set dot_solvent, 1&lt;br /&gt;
set dot_density, 3&lt;br /&gt;
&lt;br /&gt;
# measure the components individually storing the results for later&lt;br /&gt;
alpha1_area=cmd.get_area(&amp;quot;alpha1&amp;quot;)&lt;br /&gt;
beta1_area=cmd.get_area(&amp;quot;beta1&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# measure the alpha1,beta1 pair&lt;br /&gt;
ab1_area=cmd.get_area(&amp;quot;ab1&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# now print results and do some maths to get the buried surface&lt;br /&gt;
print alpha1_area&lt;br /&gt;
print beta1_area&lt;br /&gt;
print ab1_area&lt;br /&gt;
print (alpha1_area + beta1_area) - ab1_area&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example 2 - starting with two components in separate files ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# load components separately&lt;br /&gt;
load my_ligand.pdb&lt;br /&gt;
load my_target.pdb&lt;br /&gt;
&lt;br /&gt;
# get hydrogens onto everything (NOTE: must have valid valences on the ligand...)&lt;br /&gt;
h_add&lt;br /&gt;
&lt;br /&gt;
# make sure all atoms within an object occlude one another&lt;br /&gt;
flag ignore, none&lt;br /&gt;
&lt;br /&gt;
# use solvent-accessible surface with high sampling density&lt;br /&gt;
set dot_solvent, 1&lt;br /&gt;
set dot_density, 3&lt;br /&gt;
&lt;br /&gt;
# measure the components individually&lt;br /&gt;
ligand_area=cmd.get_area(&amp;quot;my_ligand&amp;quot;)&lt;br /&gt;
target_area=cmd.get_area(&amp;quot;my_target&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# create the complex&lt;br /&gt;
create my_complex, my_ligand my_target&lt;br /&gt;
&lt;br /&gt;
# measure the complex&lt;br /&gt;
complex_area=cmd.get_area(&amp;quot;my_complex&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# now print results&lt;br /&gt;
print ligand_area&lt;br /&gt;
print target_area&lt;br /&gt;
print complex_area&lt;br /&gt;
print (ligand_area + target_area) - complex_area&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example 3 - using load_b to get surface area per atom ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# example usage of load_b&lt;br /&gt;
# select some organic small molecule&lt;br /&gt;
select ligand, br. first organic&lt;br /&gt;
# get its area and load it into it's b-factor column&lt;br /&gt;
get_area ligand, load_b=1&lt;br /&gt;
# print out the b-factor/areas per atom&lt;br /&gt;
iterate ligand, print b&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Example 4 - using a Python script to compute the SASA for individual residues==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import __main__&lt;br /&gt;
__main__.pymol_argv = ['pymol','-qc']&lt;br /&gt;
import pymol&lt;br /&gt;
from pymol import cmd, stored&lt;br /&gt;
pymol.finish_launching()&lt;br /&gt;
&lt;br /&gt;
cmd.set('dot_solvent', 1)&lt;br /&gt;
cmd.set('dot_density', 3)&lt;br /&gt;
&lt;br /&gt;
cmd.load('file.pdb')  # use the name of your pdb file&lt;br /&gt;
stored.residues = []&lt;br /&gt;
cmd.iterate('name ca', 'stored.residues.append(resi)')&lt;br /&gt;
&lt;br /&gt;
sasa_per_residue = []&lt;br /&gt;
for i in stored.residues:&lt;br /&gt;
    sasa_per_residue.append(cmd.get_area('resi %s' % i))&lt;br /&gt;
&lt;br /&gt;
print sum(sasa_per_residue)&lt;br /&gt;
print cmd.get_area('all')  # just to check that the sum of sasa per residue equals the total area&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
* For an example of '''load_b''' in use check out [[FindSurfaceResidues]].&lt;br /&gt;
* [[Surface]], most notably [[Surface#Calculating_a_partial_surface]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Get Area]]&lt;br /&gt;
[[Category:Biochemical_Properties|Get Area]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=14759</id>
		<title>Linux Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=14759"/>
		<updated>2020-06-05T09:48:23Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: Python 3&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how to install PyMOL on Linux.&lt;br /&gt;
&lt;br /&gt;
== Incentive PyMOL ==&lt;br /&gt;
&lt;br /&gt;
[http://www.schrodinger.com Schrödinger] provides pre-compiled (64 bit) PyMOL to paying sponsors. The bundle also includes ready-to-use [[APBS]], [[morph|RigiMOL]], an MPEG encoder for movie export, and a small molecule energy minimization engine.&lt;br /&gt;
&lt;br /&gt;
Download: https://pymol.org/&lt;br /&gt;
&lt;br /&gt;
== Open-Source PyMOL in Linux Distros ==&lt;br /&gt;
&lt;br /&gt;
Many Linux distributions provide binary packages for open-source PyMOL. They often do not provide the latest version, but if the provided package fits your needs this is the most convenient way to install PyMOL.&lt;br /&gt;
&lt;br /&gt;
Command line install examples for some popular distributions (note that all of these commands must be run as root or superuser):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Arch/Manjaro&lt;br /&gt;
pacman -S pymol&lt;br /&gt;
&lt;br /&gt;
# CentOS with EPEL&lt;br /&gt;
rpm -i http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm&lt;br /&gt;
yum --enablerepo=epel install pymol&lt;br /&gt;
&lt;br /&gt;
# Debian/Ubuntu/Mint&lt;br /&gt;
apt-get install pymol&lt;br /&gt;
&lt;br /&gt;
# Fedora&lt;br /&gt;
dnf install pymol&lt;br /&gt;
&lt;br /&gt;
# Gentoo&lt;br /&gt;
emerge -av pymol&lt;br /&gt;
&lt;br /&gt;
# openSUSE (12.1 and later)&lt;br /&gt;
zypper install pymol&lt;br /&gt;
&lt;br /&gt;
# Sabayon&lt;br /&gt;
equo i -av pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Install from source ==&lt;br /&gt;
&lt;br /&gt;
Installation from source gives you the latest version and is the generic way to install PyMOL.&lt;br /&gt;
&lt;br /&gt;
Please also consult the [https://github.com/schrodinger/pymol-open-source/blob/master/INSTALL INSTALL] file.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Libraries as well as development files (headers) of the following software is&lt;br /&gt;
required:&lt;br /&gt;
&lt;br /&gt;
* C++11 compiler (e.g. GCC 4.7 or higher)&lt;br /&gt;
* [http://www.python.org/ Python] 3.6+&lt;br /&gt;
* OpenGL driver (I use [http://www.nvidia.com/object/unix.html NVidia])&lt;br /&gt;
* GLEW&lt;br /&gt;
* libpng&lt;br /&gt;
* freetype&lt;br /&gt;
* libxml2 (optional, for COLLADA export, disable with &amp;lt;code&amp;gt;--no-libxml&amp;lt;/code&amp;gt;)&lt;br /&gt;
* [https://github.com/msgpack/msgpack-c msgpack-c] 2.1.5+ (optional, for fast [http://mmtf.rcsb.org/ MMTF] loading, new in SVN r4167, disable with &amp;lt;code&amp;gt;--use-msgpackc=no&amp;lt;/code&amp;gt;)&lt;br /&gt;
* PyQt5, PyQt4, or PySide (optional, will fall back to Tk interface if compiled with &amp;lt;code&amp;gt;--glut&amp;lt;/code&amp;gt;)&lt;br /&gt;
* [https://glm.g-truc.net/ glm]&lt;br /&gt;
* [https://github.com/rcsb/mmtf-cpp mmtf-cpp] (optional, for [http://mmtf.rcsb.org/ MMTF] export, disable with &amp;lt;code&amp;gt;--use-msgpackc=no&amp;lt;/code&amp;gt;)&lt;br /&gt;
* libnetcdf (optional, disable with &amp;lt;code&amp;gt;--no-vmd-plugins&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
Optional/deprecated:&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/schrodinger/pmw-patched Pmw] (Python Megawidgets, for legacy GUI/plugins)&lt;br /&gt;
* GLUT/freeglut (enable with &amp;lt;code&amp;gt;--glut&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
On many Linux systems, one of the following commands installs all requirements (and must be run as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Debian/Ubuntu/Mint&lt;br /&gt;
apt-get install git build-essential python3-dev libglew-dev \&lt;br /&gt;
  libpng-dev libfreetype6-dev libxml2-dev \&lt;br /&gt;
  libmsgpack-dev python3-pyqt5.qtopengl libglm-dev libnetcdf-dev&lt;br /&gt;
&lt;br /&gt;
# CentOS&lt;br /&gt;
yum install gcc gcc-c++ kernel-devel python-devel tkinter python-pmw glew-devel \&lt;br /&gt;
  freeglut-devel libpng-devel freetype-devel libxml2-devel glm-devel \&lt;br /&gt;
  msgpack-devel netcdf-devel&lt;br /&gt;
&lt;br /&gt;
# Fedora&lt;br /&gt;
dnf install gcc gcc-c++ kernel-devel python3-devel glew-devel PyQt5 msgpack-devel \&lt;br /&gt;
  freeglut-devel libpng-devel freetype-devel libxml2-devel glm-devel&lt;br /&gt;
&lt;br /&gt;
# Gentoo&lt;br /&gt;
emerge -av dev-lang/python dev-python/pmw media-libs/glew \&lt;br /&gt;
  media-libs/freeglut media-libs/libpng media-libs/freetype media-libs/glm&lt;br /&gt;
&lt;br /&gt;
# openSUSE&lt;br /&gt;
zypper install python-devel freeglut-devel gcc-c++ glew-devel libpng-devel python-pmw glm&lt;br /&gt;
&lt;br /&gt;
# Sabayon&lt;br /&gt;
equo i -av dev-lang/python dev-python/pmw media-libs/glew \&lt;br /&gt;
  media-libs/freeglut media-libs/libpng media-libs/freetype&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get latest source from Git ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/schrodinger/pymol-open-source.git&lt;br /&gt;
git clone https://github.com/rcsb/mmtf-cpp.git&lt;br /&gt;
mv mmtf-cpp/include/mmtf* pymol-open-source/include/&lt;br /&gt;
cd pymol-open-source&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''The master branch requires Python 3.6+. Use the legacy [https://github.com/schrodinger/pymol-open-source/tree/py2 py2] branch for Python 2.7 compatibility.''&lt;br /&gt;
&lt;br /&gt;
=== Libraries in non-standard places ===&lt;br /&gt;
&lt;br /&gt;
Optional: You may use the colon-delimited &amp;lt;code&amp;gt;$PREFIX_PATH&amp;lt;/code&amp;gt; variable to point &amp;lt;code&amp;gt;setup.py&amp;lt;/code&amp;gt; to non-standard locations of libraries and headers (those locations should have &amp;lt;code&amp;gt;include&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;lib&amp;lt;/code&amp;gt; directories).&lt;br /&gt;
&lt;br /&gt;
=== Compile and install ===&lt;br /&gt;
&lt;br /&gt;
This will install PyMOL as normal user into &amp;lt;code&amp;gt;$HOME/pymol-open-source-build&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -e&lt;br /&gt;
&lt;br /&gt;
prefix=$HOME/pymol-open-source-build&lt;br /&gt;
&lt;br /&gt;
# Example for dependencies in non-standard places&lt;br /&gt;
# export PREFIX_PATH=&amp;quot;$HOME/extra/glew-2.0.0:$HOME/extra/libpng-1.6.5:/opt/local&amp;quot;&lt;br /&gt;
&lt;br /&gt;
python3 setup.py build install \&lt;br /&gt;
    --home=$prefix&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now launch PyMOL like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$HOME/pymol-open-source-build/bin/pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
* Do do a &amp;quot;clean&amp;quot; build, remove the &amp;quot;build&amp;quot; directory (sometimes necessary if &amp;quot;git pull&amp;quot; changed header files)&lt;br /&gt;
&lt;br /&gt;
* If you are using Ubuntu with a NVIDIA graphic card and generic drivers you may experience bad rendering, black pixelation and other graphical oddities. A guide to installing NVIDIA proprietary drivers can be found under [https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia Ubuntu community Nvidia Drivers How To]&lt;br /&gt;
&lt;br /&gt;
== Customized Installations ==&lt;br /&gt;
&lt;br /&gt;
* [[User:Tlinnet/Linux_Install|Troels Linnet's installations scripts]]: Detailed installation scripts for Ubuntu, Mint 12 and RHEL 6, including MPEG support from FREEMOL&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation|Linux Installation]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Mcsalign&amp;diff=14761</id>
		<title>Mcsalign</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Mcsalign&amp;diff=14761"/>
		<updated>2020-05-27T14:43:39Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: extra_fit example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox psico&lt;br /&gt;
|module    =  psico.mcsalign&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[mcsalign]] aligns two small-molecule selections based on Maximum-Common-Substructure.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
[[mcsalign]] is available from the [[psico]] package and requires [http://www.rdkit.org/ rdkit] and [https://github.com/csb-toolbox/CSB csb].&lt;br /&gt;
&lt;br /&gt;
All dependencies are available from [https://anaconda.org Anaconda Cloud]:&lt;br /&gt;
&lt;br /&gt;
 conda install -c schrodinger pymol&lt;br /&gt;
 conda install -c schrodinger pymol-psico&lt;br /&gt;
 conda install -c rdkit rdkit&lt;br /&gt;
 conda install -c speleo3 csb&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
 mcsalign mobile, target [, mobile_state [, target_state&lt;br /&gt;
     [, cycles [, timeout [, method ]]]]]&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
&lt;br /&gt;
* '''mobile''' = str: atom selection of mobile object&lt;br /&gt;
* '''target''' = str: atom selection of target object&lt;br /&gt;
* '''mobile_state''' = int: object state of mobile selection {default: -1 = current state}&lt;br /&gt;
* '''target_state''' = int: object state of target selection {default: -1 = current state}&lt;br /&gt;
* '''cycles''' = int: number of weight-refinement iterations for weighted RMS fitting {default: 5}&lt;br /&gt;
* '''timeout''' = int: MCS search timeout in seconds {default: 10}&lt;br /&gt;
* '''method''' = indigo or rdkit {default: check availability}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Align Cytochrome C and Hemoglobin based on their Heme moieties:&lt;br /&gt;
&lt;br /&gt;
 fetch 3zcf 4n8t, async=0&lt;br /&gt;
 zoom /4n8t//A/HEM, animate=2, buffer=3&lt;br /&gt;
 &lt;br /&gt;
 import psico.mcsalign&lt;br /&gt;
 mcsalign /3zcf//A/HEC, /4n8t//A/HEM&lt;br /&gt;
&lt;br /&gt;
Align a set of small molecules to a reference&lt;br /&gt;
&lt;br /&gt;
 fetch ala ile arg trp met&lt;br /&gt;
 extra_fit *, ala, method=mcsalign&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[align]]&lt;br /&gt;
* [[pair_fit]]&lt;br /&gt;
* [[LigAlign]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script Library]]&lt;br /&gt;
[[Category:Structural_Biology_Scripts]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Builder&amp;diff=14751</id>
		<title>Builder</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Builder&amp;diff=14751"/>
		<updated>2020-05-26T19:06:51Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: Incentive PyMOL 2.3&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
The [[Builder]] is a PyMOL GUI menu that allows you to easily build up structures by hand from various elements like atoms, fragments, rings, amino acids, etc.  You can also assign charge, secondary structure, etc.&lt;br /&gt;
&lt;br /&gt;
To access the [[Builder]] simply select the &amp;quot;Builder&amp;quot; option from the PyMOL GUI (see images).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Builder0.png|Builder button in the GUI&lt;br /&gt;
Image:Builder1.png|Builder activated.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Nucleic Acid Builder =&lt;br /&gt;
&lt;br /&gt;
As of '''Incentive PyMOL 2.3''', building can also be done with nucleic acids.&lt;br /&gt;
&lt;br /&gt;
[[File:DNA_Builder1.png]]&lt;br /&gt;
&lt;br /&gt;
Click the 'Builder' button in the top-right panel.&lt;br /&gt;
&lt;br /&gt;
[[File:DNA_Builder2.png]]&lt;br /&gt;
&lt;br /&gt;
Once selecting &amp;quot;Nucleic Acids&amp;quot;, you will presented options for building either DNA or RNA. For DNA, you can specify the custom DNA's form (A-DNA or B-DNA) and whether the DNA should be single- or double-stranded.&lt;br /&gt;
&lt;br /&gt;
[[File:DNA_Builder3.png]]&lt;br /&gt;
&lt;br /&gt;
When ready, select the base type for the nucleic acid by clicking on the button with its specified one-letter code (e.g. A, T, U, C, or G) and select &amp;quot;Create As New Object&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:DNA_Builder4.png]]&lt;br /&gt;
&lt;br /&gt;
To extend the DNA, select a terminal 5' phosphate or 3' oxygen.&lt;br /&gt;
&lt;br /&gt;
You can see the change in the nucleic acid's sequence in real-time (Display-&amp;gt; Sequence). For double-stranded DNA, positive residue indices are base-paired to its negative counterpart (5 base-paired with -5, 12 base-paired with -12, etc...). &lt;br /&gt;
&lt;br /&gt;
Once finished, click the &amp;quot;Done&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
[[File:DNA_Builder5.png]]&lt;br /&gt;
&lt;br /&gt;
Here is an example finished product from the DNA builder.&lt;br /&gt;
&lt;br /&gt;
[[Category:Builder]]&lt;br /&gt;
[[Category:Building]]&lt;br /&gt;
[[Category:Modeling]]&lt;br /&gt;
[[Category:Editing]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Main_Page&amp;diff=14710</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Main_Page&amp;diff=14710"/>
		<updated>2020-05-20T08:38:32Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: PyMOL 2.4&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;100%&amp;quot; style=&amp;quot;background: #B22222; margin-bottom: 4em; border-bottom: 1px solid #B22222; border-left: 1px solid #B22222; border-right: 1px solid #B22222;&amp;quot;&lt;br /&gt;
|+ style=&amp;quot;font-size: 1.0em; font-weight: normal; color: #FFFFFF; text-align:right; background: #B22222; padding-top:0.5em; padding-bottom: 0.25em; padding-right: 0.60em; border-top: 2px solid #B22222; border-bottom: 1px solid #fff;&amp;quot; |hosted by [[File:SBGridlogo2.jpg|140 px|link=https://sbgrid.org/]]&lt;br /&gt;
|}&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; style=&amp;quot;padding-bottom: 3em;&amp;quot;&lt;br /&gt;
|+ style=&amp;quot;font-size:210%; font-weight: bold; color:#000000; text-align:center; padding: 5px; margin-bottom: 4px;&amp;quot; | Welcome to the PyMOL Wiki!&lt;br /&gt;
|- style=&amp;quot;text-align:center; font-weight: normal; color: #000000; font-size: 120%; font-family: sans-serif;&amp;quot;&lt;br /&gt;
| The community-run support site for the [http://pymol.org PyMOL] molecular viewer.&lt;br /&gt;
|- style=&amp;quot;text-align:center; font-weight:normal; color: #000000; font-size: 120%; font-family: sans-serif;&amp;quot;&lt;br /&gt;
| To request a new account, email SBGrid at:  accounts (@) sbgrid dot org&lt;br /&gt;
|- style=&amp;quot;text-align:center; font-weight:bold; color: #000000; font-size: 120%; font-family: sans-serif;&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot; width=&amp;quot;45%&amp;quot; style=&amp;quot;background: #FFFFFF; margin-bottom: 4em; border-bottom: 1px solid #AFB29E; border-left: 1px solid #AFB29E; border-right: 1px solid #AFB29E;&amp;quot;&lt;br /&gt;
|+ style=&amp;quot;font-size: 1.4em; font-weight: bold; color: #FFFFFF; text-align:center; background: #000000; padding-top:0.5em; padding-bottom: 0.25em; border-top: 2px solid #000000; border-bottom: 1px solid #fff;&amp;quot; |Quick Links&lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;font-size: 1.1em; font-weight: normal; color #48A2B4; padding: 0.5em 1em 0.5em 3em;&amp;quot;|'''[[:Category:Tutorials|Tutorials]]''' || '''[[TOPTOC|Table of Contents]]''' || '''[[:Category:Commands|Commands]]'''&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;font-size: 1.1em; font-weight: normal; color #48A2B4; padding: 0.5em 1em 0.5em 3em;&amp;quot;|'''[[:Category:Script_Library|Script Library]]''' || '''[[:Category:Plugins|Plugins]]''' || '''[[:Category:FAQ|FAQ]]'''&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;font-size: 1.1em; font-weight: normal; color #48A2B4; padding: 0.5em 1em 0.5em 3em;&amp;quot;|'''[[Gallery]]''' | '''[[Covers]]'''&lt;br /&gt;
||'''[[CheatSheet|PyMOL Cheat Sheet]]''' (''[[Media:PymolRef.pdf|PDF]]'')&lt;br /&gt;
||'''[[PyMOL_mailing_list|Getting Help]]'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
| style=&amp;quot;vertical-align: top; width: 40%&amp;quot; |&lt;br /&gt;
{| class=&amp;quot;jtable&amp;quot; style=&amp;quot;float: left; width: 90%;&amp;quot;&lt;br /&gt;
|+ style=&amp;quot;font-size: 1.4em; font-weight: bold; text-align:left; border-bottom: 2px solid #6678b1;&amp;quot; | News &amp;amp;amp; Updates&lt;br /&gt;
|-&lt;br /&gt;
! Official Release&lt;br /&gt;
| [https://pymol.org PyMOL v2.4 has been released] on May 20, 2020.&lt;br /&gt;
|-&lt;br /&gt;
! Python 3&lt;br /&gt;
| New [[2to3|Python 3 compatibility guide]] for scripts and plugins&lt;br /&gt;
|-&lt;br /&gt;
! Official Release&lt;br /&gt;
| [https://pymol.org PyMOL v2.3 has been released] on February 11, 2019.&lt;br /&gt;
|-&lt;br /&gt;
! POSF&lt;br /&gt;
| [https://pymol.org/fellowship New PyMOL fellows announced for 2018-2019]&lt;br /&gt;
|-&lt;br /&gt;
! Tutorial&lt;br /&gt;
| [[Plugins Tutorial]] updated for PyQt5&lt;br /&gt;
|-&lt;br /&gt;
! New Plugin&lt;br /&gt;
| [[ProBiS_H2O|ProBiS H2O]] is a new plugin for identification of conserved waters in protein structures.&lt;br /&gt;
|-&lt;br /&gt;
! Selection keywords&lt;br /&gt;
| New [[Selection Algebra|polymer.protein and polymer.nucleic]] selection keywords. Thanks everyone who participated in the [https://goo.gl/forms/r0Ck03VTytZQxN4A2 poll]!&lt;br /&gt;
|-&lt;br /&gt;
! Plugin Update&lt;br /&gt;
| [[MOLE 2.0: advanced approach for analysis of biomacromolecular channels|MOLE 2.5]] is an updated version of channel analysis software in PyMOL&lt;br /&gt;
|-&lt;br /&gt;
! New Script&lt;br /&gt;
| [[dssr_block]] is a wrapper for DSSR (3dna) and creates block-shaped nucleic acid cartoons&lt;br /&gt;
|-&lt;br /&gt;
! Older News&lt;br /&gt;
| See [[Older_News|Older News]].&lt;br /&gt;
|}&lt;br /&gt;
|style=&amp;quot;vertical-align: top; width: 40%&amp;quot;|&lt;br /&gt;
{| class=&amp;quot;jtable&amp;quot; style=&amp;quot;float: right; width: 90%&amp;quot;&lt;br /&gt;
|+ style=&amp;quot;font-size: 1.4em; font-weight: bold; text-align:left; border-bottom: 2px solid #6678b1;&amp;quot; |Did you know...&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;div class=&amp;quot;didyouknow&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;DynamicPageList&amp;gt;&lt;br /&gt;
randomcount=1&lt;br /&gt;
category=Commands|Plugins|Script_Library|Settings&lt;br /&gt;
includepage=*&lt;br /&gt;
includemaxlength=1050&lt;br /&gt;
escapelinks=false&lt;br /&gt;
allowcachedresults=false&lt;br /&gt;
resultsheader=__NOTOC__ __NOEDITSECTION__&lt;br /&gt;
listseparators=,&amp;lt;h3&amp;gt;[[%PAGE%]]&amp;lt;/h3&amp;gt;,,\n&lt;br /&gt;
&amp;lt;/DynamicPageList&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
|&lt;br /&gt;
|style=&amp;quot;vertical-align: top; width: 18%&amp;quot;|&lt;br /&gt;
&amp;lt;DynamicPageList&amp;gt;&lt;br /&gt;
imagecontainer=Covers&lt;br /&gt;
randomcount=1&lt;br /&gt;
escapelinks=false&lt;br /&gt;
openreferences=true&lt;br /&gt;
listseparators=[[,%PAGE%,|thumb|185px|A Random PyMOL-generated Cover.  See [[Covers]].]],\n&lt;br /&gt;
ordermethod=none&lt;br /&gt;
allowcachedresults=false&lt;br /&gt;
&amp;lt;/DynamicPageList&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Dssr_block&amp;diff=14712</id>
		<title>Dssr block</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Dssr_block&amp;diff=14712"/>
		<updated>2020-05-18T16:58:25Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: web server link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = script&lt;br /&gt;
|filename  = dssr_block.py&lt;br /&gt;
|author    = [[User:Speleo3|Thomas Holder]]&lt;br /&gt;
|license   = BSD-2-Clause&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[File:Trna.png|300px|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
This script adds the [[dssr_block]] command, which is a simple wrapper for the '''DSSR''' program and can create &amp;quot;block&amp;quot; shaped cartoons for nucleic acid bases and base pairs.&lt;br /&gt;
&lt;br /&gt;
''Requires the '''x3dna-dssr''' executable, obtainable from http://x3dna.org''&lt;br /&gt;
&lt;br /&gt;
Instead of installing '''x3dna-dssr''' and the plugin locally, you can also use the web server at http://skmatic.x3dna.org/&lt;br /&gt;
&lt;br /&gt;
See also the blog post by DSSR author Xiang-Jun Lu: http://x3dna.org/highlights/dssr-base-blocks-in-pymol-interactively&lt;br /&gt;
&lt;br /&gt;
== Recommended Setup ==&lt;br /&gt;
&lt;br /&gt;
Place the '''x3dna-dssr''' executable into '''$PATH'''. Examples:&lt;br /&gt;
&lt;br /&gt;
* Linux/Mac: '''/usr/bin/x3dna-dssr'''&lt;br /&gt;
* Windows: '''C:\Program Files\PyMOL\PyMOL\x3dna-dssr.exe'''&lt;br /&gt;
&lt;br /&gt;
The script can be [[run]], imported as a Python module, or installed with the [[Plugin Manager]].&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
 dssr_block [ selection [, state [, block_file [, block_depth&lt;br /&gt;
        [, block_color [, name [, exe ]]]]]]]&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
&lt;br /&gt;
* '''selection''' = str: atom selection {default: all}&lt;br /&gt;
* '''state''' = int: object state (0 for all states) {default: -1, current state}&lt;br /&gt;
* '''block_file''' = face|edge|wc|equal|minor|gray: Corresponds to the '''--block-file''' option (see [http://x3dna.org/ DSSR manual]). Values can be combined, e.g. &amp;quot;wc-minor&amp;quot;. {default: face}&lt;br /&gt;
* '''block_depth''' = float: thickness of rectangular blocks {default: 0.5}&lt;br /&gt;
* '''block_color''' = str: Corresponds to the '''--block-color''' option (new in DSSR v1.5.2) {default: }&lt;br /&gt;
* '''name''' = str: name of new CGO object {default: dssr_block##}&lt;br /&gt;
* '''exe''' = str: path to &amp;quot;x3dna-dssr&amp;quot; executable {default: x3dna-dssr}&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
Combining DSSR block representation with regular PyMOL cartoons:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 1ehz, async=0&lt;br /&gt;
as cartoon&lt;br /&gt;
set cartoon_ladder_radius, 0.1&lt;br /&gt;
set cartoon_ladder_color, gray&lt;br /&gt;
set cartoon_nucleic_acid_mode, 1&lt;br /&gt;
dssr_block&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Joined base-pair blocks (block_file=wc):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 1ehz, async=0&lt;br /&gt;
dssr_block block_file=wc&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Multi-state Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 2n2d, async=0&lt;br /&gt;
dssr_block 2n2d, 0&lt;br /&gt;
set all_states&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Custom coloring:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 1msy, async=0&lt;br /&gt;
dssr_block block_color=N red | minor 0.9 | major yellow&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[3DNA]] (old, obsoleted by x3dna-dssr)&lt;br /&gt;
* [[Overview of nucleic acid cartoons]]&lt;br /&gt;
* http://skmatic.x3dna.org/&lt;br /&gt;
&lt;br /&gt;
[[Category:Structural_Biology_Scripts]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Launching_From_a_Script&amp;diff=14714</id>
		<title>Launching From a Script</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Launching_From_a_Script&amp;diff=14714"/>
		<updated>2020-05-14T09:04:05Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: finish_launching not supported on macOS&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;background-color: #ccc; padding: 20px&amp;quot;&amp;gt;&lt;br /&gt;
The recommended way to run PyMOL-Python scripts is by using PyMOL as the interpreter. This is supported by all versions of PyMOL, including the pre-compiled bundles provided by Schrödinger.&lt;br /&gt;
&lt;br /&gt;
Example from a shell:&lt;br /&gt;
&lt;br /&gt;
 shell&amp;gt; pymol -cq script.py&lt;br /&gt;
&lt;br /&gt;
With arguments (''sys.argv'' becomes ''[&amp;quot;script.py&amp;quot;, &amp;quot;foo&amp;quot;, &amp;quot;bar&amp;quot;]''):&lt;br /&gt;
&lt;br /&gt;
 shell&amp;gt; pymol -cq script.py -- foo bar&lt;br /&gt;
&lt;br /&gt;
Example from a running PyMOL instance:&lt;br /&gt;
&lt;br /&gt;
 PyMOL&amp;gt; run script.py&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For advanced users, the following PyMOL versions also allow to run PyMOL from an existing Python process:&lt;br /&gt;
&lt;br /&gt;
* [https://pymol.org/2/#download PyMOL 2.0] based on Anaconda (using Anaconda's python, which is included in bundles provided by Schrödinger)&lt;br /&gt;
* Open-Source PyMOL&lt;br /&gt;
* Schrödinger-provided &amp;quot;[http://pymol.org/download Mac alternative X11-only build]&amp;quot; of the 1.8.x series&lt;br /&gt;
&lt;br /&gt;
After importing the '''pymol''' module, PyMOL's event loop has to be started with a call to '''pymol.finish_launching()''' ''(not supported on macOS)''.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
With PyMOL 2.1, calling any pymol.cmd function will automatically start a backend process without the GUI in the main thread. &amp;quot;finish_launching&amp;quot; should not be necessary, and will launch PyMOL in a new thread with an event loop, which will cause 100% CPU usage (at least with &amp;quot;-c&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from pymol import cmd&lt;br /&gt;
cmd.fragment('ala')&lt;br /&gt;
cmd.zoom()&lt;br /&gt;
cmd.png('/tmp/test.png', 300, 200)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since PyMOL 1.7.4, the following form is sufficient:&lt;br /&gt;
&lt;br /&gt;
''This is not supported on macOS (see [https://github.com/schrodinger/pymol-open-source/issues/28 bug report])''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import pymol&lt;br /&gt;
pymol.finish_launching(['pymol', '-q'])&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before 1.7.4, either &amp;quot;-K&amp;quot; was needed as an additional argument, or arguments had to be assigned to __main__.pymol_argv or pymol.pymol_argv.&lt;br /&gt;
&lt;br /&gt;
== Example 1 ==&lt;br /&gt;
&lt;br /&gt;
Here is an example script that launches PyMol for stereo viewing on a [http://www.visbox.com/boxMain.html VisBox].  It runs PyMol fullscreen stereo, and disables the internal gui.&lt;br /&gt;
The environment (PYTHON_PATH and PYMOL_PATH) must already be set up for this example to work (see [[#Example 2|Example 2]] below for how to setup within the script).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/bin/env python&lt;br /&gt;
 &lt;br /&gt;
# Tell PyMOL to launch quiet (-q), fullscreen (-e) and without internal GUI (-i)&lt;br /&gt;
import __main__&lt;br /&gt;
__main__.pymol_argv = [ 'pymol', '-qei' ]&lt;br /&gt;
 &lt;br /&gt;
import pymol&lt;br /&gt;
 &lt;br /&gt;
# Call the function below before using any PyMOL modules.&lt;br /&gt;
pymol.finish_launching()  # not supported on macOS&lt;br /&gt;
 &lt;br /&gt;
from pymol import cmd&lt;br /&gt;
cmd.stereo('walleye')&lt;br /&gt;
cmd.set('stereo_shift', 0.23)&lt;br /&gt;
cmd.set('stereo_angle', 1.0)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example 2 ==&lt;br /&gt;
&lt;br /&gt;
This script launches PyMOL without any GUI for scripting only. It enables tab-completion on the python command line and does the PyMOL environment setup (you need to adjust the '''moddir''' variable!). ''Hint: You may save this as &amp;quot;pymol-cli&amp;quot; executable.''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/bin/python2.6 -i&lt;br /&gt;
&lt;br /&gt;
import sys, os&lt;br /&gt;
&lt;br /&gt;
# autocompletion&lt;br /&gt;
import readline&lt;br /&gt;
import rlcompleter&lt;br /&gt;
readline.parse_and_bind('tab: complete')&lt;br /&gt;
&lt;br /&gt;
# pymol environment&lt;br /&gt;
moddir='/opt/pymol-svn/modules'&lt;br /&gt;
sys.path.insert(0, moddir)&lt;br /&gt;
os.environ['PYMOL_PATH'] = os.path.join(moddir, 'pymol/pymol_path')&lt;br /&gt;
&lt;br /&gt;
# pymol launching: quiet (-q), without GUI (-c) and with arguments from command line&lt;br /&gt;
import pymol&lt;br /&gt;
pymol.pymol_argv = ['pymol','-qc'] + sys.argv[1:]&lt;br /&gt;
pymol.finish_launching()&lt;br /&gt;
cmd = pymol.cmd&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== STDOUT ==&lt;br /&gt;
&lt;br /&gt;
PyMOL captures '''sys.stdout''' and '''sys.stderr''', to control it with it's own [[feedback]] mechanism. To prevent that, save and restore both streams, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import sys&lt;br /&gt;
stdout = sys.stdout&lt;br /&gt;
stderr = sys.stderr&lt;br /&gt;
pymol.finish_launching(['pymol', '-xiq'])  # not supported on macOS&lt;br /&gt;
sys.stdout = stdout&lt;br /&gt;
sys.stderr = stderr&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Independent PyMOL Instances ==&lt;br /&gt;
It's possible to have multiple independent instances. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import pymol2&lt;br /&gt;
p1 = pymol2.PyMOL()&lt;br /&gt;
p1.start()&lt;br /&gt;
&lt;br /&gt;
p2 = pymol2.PyMOL()&lt;br /&gt;
p2.start()&lt;br /&gt;
&lt;br /&gt;
p1.cmd.fragment('ala')&lt;br /&gt;
p1.cmd.zoom()&lt;br /&gt;
p1.cmd.png('/tmp/ala.png', 1000, 800, dpi=150, ray=1)&lt;br /&gt;
&lt;br /&gt;
p2.cmd.fragment('ser')&lt;br /&gt;
p2.cmd.zoom()&lt;br /&gt;
p2.cmd.png('/tmp/ser.png', 1000, 800, dpi=150, ray=1)&lt;br /&gt;
&lt;br /&gt;
p1.stop()&lt;br /&gt;
p2.stop()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Independent PyMOL Instances (Context Manager) ==&lt;br /&gt;
&lt;br /&gt;
PyMOL 2.2 adds context manager support.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import pymol2&lt;br /&gt;
with pymol2.PyMOL() as p1:&lt;br /&gt;
    p1.cmd.fragment('ala')&lt;br /&gt;
    p1.cmd.zoom()&lt;br /&gt;
    p1.cmd.png('/tmp/ala.png', 1000, 800, dpi=150, ray=1)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Command Line Options]]&lt;br /&gt;
* [[Jupyter]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Launching]]&lt;br /&gt;
[[Category:Script_Library]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=CCTBX&amp;diff=14716</id>
		<title>CCTBX</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=CCTBX&amp;diff=14716"/>
		<updated>2020-05-11T19:59:11Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: CCTBX-fedora32&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how to use the [https://github.com/cctbx/cctbx_project Computational Crystallography Toolbox (cctbx)] with PyMOL.&lt;br /&gt;
&lt;br /&gt;
cctbx and PyMOL need to be compiled with the same Python distribution, otherwise they won't be compatible.&lt;br /&gt;
&lt;br /&gt;
=== Incentive PyMOL ===&lt;br /&gt;
&lt;br /&gt;
Using cctbx with Incentive PyMOL 2.x should become easier once the cctbx project provides conda packages.&lt;br /&gt;
See https://github.com/cctbx/cctbx_project/issues/9&lt;br /&gt;
&lt;br /&gt;
==== Linux ====&lt;br /&gt;
&lt;br /&gt;
Confirmed procedure to get this working on Linux with CCTBX build '''dev-1723''', which is based on conda:&lt;br /&gt;
&lt;br /&gt;
# Download cctbx from http://cci.lbl.gov/cctbx_build/&lt;br /&gt;
# Install cctbx: &amp;lt;code&amp;gt;./install --prefix=$HOME/local&amp;lt;/code&amp;gt;&lt;br /&gt;
# Install [https://repo.continuum.io/miniconda/ Miniconda]&lt;br /&gt;
# Install '''pymol''' with '''conda''' into the '''cctbx environment''':&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;$HOME/miniconda3/bin/conda install -p $HOME/local/cctbx-dev-1723/conda_base -c schrodinger -c conda-forge pymol&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
# Activate cctbx: &amp;lt;code&amp;gt;source $HOME/local/cctbx-dev-1723/cctbx_env.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
# Run PyMOL with: &amp;lt;code&amp;gt;cctbx.python -m pymol&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Windows ====&lt;br /&gt;
&lt;br /&gt;
Confirmed procedure to get this working on Windows with CCTBX build '''dev-1725''', which is based on conda:&lt;br /&gt;
&lt;br /&gt;
# Download cctbx from http://cci.lbl.gov/cctbx_build/&lt;br /&gt;
# Extract ZIP file (e.g. to &amp;lt;code&amp;gt;F:\cctbx-installer-dev-1725-intel-windows-x86_64&amp;lt;/code&amp;gt;)&lt;br /&gt;
# Install [https://repo.continuum.io/miniconda/ Miniconda]&lt;br /&gt;
# Install '''pymol''' with '''conda''' into the '''cctbx environment''': &amp;lt;code&amp;gt;conda install -p F:\cctbx-installer-dev-1725-intel-windows-x86_64\conda_base -c schrodinger -c conda-forge pymol&amp;lt;/code&amp;gt;&lt;br /&gt;
# Activate cctbx: &amp;lt;code&amp;gt;call F:\cctbx-installer-dev-1725-intel-windows-x86_64\cctbx_env.bat&amp;lt;/code&amp;gt;&lt;br /&gt;
# Run PyMOL with: &amp;lt;code&amp;gt;cctbx.python -m pymol&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Open-Source PyMOL ===&lt;br /&gt;
&lt;br /&gt;
See [[CCTBX-fedora32]].&lt;br /&gt;
&lt;br /&gt;
[[Category:PyMol_Integration|cctbx]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Pse_binary_dump&amp;diff=14741</id>
		<title>Pse binary dump</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Pse_binary_dump&amp;diff=14741"/>
		<updated>2020-05-08T07:48:02Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: created&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The [[pse_binary_dump]] setting affects the PyMOL session file format (.pse). If set to '''on''', session export will be significantly faster and produce smaller files.&lt;br /&gt;
&lt;br /&gt;
''New in PyMOL 1.8''&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 1ubq&lt;br /&gt;
&lt;br /&gt;
set pse_binary_dump, off&lt;br /&gt;
save regular.pse&lt;br /&gt;
&lt;br /&gt;
set pse_binary_dump, on&lt;br /&gt;
save binary.pse&lt;br /&gt;
&lt;br /&gt;
# compare file size&lt;br /&gt;
print(os.path.getsize(&amp;quot;regular.pse&amp;quot;))   # prints 215482&lt;br /&gt;
print(os.path.getsize(&amp;quot;binary.pse&amp;quot;))    # prints 118557&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Known Limitations ==&lt;br /&gt;
&lt;br /&gt;
* Before 2.4: [https://pymol.org/dokuwiki/doku.php?id=properties#atom_level_properties Atom Properties] not supported&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[pse_export_version]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Settings]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Set_View&amp;diff=14744</id>
		<title>Set View</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Set_View&amp;diff=14744"/>
		<updated>2020-04-30T11:50:34Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: get_view example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''set_view''' sets viewing information for the current scene, including the rotation matrix, position, origin of rotation, clipping planes, and the orthoscopic flag.&lt;br /&gt;
&lt;br /&gt;
This command is extremely useful for making movies.  One may set up the scene to be rendered, then save the exact orientation, with respect to the camera, of the scene using, the [[Get_View]] command.  The output from the [[Get_View]] command may then be used by the '''set_view''' command to restore the orientation of the scene.&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
 set_view (...)  where ... is 18 floating point numbers&lt;br /&gt;
&lt;br /&gt;
===EXAMPLE===&lt;br /&gt;
&lt;br /&gt;
This works in a &amp;lt;code&amp;gt;.pml&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&lt;br /&gt;
    set_view (\&lt;br /&gt;
        0.999876618,   -0.000452542,   -0.015699286,\&lt;br /&gt;
        0.000446742,    0.999999821,   -0.000372844,\&lt;br /&gt;
        0.015699454,    0.000365782,    0.999876678,\&lt;br /&gt;
        0.000000000,    0.000000000, -150.258514404,\&lt;br /&gt;
        11.842411041,   20.648729324,    8.775371552,\&lt;br /&gt;
        118.464958191,  182.052062988,    0.000000000 )&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.set_view(string-or-sequence view)  &lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&lt;br /&gt;
This works in a &amp;lt;code&amp;gt;.py&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.set_view((&lt;br /&gt;
    0.999876618,   -0.000452542,   -0.015699286,&lt;br /&gt;
    0.000446742,    0.999999821,   -0.000372844,&lt;br /&gt;
    0.015699454,    0.000365782,    0.999876678,&lt;br /&gt;
    0.000000000,    0.000000000, -150.258514404,&lt;br /&gt;
    11.842411041,   20.648729324,    8.775371552,&lt;br /&gt;
    118.464958191,  182.052062988,    0.000000000))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result of [[get_view]] is valid input for '''set_view''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
myview = cmd.get_view()&lt;br /&gt;
&lt;br /&gt;
cmd.set_view(myview)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===NOTES===&lt;br /&gt;
Contents of the view matrix&lt;br /&gt;
&lt;br /&gt;
* 0  -  8: column-major 3x3 matrix which rotates model axes to camera axes&lt;br /&gt;
* 9  - 11: origin of rotation relative to the camera in camera space&lt;br /&gt;
* 12 - 14:  origin of rotation in model space&lt;br /&gt;
* 15: front plane distance from the camera&lt;br /&gt;
* 16: rear plane distance from the camera&lt;br /&gt;
* 17: orthoscopic flag (not implemented in older versions)&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[Get View]], [[View]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Set View]]&lt;br /&gt;
[[Category:View Module|Set View]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Set_View&amp;diff=14743</id>
		<title>Set View</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Set_View&amp;diff=14743"/>
		<updated>2020-04-30T11:44:59Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: Python example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''set_view''' sets viewing information for the current scene, including the rotation matrix, position, origin of rotation, clipping planes, and the orthoscopic flag.&lt;br /&gt;
&lt;br /&gt;
This command is extremely useful for making movies.  One may set up the scene to be rendered, then save the exact orientation, with respect to the camera, of the scene using, the [[Get_View]] command.  The output from the [[Get_View]] command may then be used by the '''set_view''' command to restore the orientation of the scene.&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
 set_view (...)  where ... is 18 floating point numbers&lt;br /&gt;
&lt;br /&gt;
===EXAMPLE===&lt;br /&gt;
&lt;br /&gt;
This works in a &amp;lt;code&amp;gt;.pml&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&lt;br /&gt;
    set_view (\&lt;br /&gt;
        0.999876618,   -0.000452542,   -0.015699286,\&lt;br /&gt;
        0.000446742,    0.999999821,   -0.000372844,\&lt;br /&gt;
        0.015699454,    0.000365782,    0.999876678,\&lt;br /&gt;
        0.000000000,    0.000000000, -150.258514404,\&lt;br /&gt;
        11.842411041,   20.648729324,    8.775371552,\&lt;br /&gt;
        118.464958191,  182.052062988,    0.000000000 )&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.set_view(string-or-sequence view)  &lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&lt;br /&gt;
This works in a &amp;lt;code&amp;gt;.py&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.set_view((&lt;br /&gt;
    0.999876618,   -0.000452542,   -0.015699286,&lt;br /&gt;
    0.000446742,    0.999999821,   -0.000372844,&lt;br /&gt;
    0.015699454,    0.000365782,    0.999876678,&lt;br /&gt;
    0.000000000,    0.000000000, -150.258514404,&lt;br /&gt;
    11.842411041,   20.648729324,    8.775371552,&lt;br /&gt;
    118.464958191,  182.052062988,    0.000000000))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===NOTES===&lt;br /&gt;
Contents of the view matrix&lt;br /&gt;
&lt;br /&gt;
* 0  -  8: column-major 3x3 matrix which rotates model axes to camera axes&lt;br /&gt;
* 9  - 11: origin of rotation relative to the camera in camera space&lt;br /&gt;
* 12 - 14:  origin of rotation in model space&lt;br /&gt;
* 15: front plane distance from the camera&lt;br /&gt;
* 16: rear plane distance from the camera&lt;br /&gt;
* 17: orthoscopic flag (not implemented in older versions)&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[Get View]], [[View]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Set View]]&lt;br /&gt;
[[Category:View Module|Set View]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=14746</id>
		<title>Linux Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=14746"/>
		<updated>2020-04-23T11:53:56Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: CentOS 7&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how to install PyMOL on Linux.&lt;br /&gt;
&lt;br /&gt;
== Incentive PyMOL ==&lt;br /&gt;
&lt;br /&gt;
[http://www.schrodinger.com Schrödinger] provides pre-compiled (64 bit) PyMOL to paying sponsors. The bundle also includes ready-to-use [[APBS]], [[morph|RigiMOL]], an MPEG encoder for movie export, and a small molecule energy minimization engine.&lt;br /&gt;
&lt;br /&gt;
Download: https://pymol.org/&lt;br /&gt;
&lt;br /&gt;
== Open-Source PyMOL in Linux Distros ==&lt;br /&gt;
&lt;br /&gt;
Many Linux distributions provide binary packages for open-source PyMOL. They often do not provide the latest version, but if the provided package fits your needs this is the most convenient way to install PyMOL.&lt;br /&gt;
&lt;br /&gt;
Command line install examples for some popular distributions (note that all of these commands must be run as root or superuser):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Arch/Manjaro&lt;br /&gt;
pacman -S pymol&lt;br /&gt;
&lt;br /&gt;
# CentOS with EPEL&lt;br /&gt;
rpm -i http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm&lt;br /&gt;
yum --enablerepo=epel install pymol&lt;br /&gt;
&lt;br /&gt;
# Debian/Ubuntu/Mint&lt;br /&gt;
apt-get install pymol&lt;br /&gt;
&lt;br /&gt;
# Fedora&lt;br /&gt;
dnf install pymol&lt;br /&gt;
&lt;br /&gt;
# Gentoo&lt;br /&gt;
emerge -av pymol&lt;br /&gt;
&lt;br /&gt;
# openSUSE (12.1 and later)&lt;br /&gt;
zypper install pymol&lt;br /&gt;
&lt;br /&gt;
# Sabayon&lt;br /&gt;
equo i -av pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Install from source ==&lt;br /&gt;
&lt;br /&gt;
Installation from source gives you the latest version and is the generic way to install PyMOL.&lt;br /&gt;
&lt;br /&gt;
Please also consult the [https://github.com/schrodinger/pymol-open-source/blob/master/INSTALL INSTALL] file.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Libraries as well as development files (headers) of the following software is&lt;br /&gt;
required:&lt;br /&gt;
&lt;br /&gt;
* C++11 compiler (e.g. GCC 4.7 or higher)&lt;br /&gt;
* [http://www.python.org/ Python] (with distutils)&lt;br /&gt;
* [https://github.com/schrodinger/pmw-patched Pmw] (Python Megawidgets, optional, for legacy GUI/plugins)&lt;br /&gt;
* OpenGL driver (I use [http://www.nvidia.com/object/unix.html NVidia])&lt;br /&gt;
* GLEW&lt;br /&gt;
* GLUT/freeglut (optional, enable with &amp;lt;code&amp;gt;--glut&amp;lt;/code&amp;gt;)&lt;br /&gt;
* libpng&lt;br /&gt;
* freetype&lt;br /&gt;
* libxml2 (optional, for COLLADA export, disable with &amp;lt;code&amp;gt;--no-libxml&amp;lt;/code&amp;gt;)&lt;br /&gt;
* [https://github.com/msgpack/msgpack-c msgpack-c] 2.1.5+ (optional, for fast [http://mmtf.rcsb.org/ MMTF] loading, new in SVN r4167, disable with &amp;lt;code&amp;gt;--use-msgpackc=no&amp;lt;/code&amp;gt;)&lt;br /&gt;
* PyQt5, PyQt4, or PySide (optional, will fall back to Tk interface if compiled with &amp;lt;code&amp;gt;--glut&amp;lt;/code&amp;gt;)&lt;br /&gt;
* [https://glm.g-truc.net/ glm]&lt;br /&gt;
* [https://github.com/rcsb/mmtf-cpp mmtf-cpp] (optional, for [http://mmtf.rcsb.org/ MMTF] export, disable with &amp;lt;code&amp;gt;--use-msgpackc=no&amp;lt;/code&amp;gt;)&lt;br /&gt;
* libnetcdf (optional, disable with &amp;lt;code&amp;gt;--no-vmd-plugins&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
On many Linux systems, one of the following commands installs all requirements (and must be run as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Debian/Ubuntu/Mint&lt;br /&gt;
apt-get install git build-essential python3-dev libglew-dev \&lt;br /&gt;
  libpng-dev libfreetype6-dev libxml2-dev \&lt;br /&gt;
  libmsgpack-dev python3-pyqt5.qtopengl libglm-dev libnetcdf-dev&lt;br /&gt;
&lt;br /&gt;
# CentOS&lt;br /&gt;
yum install gcc gcc-c++ kernel-devel python-devel tkinter python-pmw glew-devel \&lt;br /&gt;
  freeglut-devel libpng-devel freetype-devel libxml2-devel glm-devel \&lt;br /&gt;
  msgpack-devel netcdf-devel&lt;br /&gt;
&lt;br /&gt;
# Fedora&lt;br /&gt;
dnf install gcc gcc-c++ kernel-devel python3-devel glew-devel PyQt5 msgpack-devel \&lt;br /&gt;
  freeglut-devel libpng-devel freetype-devel libxml2-devel glm-devel&lt;br /&gt;
&lt;br /&gt;
# Gentoo&lt;br /&gt;
emerge -av dev-lang/python dev-python/pmw media-libs/glew \&lt;br /&gt;
  media-libs/freeglut media-libs/libpng media-libs/freetype media-libs/glm&lt;br /&gt;
&lt;br /&gt;
# openSUSE&lt;br /&gt;
zypper install python-devel freeglut-devel gcc-c++ glew-devel libpng-devel python-pmw glm&lt;br /&gt;
&lt;br /&gt;
# Sabayon&lt;br /&gt;
equo i -av dev-lang/python dev-python/pmw media-libs/glew \&lt;br /&gt;
  media-libs/freeglut media-libs/libpng media-libs/freetype&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get latest source from Git ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/schrodinger/pymol-open-source.git&lt;br /&gt;
git clone https://github.com/rcsb/mmtf-cpp.git&lt;br /&gt;
mv mmtf-cpp/include/mmtf* pymol-open-source/include/&lt;br /&gt;
cd pymol-open-source&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Libraries in non-standard places ===&lt;br /&gt;
&lt;br /&gt;
Optional: You may use the colon-delimited &amp;lt;code&amp;gt;$PREFIX_PATH&amp;lt;/code&amp;gt; variable to point &amp;lt;code&amp;gt;setup.py&amp;lt;/code&amp;gt; to non-standard locations of libraries and headers (those locations should have &amp;lt;code&amp;gt;include&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;lib&amp;lt;/code&amp;gt; directories).&lt;br /&gt;
&lt;br /&gt;
=== Compile and install ===&lt;br /&gt;
&lt;br /&gt;
This will install PyMOL as normal user into &amp;lt;code&amp;gt;$HOME/pymol-open-source-build&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -e&lt;br /&gt;
&lt;br /&gt;
prefix=$HOME/pymol-open-source-build&lt;br /&gt;
&lt;br /&gt;
# Example for dependencies in non-standard places&lt;br /&gt;
# export PREFIX_PATH=&amp;quot;$HOME/extra/glew-2.0.0:$HOME/extra/libpng-1.6.5:/opt/local&amp;quot;&lt;br /&gt;
&lt;br /&gt;
python3 setup.py build install \&lt;br /&gt;
    --home=$prefix&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now launch PyMOL like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$HOME/pymol-open-source-build/bin/pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
* Do do a &amp;quot;clean&amp;quot; build, remove the &amp;quot;build&amp;quot; directory (sometimes necessary if &amp;quot;git pull&amp;quot; changed header files)&lt;br /&gt;
&lt;br /&gt;
* If you are using Ubuntu with a NVIDIA graphic card and generic drivers you may experience bad rendering, black pixelation and other graphical oddities. A guide to installing NVIDIA proprietary drivers can be found under [https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia Ubuntu community Nvidia Drivers How To]&lt;br /&gt;
&lt;br /&gt;
== Customized Installations ==&lt;br /&gt;
&lt;br /&gt;
* [[User:Tlinnet/Linux_Install|Troels Linnet's installations scripts]]: Detailed installation scripts for Ubuntu, Mint 12 and RHEL 6, including MPEG support from FREEMOL&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation|Linux Installation]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Annotate_v&amp;diff=14693</id>
		<title>Annotate v</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Annotate_v&amp;diff=14693"/>
		<updated>2020-02-20T08:33:15Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: Infobox&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = script&lt;br /&gt;
|filename  = annotate_v.py&lt;br /&gt;
|author    = [[User:XinYu|Xin Yu]]&lt;br /&gt;
|license   = BSD&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
''Version: 1.0''&lt;br /&gt;
&lt;br /&gt;
A simple-to-use script for annotation of VH or VL sequence of an antibody. It creates a Pymol object for each FR or CDR region. It utilizes the REST API interface of ''Abnum'' (http://www.bioinf.org.uk/abs/abnum/) from Dr Andrew Martin's group at UCL&lt;br /&gt;
&lt;br /&gt;
== Annotation Schemes == &lt;br /&gt;
&lt;br /&gt;
Currently supports '''Kabat, Chothia, Contact, IMGT'''&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;Definitions for Kabat, Chothia, Contact, and IIMGT are same as listed in the table (http://www.bioinf.org.uk/abs/info.html#kabatnum), except that for IMGT, H-CDR2 is defined as '''H51-H57''' in this script, as opposed to of '''H51-H56''' in the table. This slight revision generates result that matches that from ''IMGT website'' (http://www.imgt.org/)&lt;br /&gt;
&lt;br /&gt;
== Dependencies and Limitations ==&lt;br /&gt;
&lt;br /&gt;
1. Import '''request''' module&lt;br /&gt;
&lt;br /&gt;
2. Relies on internet connection to ''Abnum''&lt;br /&gt;
&lt;br /&gt;
3. Incomplete VH or VL sequence might not be annotated&lt;br /&gt;
&lt;br /&gt;
== How to use ==&lt;br /&gt;
&lt;br /&gt;
1. Create a selection object for the V region, (such as '''VH''' and '''VL''' shown here). Only 1 V-region (VH OR VL) can be annotated each time. Alternatively, simply select the residues into the default '''&amp;lt;sele&amp;gt;''' group. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Annotate_v_pic1.jpg|center|thumb|800px|Create a selection group for input seq, or use the default sele]]&lt;br /&gt;
&lt;br /&gt;
2. Copy the entire script and create a `.py` file. Run script. &lt;br /&gt;
&lt;br /&gt;
3. The general syntax is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;annotate_v(&amp;quot;selection_group_name&amp;quot;, &amp;quot;scheme&amp;quot;)&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''selection_group_name:''' name of the selection group where you have the input sequence. Must be single-letter amino acid coded. Either VH or VL but not both&lt;br /&gt;
&lt;br /&gt;
'''scheme:''' currently supports Kabat, Chothia, Contact, IMGT. Must be lowercase&lt;br /&gt;
&lt;br /&gt;
For example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
annotate_v(&amp;quot;VH&amp;quot;, &amp;quot;kabat&amp;quot;) #input sequence from VH selection group, annotate using &amp;quot;kabat&amp;quot;&lt;br /&gt;
annotate_v(&amp;quot;sele&amp;quot;, &amp;quot;imgt&amp;quot;) #input sequence from the default sele group, annotate using &amp;quot;imgt&amp;quot;. You can also try &amp;quot;contact&amp;quot;, &amp;quot;chothia&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. In the output window, the script will print the FR and CDR regions (if found). It also automatically creates a selection group for each of the FR and CDR region. &lt;br /&gt;
&lt;br /&gt;
[[File:Annotate_v_pic2.jpg|center|thumb|400px|example output from command lines]]&lt;br /&gt;
&lt;br /&gt;
[[File:Annotate_v_pic3.jpg|center|thumb|800px|new FR and CDR selection groups are created]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Source code ==&lt;br /&gt;
&lt;br /&gt;
Copy the source code into a `.py` file and run script in Pymol. Source code: https://raw.githubusercontent.com/xinyu-dev/annotate_v-for-Pymol/master/annotate_v.py&lt;br /&gt;
&lt;br /&gt;
== Contact ==&lt;br /&gt;
Bugs? Questions? Email Xin Yu @ xinyu18018@gmail.com. Enjoy!&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:ObjSel_Scripts]]&lt;br /&gt;
[[Category:Pymol-script-repo]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Pml2py&amp;diff=14696</id>
		<title>Pml2py</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Pml2py&amp;diff=14696"/>
		<updated>2020-02-17T13:32:34Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: py3&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This script converts a pml script to a python script.&lt;br /&gt;
&lt;br /&gt;
See [http://sourceforge.net/mailarchive/message.php?msg_id=27331786 pymol-users mailing list] (Subject: Convert pml script to Pymol Python script, Fri, 8 Apr 2011).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from __future__ import print_function&lt;br /&gt;
&lt;br /&gt;
import sys&lt;br /&gt;
from pymol import cmd, parsing&lt;br /&gt;
&lt;br /&gt;
def pml2py(filename, out=sys.stdout):&lt;br /&gt;
    '''&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
&lt;br /&gt;
    Convert a pml script to python syntax.&lt;br /&gt;
&lt;br /&gt;
USAGE&lt;br /&gt;
&lt;br /&gt;
    pml2py infile [, outfile]&lt;br /&gt;
    '''&lt;br /&gt;
    def quote(args):&lt;br /&gt;
        args = iter(args)&lt;br /&gt;
        for arg in args:&lt;br /&gt;
            if '=' not in arg:&lt;br /&gt;
                prefix = ''&lt;br /&gt;
            else:&lt;br /&gt;
                prefix, arg = arg.split('=', 1)&lt;br /&gt;
                prefix += '='&lt;br /&gt;
                arg = arg.lstrip()&lt;br /&gt;
            yield prefix + repr(arg)&lt;br /&gt;
&lt;br /&gt;
    class stackiter:&lt;br /&gt;
        def __init__(self, collection):&lt;br /&gt;
            self.iterator = iter(collection)&lt;br /&gt;
            self.stack = []&lt;br /&gt;
        def __iter__(self):&lt;br /&gt;
            return self&lt;br /&gt;
        def next(self):&lt;br /&gt;
            if len(self.stack):&lt;br /&gt;
                return self.stack.pop()&lt;br /&gt;
            return next(self.iterator)&lt;br /&gt;
        __next__ = next&lt;br /&gt;
        def push(self, v):&lt;br /&gt;
            self.stack.append(v)&lt;br /&gt;
&lt;br /&gt;
    basestring = (bytes, unicode) if (bytes is str) else (bytes, str)&lt;br /&gt;
    if isinstance(out, basestring):&lt;br /&gt;
        out = open(out, 'w')&lt;br /&gt;
&lt;br /&gt;
    print('''&lt;br /&gt;
# automatically converted from &amp;quot;%s&amp;quot;&lt;br /&gt;
import pymol&lt;br /&gt;
from pymol import *&lt;br /&gt;
''' % (filename), file=out)&lt;br /&gt;
&lt;br /&gt;
    handle = stackiter(open(filename, 'rU'))&lt;br /&gt;
    for line in handle:&lt;br /&gt;
        while line.endswith('\\\n'):&lt;br /&gt;
            line = line[:-2] + next(handle)&lt;br /&gt;
&lt;br /&gt;
        a = line.split(None, 1)&lt;br /&gt;
        if len(a) &amp;gt; 1 and a[0] == '_':&lt;br /&gt;
            line = a[1]&lt;br /&gt;
            a = line.split(None, 1)&lt;br /&gt;
&lt;br /&gt;
        try:&lt;br /&gt;
            name = a[0]&lt;br /&gt;
            if name.startswith('/'):&lt;br /&gt;
                line = line.lstrip()[1:]&lt;br /&gt;
                raise&lt;br /&gt;
            name = cmd.kwhash.shortcut.get(name, name)&lt;br /&gt;
            kw = cmd.keyword[name]&lt;br /&gt;
            assert kw[4] != parsing.PYTHON&lt;br /&gt;
            func = kw[0]&lt;br /&gt;
        except:&lt;br /&gt;
            out.write(line)&lt;br /&gt;
            continue&lt;br /&gt;
        &lt;br /&gt;
        # PyMOL stuff without named python function&lt;br /&gt;
        if func.__name__ == '&amp;lt;lambda&amp;gt;' or name.startswith('@'):&lt;br /&gt;
            print('cmd.do(%s)' % (repr(line.strip())), file=out)&lt;br /&gt;
            continue&lt;br /&gt;
&lt;br /&gt;
        # code blocks&lt;br /&gt;
        if name == 'python':&lt;br /&gt;
            for line in handle:&lt;br /&gt;
                if line.split() == ['python', 'end']:&lt;br /&gt;
                    break&lt;br /&gt;
                out.write(line)&lt;br /&gt;
            continue&lt;br /&gt;
        if name == 'skip':&lt;br /&gt;
            for line in handle:&lt;br /&gt;
                if line.split() == ['skip', 'end']:&lt;br /&gt;
                    break&lt;br /&gt;
            continue&lt;br /&gt;
&lt;br /&gt;
        # split args&lt;br /&gt;
        tok = ','&lt;br /&gt;
        if kw[4] == parsing.MOVIE:&lt;br /&gt;
            tok = kw[3]&lt;br /&gt;
            split_mx = 1&lt;br /&gt;
        else:&lt;br /&gt;
            split_mx = kw[4] - parsing.LITERAL&lt;br /&gt;
        if len(a) &amp;gt; 1:&lt;br /&gt;
            a[1] = parsing.split(a[1], '#', 1)[0] # strip of comment&lt;br /&gt;
            if split_mx &amp;lt; 0:&lt;br /&gt;
                # strip of additional commands&lt;br /&gt;
                a[1:] = parsing.split(a[1], ';', 1)&lt;br /&gt;
                if len(a) &amp;gt; 2:&lt;br /&gt;
                    handle.push(a[2])&lt;br /&gt;
            if split_mx == 0:&lt;br /&gt;
                args = [a[1]]&lt;br /&gt;
            else:&lt;br /&gt;
                args = [i.strip() for i in parsing.split(a[1], tok, max(0, split_mx))]&lt;br /&gt;
        else:&lt;br /&gt;
            args = []&lt;br /&gt;
&lt;br /&gt;
        # old syntax: set property=value&lt;br /&gt;
        if kw[4] == parsing.LEGACY and '=' in args[0]:&lt;br /&gt;
            args = [i.strip() for i in args[0].split('=', 1)] + args[1:]&lt;br /&gt;
&lt;br /&gt;
        # register alias&lt;br /&gt;
        if name == 'alias':&lt;br /&gt;
            cmd.alias(*args)&lt;br /&gt;
&lt;br /&gt;
        # use 'cmd' module if possible&lt;br /&gt;
        try:&lt;br /&gt;
            test = getattr(cmd, func.__name__)&lt;br /&gt;
            assert func == test&lt;br /&gt;
            module = 'cmd'&lt;br /&gt;
        except:&lt;br /&gt;
            module = func.__module__&lt;br /&gt;
&lt;br /&gt;
        print('%s.%s(%s)' % (module, func.__name__, ', '.join(quote(args))), file=out)&lt;br /&gt;
&lt;br /&gt;
cmd.extend('pml2py', pml2py)&lt;br /&gt;
&lt;br /&gt;
# vi:expandtab:smarttab&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:System_Scripts]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Python_Integration&amp;diff=14700</id>
		<title>Python Integration</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Python_Integration&amp;diff=14700"/>
		<updated>2020-02-12T06:35:37Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: python3&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Launching Python programs from PyMOL ==&lt;br /&gt;
Running a Python script from PyMOL, usually the command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
run script.py&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Is enough. Of course, the file script.py needs to be in the working directory.&lt;br /&gt;
You can also launch Python scripts when starting PyMOL. Asynchronous means, that a new Python thread is started:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
pymol example.py     # synchronous, in PyMOL module&lt;br /&gt;
pymol -r example.py  # synchronous in __main__ module&lt;br /&gt;
pymol -l example.py  # asychronous in a new module&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also launch python programs from within PyMOL with the commands:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
run example.py        # synchronous in pymol module&lt;br /&gt;
run example.py,main   # synchronous in __main__ module&lt;br /&gt;
&lt;br /&gt;
spawn example.py        # asychronous in a new module&lt;br /&gt;
spawn example.py,global # asychronous in the PyMOL module&lt;br /&gt;
spawn example.py,main   # asychronous in the __main__ module&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Launching PyMOL from Python programs==&lt;br /&gt;
&lt;br /&gt;
See [[Launching From a Script]].&lt;br /&gt;
&lt;br /&gt;
==Using the PyMOL commandline==&lt;br /&gt;
&lt;br /&gt;
Are you aware that the PyMOL command line is also a Python command line? You can just use PyMOL interactively in that fashion.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
PyMOL&amp;gt;print(1+1)&lt;br /&gt;
2&lt;br /&gt;
PyMOL&amp;gt;from random import random&lt;br /&gt;
PyMOL&amp;gt;print(random())&lt;br /&gt;
0.739460642143&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The only major difference is that the default namespace for PyMOL is &amp;quot;pymol&amp;quot; not &amp;quot;__main__&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
PyMOL&amp;gt;print(__name__)&lt;br /&gt;
pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Python&amp;diff=14698</id>
		<title>Python</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Python&amp;diff=14698"/>
		<updated>2020-02-12T06:28:16Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: python3&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Issuing the '''[[Python]]''' command will put you into a stateful pseudo-interactive Python session.  Or, more simply it's stateful in that you can invoke the Python session write some code, end the session, then restart the session and your data will be saved (see Example 1).  It's pseudo-interactive in that you don't get feedback until you type &amp;quot;python end,&amp;quot; upon which your code is run the output appears.&lt;br /&gt;
&lt;br /&gt;
This is a helpful command for testing different scripting or state-editing strategies for movie making.&lt;br /&gt;
&lt;br /&gt;
== USAGE ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# start the session&lt;br /&gt;
python&lt;br /&gt;
&lt;br /&gt;
# ...&lt;br /&gt;
# your Python code goes here&lt;br /&gt;
# ...&lt;br /&gt;
&lt;br /&gt;
# end the session&lt;br /&gt;
python end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
== EXAMPLES ==&lt;br /&gt;
*Start the session.  Set x to 10.  End the session.  Restart the session and see if the value of x is recalled.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
python&lt;br /&gt;
x = 10&lt;br /&gt;
print(x)&lt;br /&gt;
python end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
python&lt;br /&gt;
print(x)&lt;br /&gt;
python end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Output: &lt;br /&gt;
 10&lt;br /&gt;
&lt;br /&gt;
== Python Version ==&lt;br /&gt;
Python scripts and commands used within PyMOL can only be written using the current version of Python that is supported by your version of PyMOL. To determine which version of Python you can use, type the following command into PyMOL:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
print(sys.version)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that this version of Python is not necessarily related to the version that you may have installed on your system.&lt;br /&gt;
&lt;br /&gt;
This command can also be used to ensure that code you are distributing can be supported by the user's system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Python]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=14684</id>
		<title>Linux Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=14684"/>
		<updated>2020-01-10T16:31:42Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: debian install&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how to install PyMOL on Linux.&lt;br /&gt;
&lt;br /&gt;
== Incentive PyMOL ==&lt;br /&gt;
&lt;br /&gt;
[http://www.schrodinger.com Schrödinger] provides pre-compiled (64 bit) PyMOL to paying sponsors. The bundle also includes ready-to-use [[APBS]], [[morph|RigiMOL]], an MPEG encoder for movie export, and a small molecule energy minimization engine.&lt;br /&gt;
&lt;br /&gt;
Download: https://pymol.org/&lt;br /&gt;
&lt;br /&gt;
== Open-Source PyMOL in Linux Distros ==&lt;br /&gt;
&lt;br /&gt;
Many Linux distributions provide binary packages for open-source PyMOL. They often do not provide the latest version, but if the provided package fits your needs this is the most convenient way to install PyMOL.&lt;br /&gt;
&lt;br /&gt;
Command line install examples for some popular distributions (note that all of these commands must be run as root or superuser):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Arch/Manjaro&lt;br /&gt;
pacman -S pymol&lt;br /&gt;
&lt;br /&gt;
# CentOS with EPEL&lt;br /&gt;
rpm -i http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm&lt;br /&gt;
yum --enablerepo=epel install pymol&lt;br /&gt;
&lt;br /&gt;
# Debian/Ubuntu/Mint&lt;br /&gt;
apt-get install pymol&lt;br /&gt;
&lt;br /&gt;
# Fedora&lt;br /&gt;
dnf install pymol&lt;br /&gt;
&lt;br /&gt;
# Gentoo&lt;br /&gt;
emerge -av pymol&lt;br /&gt;
&lt;br /&gt;
# openSUSE (12.1 and later)&lt;br /&gt;
zypper install pymol&lt;br /&gt;
&lt;br /&gt;
# Sabayon&lt;br /&gt;
equo i -av pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Install from source ==&lt;br /&gt;
&lt;br /&gt;
Installation from source gives you the latest version and is the generic way to install PyMOL.&lt;br /&gt;
&lt;br /&gt;
Please also consult the [https://github.com/schrodinger/pymol-open-source/blob/master/INSTALL INSTALL] file.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Libraries as well as development files (headers) of the following software is&lt;br /&gt;
required:&lt;br /&gt;
&lt;br /&gt;
* C++11 compiler (e.g. GCC 4.7 or higher)&lt;br /&gt;
* [http://www.python.org/ Python] (with distutils)&lt;br /&gt;
* [https://github.com/schrodinger/pmw-patched Pmw] (Python Megawidgets, optional, for legacy GUI/plugins)&lt;br /&gt;
* OpenGL driver (I use [http://www.nvidia.com/object/unix.html NVidia])&lt;br /&gt;
* GLEW&lt;br /&gt;
* GLUT/freeglut (optional, enable with &amp;lt;code&amp;gt;--glut&amp;lt;/code&amp;gt;)&lt;br /&gt;
* libpng&lt;br /&gt;
* freetype&lt;br /&gt;
* libxml2 (optional, for COLLADA export, disable with &amp;lt;code&amp;gt;--no-libxml&amp;lt;/code&amp;gt;)&lt;br /&gt;
* [https://github.com/msgpack/msgpack-c msgpack-c] 2.1.5+ (optional, for fast [http://mmtf.rcsb.org/ MMTF] loading, new in SVN r4167, disable with &amp;lt;code&amp;gt;--use-msgpackc=no&amp;lt;/code&amp;gt;)&lt;br /&gt;
* PyQt5, PyQt4, or PySide (optional, will fall back to Tk interface if compiled with &amp;lt;code&amp;gt;--glut&amp;lt;/code&amp;gt;)&lt;br /&gt;
* [https://glm.g-truc.net/ glm]&lt;br /&gt;
* [https://github.com/rcsb/mmtf-cpp mmtf-cpp] (optional, for [http://mmtf.rcsb.org/ MMTF] export, disable with &amp;lt;code&amp;gt;--use-msgpackc=no&amp;lt;/code&amp;gt;)&lt;br /&gt;
* libnetcdf (optional, disable with &amp;lt;code&amp;gt;--no-vmd-plugins&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
On many Linux systems, one of the following commands installs all requirements (and must be run as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Debian/Ubuntu/Mint&lt;br /&gt;
apt-get install git build-essential python3-dev libglew-dev \&lt;br /&gt;
  libpng-dev libfreetype6-dev libxml2-dev \&lt;br /&gt;
  libmsgpack-dev python3-pyqt5.qtopengl libglm-dev libnetcdf-dev&lt;br /&gt;
&lt;br /&gt;
# CentOS&lt;br /&gt;
yum install gcc gcc-c++ kernel-devel python-devel tkinter python-pmw glew-devel \&lt;br /&gt;
  freeglut-devel libpng-devel freetype-devel libxml2-devel glm-devel&lt;br /&gt;
&lt;br /&gt;
# Fedora&lt;br /&gt;
dnf install gcc gcc-c++ kernel-devel python3-devel glew-devel PyQt5 msgpack-devel \&lt;br /&gt;
  freeglut-devel libpng-devel freetype-devel libxml2-devel glm-devel&lt;br /&gt;
&lt;br /&gt;
# Gentoo&lt;br /&gt;
emerge -av dev-lang/python dev-python/pmw media-libs/glew \&lt;br /&gt;
  media-libs/freeglut media-libs/libpng media-libs/freetype media-libs/glm&lt;br /&gt;
&lt;br /&gt;
# openSUSE&lt;br /&gt;
zypper install python-devel freeglut-devel gcc-c++ glew-devel libpng-devel python-pmw glm&lt;br /&gt;
&lt;br /&gt;
# Sabayon&lt;br /&gt;
equo i -av dev-lang/python dev-python/pmw media-libs/glew \&lt;br /&gt;
  media-libs/freeglut media-libs/libpng media-libs/freetype&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get latest source from Git ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/schrodinger/pymol-open-source.git&lt;br /&gt;
git clone https://github.com/rcsb/mmtf-cpp.git&lt;br /&gt;
mv mmtf-cpp/include/mmtf* pymol-open-source/include/&lt;br /&gt;
cd pymol-open-source&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Libraries in non-standard places ===&lt;br /&gt;
&lt;br /&gt;
Optional: You may use the colon-delimited &amp;lt;code&amp;gt;$PREFIX_PATH&amp;lt;/code&amp;gt; variable to point &amp;lt;code&amp;gt;setup.py&amp;lt;/code&amp;gt; to non-standard locations of libraries and headers (those locations should have &amp;lt;code&amp;gt;include&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;lib&amp;lt;/code&amp;gt; directories).&lt;br /&gt;
&lt;br /&gt;
=== Compile and install ===&lt;br /&gt;
&lt;br /&gt;
This will install PyMOL as normal user into &amp;lt;code&amp;gt;$HOME/pymol-open-source-build&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -e&lt;br /&gt;
&lt;br /&gt;
prefix=$HOME/pymol-open-source-build&lt;br /&gt;
&lt;br /&gt;
# Example for dependencies in non-standard places&lt;br /&gt;
# export PREFIX_PATH=&amp;quot;$HOME/extra/glew-2.0.0:$HOME/extra/libpng-1.6.5:/opt/local&amp;quot;&lt;br /&gt;
&lt;br /&gt;
python3 setup.py build install \&lt;br /&gt;
    --home=$prefix&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now launch PyMOL like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$HOME/pymol-open-source-build/bin/pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
* Do do a &amp;quot;clean&amp;quot; build, remove the &amp;quot;build&amp;quot; directory (sometimes necessary if &amp;quot;git pull&amp;quot; changed header files)&lt;br /&gt;
&lt;br /&gt;
* If you are using Ubuntu with a NVIDIA graphic card and generic drivers you may experience bad rendering, black pixelation and other graphical oddities. A guide to installing NVIDIA proprietary drivers can be found under [https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia Ubuntu community Nvidia Drivers How To]&lt;br /&gt;
&lt;br /&gt;
== Customized Installations ==&lt;br /&gt;
&lt;br /&gt;
* [[User:Tlinnet/Linux_Install|Troels Linnet's installations scripts]]: Detailed installation scripts for Ubuntu, Mint 12 and RHEL 6, including MPEG support from FREEMOL&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation|Linux Installation]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=14662</id>
		<title>Linux Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=14662"/>
		<updated>2019-12-03T08:04:41Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: libnetcdf&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how to install PyMOL on Linux.&lt;br /&gt;
&lt;br /&gt;
== Incentive PyMOL ==&lt;br /&gt;
&lt;br /&gt;
[http://www.schrodinger.com Schrödinger] provides pre-compiled (64 bit) PyMOL to paying sponsors. The bundle also includes ready-to-use [[APBS]], [[morph|RigiMOL]], an MPEG encoder for movie export, and a small molecule energy minimization engine.&lt;br /&gt;
&lt;br /&gt;
Download: https://pymol.org/&lt;br /&gt;
&lt;br /&gt;
== Open-Source PyMOL in Linux Distros ==&lt;br /&gt;
&lt;br /&gt;
Many Linux distributions provide binary packages for open-source PyMOL. They often do not provide the latest version, but if the provided package fits your needs this is the most convenient way to install PyMOL.&lt;br /&gt;
&lt;br /&gt;
Command line install examples for some popular distributions (note that all of these commands must be run as root or superuser):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Arch/Manjaro&lt;br /&gt;
pacman -S pymol&lt;br /&gt;
&lt;br /&gt;
# CentOS with EPEL&lt;br /&gt;
rpm -i http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm&lt;br /&gt;
yum --enablerepo=epel install pymol&lt;br /&gt;
&lt;br /&gt;
# Debian/Ubuntu/Mint&lt;br /&gt;
apt-get install pymol&lt;br /&gt;
&lt;br /&gt;
# Fedora&lt;br /&gt;
dnf install pymol&lt;br /&gt;
&lt;br /&gt;
# Gentoo&lt;br /&gt;
emerge -av pymol&lt;br /&gt;
&lt;br /&gt;
# openSUSE (12.1 and later)&lt;br /&gt;
zypper install pymol&lt;br /&gt;
&lt;br /&gt;
# Sabayon&lt;br /&gt;
equo i -av pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Install from source ==&lt;br /&gt;
&lt;br /&gt;
Installation from source gives you the latest version and is the generic way to install PyMOL.&lt;br /&gt;
&lt;br /&gt;
Please also consult the [https://github.com/schrodinger/pymol-open-source/blob/master/INSTALL INSTALL] file.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Libraries as well as development files (headers) of the following software is&lt;br /&gt;
required:&lt;br /&gt;
&lt;br /&gt;
* C++11 compiler (e.g. GCC 4.7 or higher)&lt;br /&gt;
* [http://www.python.org/ Python] (with distutils)&lt;br /&gt;
* [https://github.com/schrodinger/pmw-patched Pmw] (Python Megawidgets, optional, for legacy GUI/plugins)&lt;br /&gt;
* OpenGL driver (I use [http://www.nvidia.com/object/unix.html NVidia])&lt;br /&gt;
* GLEW&lt;br /&gt;
* GLUT/freeglut (optional, enable with &amp;lt;code&amp;gt;--glut&amp;lt;/code&amp;gt;)&lt;br /&gt;
* libpng&lt;br /&gt;
* freetype&lt;br /&gt;
* libxml2 (optional, for COLLADA export, disable with &amp;lt;code&amp;gt;--no-libxml&amp;lt;/code&amp;gt;)&lt;br /&gt;
* [https://github.com/msgpack/msgpack-c msgpack-c] 2.1.5+ (optional, for fast [http://mmtf.rcsb.org/ MMTF] loading, new in SVN r4167, disable with &amp;lt;code&amp;gt;--use-msgpackc=no&amp;lt;/code&amp;gt;)&lt;br /&gt;
* PyQt5, PyQt4, or PySide (optional, will fall back to Tk interface if compiled with &amp;lt;code&amp;gt;--glut&amp;lt;/code&amp;gt;)&lt;br /&gt;
* [https://glm.g-truc.net/ glm]&lt;br /&gt;
* [https://github.com/rcsb/mmtf-cpp mmtf-cpp] (optional, for [http://mmtf.rcsb.org/ MMTF] export, disable with &amp;lt;code&amp;gt;--use-msgpackc=no&amp;lt;/code&amp;gt;)&lt;br /&gt;
* libnetcdf (optional, disable with &amp;lt;code&amp;gt;--no-vmd-plugins&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
On many Linux systems, one of the following commands installs all requirements (and must be run as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Debian/Ubuntu/Mint&lt;br /&gt;
apt-get install build-essential python-dev python-pmw libglew-dev \&lt;br /&gt;
  freeglut3-dev libpng-dev libfreetype6-dev libxml2-dev \&lt;br /&gt;
  libmsgpack-dev python-pyqt5.qtopengl libglm-dev libnetcdf-dev&lt;br /&gt;
&lt;br /&gt;
# CentOS&lt;br /&gt;
yum install gcc gcc-c++ kernel-devel python-devel tkinter python-pmw glew-devel \&lt;br /&gt;
  freeglut-devel libpng-devel freetype-devel libxml2-devel glm-devel&lt;br /&gt;
&lt;br /&gt;
# Fedora&lt;br /&gt;
dnf install gcc gcc-c++ kernel-devel python3-devel glew-devel PyQt5 msgpack-devel \&lt;br /&gt;
  freeglut-devel libpng-devel freetype-devel libxml2-devel glm-devel&lt;br /&gt;
&lt;br /&gt;
# Gentoo&lt;br /&gt;
emerge -av dev-lang/python dev-python/pmw media-libs/glew \&lt;br /&gt;
  media-libs/freeglut media-libs/libpng media-libs/freetype media-libs/glm&lt;br /&gt;
&lt;br /&gt;
# openSUSE&lt;br /&gt;
zypper install python-devel freeglut-devel gcc-c++ glew-devel libpng-devel python-pmw glm&lt;br /&gt;
&lt;br /&gt;
# Sabayon&lt;br /&gt;
equo i -av dev-lang/python dev-python/pmw media-libs/glew \&lt;br /&gt;
  media-libs/freeglut media-libs/libpng media-libs/freetype&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get latest source from Git ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/schrodinger/pymol-open-source.git&lt;br /&gt;
cd pymol-open-source&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Libraries in non-standard places ===&lt;br /&gt;
&lt;br /&gt;
Optional: You may use the colon-delimited &amp;lt;code&amp;gt;$PREFIX_PATH&amp;lt;/code&amp;gt; variable to point &amp;lt;code&amp;gt;setup.py&amp;lt;/code&amp;gt; to non-standard locations of libraries and headers (those locations should have &amp;lt;code&amp;gt;include&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;lib&amp;lt;/code&amp;gt; directories).&lt;br /&gt;
&lt;br /&gt;
=== Compile and install ===&lt;br /&gt;
&lt;br /&gt;
This will install PyMOL as normal user into &amp;lt;code&amp;gt;$HOME/pymol-open-source-build&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -e&lt;br /&gt;
&lt;br /&gt;
prefix=$HOME/pymol-open-source-build&lt;br /&gt;
&lt;br /&gt;
# Example for dependencies in non-standard places&lt;br /&gt;
# export PREFIX_PATH=&amp;quot;$HOME/extra/glew-2.0.0:$HOME/extra/libpng-1.6.5:/opt/local&amp;quot;&lt;br /&gt;
&lt;br /&gt;
python setup.py build install \&lt;br /&gt;
    --home=$prefix&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now launch PyMOL like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$HOME/pymol-open-source-build/bin/pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
* Do do a &amp;quot;clean&amp;quot; build, remove the &amp;quot;build&amp;quot; directory (sometimes necessary if &amp;quot;git pull&amp;quot; changed header files)&lt;br /&gt;
&lt;br /&gt;
* If you are using Ubuntu with a NVIDIA graphic card and generic drivers you may experience bad rendering, black pixelation and other graphical oddities. A guide to installing NVIDIA proprietary drivers can be found under [https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia Ubuntu community Nvidia Drivers How To]&lt;br /&gt;
&lt;br /&gt;
== Customized Installations ==&lt;br /&gt;
&lt;br /&gt;
* [[User:Tlinnet/Linux_Install|Troels Linnet's installations scripts]]: Detailed installation scripts for Ubuntu, Mint 12 and RHEL 6, including MPEG support from FREEMOL&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation|Linux Installation]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Dump&amp;diff=14640</id>
		<title>Dump</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Dump&amp;diff=14640"/>
		<updated>2019-11-05T17:13:48Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: created&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The [[dump]] command writes the geometry of an [[isosurface]], [[isomesh]], or [[isodot]] object to a simple text file. Each line contains one [https://en.wikipedia.org/wiki/Vertex_(geometry) vertex].&lt;br /&gt;
&lt;br /&gt;
For [[isosurface|surface]] objects, XYZ coordinates and the [https://en.wikipedia.org/wiki/Normal_(geometry) normal] are exported. Three lines make one triangle (like &amp;lt;code&amp;gt;GL_TRIANGLES&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
For [[isomesh|mesh]] objects, XYZ coordinates are exported (no normals). The vertices form line strips (like &amp;lt;code&amp;gt;GL_LINE_STRIP&amp;lt;/code&amp;gt;), a blank line starts a new strip.&lt;br /&gt;
&lt;br /&gt;
For [[isodot|dot]] objects, XYZ coordinates are exported.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
 dump filename, object&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
&lt;br /&gt;
* filename = str: file that will be written&lt;br /&gt;
* object = str: object name&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
 fetch 1ubq, mymap, type=2fofc, async=0&lt;br /&gt;
 &lt;br /&gt;
 isosurface mysurface, mymap&lt;br /&gt;
 dump surfacegeometry.txt, mysurface&lt;br /&gt;
 &lt;br /&gt;
 isomesh mymesh, mymap&lt;br /&gt;
 dump meshgeometry.txt, mymesh&lt;br /&gt;
 &lt;br /&gt;
 isodot mydot, mymap&lt;br /&gt;
 dump dotgeometry.txt, mydot&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[COLLADA]] export&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=14645</id>
		<title>Linux Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=14645"/>
		<updated>2019-11-05T16:07:03Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: fedora requirements&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how to install PyMOL on Linux.&lt;br /&gt;
&lt;br /&gt;
== Incentive PyMOL ==&lt;br /&gt;
&lt;br /&gt;
[http://www.schrodinger.com Schrödinger] provides pre-compiled (64 bit) PyMOL to paying sponsors. The bundle also includes ready-to-use [[APBS]], [[morph|RigiMOL]], an MPEG encoder for movie export, and a small molecule energy minimization engine.&lt;br /&gt;
&lt;br /&gt;
Download: https://pymol.org/&lt;br /&gt;
&lt;br /&gt;
== Open-Source PyMOL in Linux Distros ==&lt;br /&gt;
&lt;br /&gt;
Many Linux distributions provide binary packages for open-source PyMOL. They often do not provide the latest version, but if the provided package fits your needs this is the most convenient way to install PyMOL.&lt;br /&gt;
&lt;br /&gt;
Command line install examples for some popular distributions (note that all of these commands must be run as root or superuser):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Arch/Manjaro&lt;br /&gt;
pacman -S pymol&lt;br /&gt;
&lt;br /&gt;
# CentOS with EPEL&lt;br /&gt;
rpm -i http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm&lt;br /&gt;
yum --enablerepo=epel install pymol&lt;br /&gt;
&lt;br /&gt;
# Debian/Ubuntu/Mint&lt;br /&gt;
apt-get install pymol&lt;br /&gt;
&lt;br /&gt;
# Fedora&lt;br /&gt;
dnf install pymol&lt;br /&gt;
&lt;br /&gt;
# Gentoo&lt;br /&gt;
emerge -av pymol&lt;br /&gt;
&lt;br /&gt;
# openSUSE (12.1 and later)&lt;br /&gt;
zypper install pymol&lt;br /&gt;
&lt;br /&gt;
# Sabayon&lt;br /&gt;
equo i -av pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Install from source ==&lt;br /&gt;
&lt;br /&gt;
Installation from source gives you the latest version and is the generic way to install PyMOL.&lt;br /&gt;
&lt;br /&gt;
Please also consult the [https://github.com/schrodinger/pymol-open-source/blob/master/INSTALL INSTALL] file.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
Libraries as well as development files (headers) of the following software is&lt;br /&gt;
required:&lt;br /&gt;
&lt;br /&gt;
* C++11 compiler (e.g. GCC 4.7 or higher)&lt;br /&gt;
* [http://www.python.org/ Python] (with distutils)&lt;br /&gt;
* [https://github.com/schrodinger/pmw-patched Pmw] (Python Megawidgets, optional, for legacy GUI/plugins)&lt;br /&gt;
* OpenGL driver (I use [http://www.nvidia.com/object/unix.html NVidia])&lt;br /&gt;
* GLEW&lt;br /&gt;
* GLUT/freeglut (optional, enable with &amp;lt;code&amp;gt;--glut&amp;lt;/code&amp;gt;)&lt;br /&gt;
* libpng&lt;br /&gt;
* freetype&lt;br /&gt;
* libxml2 (optional, for COLLADA export, disable with &amp;lt;code&amp;gt;--no-libxml&amp;lt;/code&amp;gt;)&lt;br /&gt;
* [https://github.com/msgpack/msgpack-c msgpack-c] 2.1.5+ (optional, for fast [http://mmtf.rcsb.org/ MMTF] loading, new in SVN r4167, disable with &amp;lt;code&amp;gt;--use-msgpackc=no&amp;lt;/code&amp;gt;)&lt;br /&gt;
* PyQt5, PyQt4, or PySide (optional, will fall back to Tk interface if compiled with &amp;lt;code&amp;gt;--glut&amp;lt;/code&amp;gt;)&lt;br /&gt;
* [https://glm.g-truc.net/ glm]&lt;br /&gt;
* [https://github.com/rcsb/mmtf-cpp mmtf-cpp] (optional, for [http://mmtf.rcsb.org/ MMTF] export, disable with &amp;lt;code&amp;gt;--use-msgpackc=no&amp;lt;/code&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
On many Linux systems, one of the following commands installs all requirements (and must be run as root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Debian/Ubuntu/Mint&lt;br /&gt;
apt-get install build-essential python-dev python-pmw libglew-dev \&lt;br /&gt;
  freeglut3-dev libpng-dev libfreetype6-dev libxml2-dev \&lt;br /&gt;
  libmsgpack-dev python-pyqt5.qtopengl libglm-dev&lt;br /&gt;
&lt;br /&gt;
# CentOS&lt;br /&gt;
yum install gcc gcc-c++ kernel-devel python-devel tkinter python-pmw glew-devel \&lt;br /&gt;
  freeglut-devel libpng-devel freetype-devel libxml2-devel glm-devel&lt;br /&gt;
&lt;br /&gt;
# Fedora&lt;br /&gt;
dnf install gcc gcc-c++ kernel-devel python3-devel glew-devel PyQt5 msgpack-devel \&lt;br /&gt;
  freeglut-devel libpng-devel freetype-devel libxml2-devel glm-devel&lt;br /&gt;
&lt;br /&gt;
# Gentoo&lt;br /&gt;
emerge -av dev-lang/python dev-python/pmw media-libs/glew \&lt;br /&gt;
  media-libs/freeglut media-libs/libpng media-libs/freetype media-libs/glm&lt;br /&gt;
&lt;br /&gt;
# openSUSE&lt;br /&gt;
zypper install python-devel freeglut-devel gcc-c++ glew-devel libpng-devel python-pmw glm&lt;br /&gt;
&lt;br /&gt;
# Sabayon&lt;br /&gt;
equo i -av dev-lang/python dev-python/pmw media-libs/glew \&lt;br /&gt;
  media-libs/freeglut media-libs/libpng media-libs/freetype&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get latest source from Git ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/schrodinger/pymol-open-source.git&lt;br /&gt;
cd pymol-open-source&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Libraries in non-standard places ===&lt;br /&gt;
&lt;br /&gt;
Optional: You may use the colon-delimited &amp;lt;code&amp;gt;$PREFIX_PATH&amp;lt;/code&amp;gt; variable to point &amp;lt;code&amp;gt;setup.py&amp;lt;/code&amp;gt; to non-standard locations of libraries and headers (those locations should have &amp;lt;code&amp;gt;include&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;lib&amp;lt;/code&amp;gt; directories).&lt;br /&gt;
&lt;br /&gt;
=== Compile and install ===&lt;br /&gt;
&lt;br /&gt;
This will install PyMOL as normal user into &amp;lt;code&amp;gt;$HOME/pymol-open-source-build&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -e&lt;br /&gt;
&lt;br /&gt;
prefix=$HOME/pymol-open-source-build&lt;br /&gt;
&lt;br /&gt;
# Example for dependencies in non-standard places&lt;br /&gt;
# export PREFIX_PATH=&amp;quot;$HOME/extra/glew-2.0.0:$HOME/extra/libpng-1.6.5:/opt/local&amp;quot;&lt;br /&gt;
&lt;br /&gt;
python setup.py build install \&lt;br /&gt;
    --home=$prefix&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now launch PyMOL like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$HOME/pymol-open-source-build/bin/pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
* Do do a &amp;quot;clean&amp;quot; build, remove the &amp;quot;build&amp;quot; directory (sometimes necessary if &amp;quot;git pull&amp;quot; changed header files)&lt;br /&gt;
&lt;br /&gt;
* If you are using Ubuntu with a NVIDIA graphic card and generic drivers you may experience bad rendering, black pixelation and other graphical oddities. A guide to installing NVIDIA proprietary drivers can be found under [https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia Ubuntu community Nvidia Drivers How To]&lt;br /&gt;
&lt;br /&gt;
== Customized Installations ==&lt;br /&gt;
&lt;br /&gt;
* [[User:Tlinnet/Linux_Install|Troels Linnet's installations scripts]]: Detailed installation scripts for Ubuntu, Mint 12 and RHEL 6, including MPEG support from FREEMOL&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation|Linux Installation]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Color&amp;diff=14638</id>
		<title>Color</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Color&amp;diff=14638"/>
		<updated>2019-10-24T16:21:01Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: arguments&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''color''' sets the color of an object or an atom selection to a predefined, named color, an RGB hex color, or a color [[ramp_new|ramp]].&lt;br /&gt;
For an overview of predefined colors, see [[Color Values]].&lt;br /&gt;
For a script that enumerates all the colors see, [[List_Colors]].&lt;br /&gt;
If you want to define your own colors, see [[Set_Color]].&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
color color-name&lt;br /&gt;
color color-name, object-name&lt;br /&gt;
color color-name, (selection)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
&lt;br /&gt;
* color-name = str or int: [[Color Values|named color]], index of a named color, &amp;lt;code&amp;gt;0xRRGGBB&amp;lt;/code&amp;gt; string, &amp;lt;code&amp;gt;0x40RRGGBB&amp;lt;/code&amp;gt; integer, name of a [[ramp_new|ramp]] object, or special value &amp;lt;code&amp;gt;atomic&amp;lt;/code&amp;gt;&lt;br /&gt;
* object-name = str: Name of an object or name pattern (with Asterisk (&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;)) which matches multiple objects. Changes the [[set_object_color|object color]], and if it is a molecular object, also the color of all atoms. {default: all}&lt;br /&gt;
* selection = str: [[Selection Algebra|atom selection]], this is any expression which is not a valid object pattern. E.g. an expression which starts with a parentheses. This will only color atoms, not objects.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
===Color all carbons yellow===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;color yellow, (name C*)&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Color by element, except carbons ===&lt;br /&gt;
&lt;br /&gt;
 color atomic, (not elem C)&lt;br /&gt;
&lt;br /&gt;
=== Use a custom RGB color ===&lt;br /&gt;
&lt;br /&gt;
 color 0x006600&lt;br /&gt;
&lt;br /&gt;
===Color by Spectrum Example===&lt;br /&gt;
Color by spectrum is in the GUI menu but did you realize that the spectrum is not limited to a simple rainbow?&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
spectrum count, palette, object_name&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For available palettes and more details see: [[spectrum]]&lt;br /&gt;
&lt;br /&gt;
===B-Factors===&lt;br /&gt;
The command to color a molecule by B-Factors (B Factors) is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
spectrum b, selection=SEL&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
where '''SEL''' is a valid selection, for example, &amp;quot;protA and n. CA&amp;quot;, for protein A's alpha carbons.&lt;br /&gt;
&lt;br /&gt;
For more details see: [[spectrum]]&lt;br /&gt;
&lt;br /&gt;
====Reassigning B-Factors and Coloring====&lt;br /&gt;
It is commonplace to replace the B-Factor column of a protein with some other  biochemical property at that residue, observed from some calculation or experiment.  PyMOL can easily reassign the B-Factors and color them, too.  The following example will load a protein, set ALL it's B Factors to &amp;quot;0&amp;quot;, read in a list of properties for each alpha carbon in the proteins, assign those new values as the B-Factor values and color by the new values.  This example is possible because commands PyMOL  does not recognize are passed to the Python interpreter --- a very powerful tool.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# load the protein&lt;br /&gt;
cmd.load(&amp;quot;protA.pdb&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# open the file of new values (just 1 column of numbers, one for each alpha carbon)&lt;br /&gt;
inFile = open(&amp;quot;newBFactors&amp;quot;, 'r')&lt;br /&gt;
&lt;br /&gt;
# create the global, stored array&lt;br /&gt;
stored.newB = []&lt;br /&gt;
&lt;br /&gt;
# read the new B factors from file&lt;br /&gt;
for line in inFile.readlines(): stored.newB.append( float(line) )&lt;br /&gt;
&lt;br /&gt;
# close the input file&lt;br /&gt;
inFile.close()&lt;br /&gt;
&lt;br /&gt;
# clear out the old B Factors&lt;br /&gt;
alter protA, b=0.0&lt;br /&gt;
&lt;br /&gt;
# update the B Factors with new properties&lt;br /&gt;
alter protA and n. CA, b=stored.newB.pop(0)&lt;br /&gt;
&lt;br /&gt;
# color the protein based on the new B Factors of the alpha carbons&lt;br /&gt;
cmd.spectrum(&amp;quot;b&amp;quot;, &amp;quot;protA and n. CA&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to save the file with the new B Factor values for each alpha carbon,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.save(&amp;quot;protA_newBFactors.pdb&amp;quot;, &amp;quot;protA&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or similar is all you need.&lt;br /&gt;
&lt;br /&gt;
A script (data2bfactor.py) that loads data into the B-factor (b) or occupancy (q) columns from an external file can be found in Robert Campbell's PyMOL script repository (http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/)&lt;br /&gt;
&lt;br /&gt;
====Reassigning B-Factors and Coloring - from file ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
reinitialize&lt;br /&gt;
prot=&amp;quot;1XYZ&amp;quot;&lt;br /&gt;
cmd.fetch(prot,async=0)&lt;br /&gt;
&lt;br /&gt;
# Set b value to zero&lt;br /&gt;
cmd.alter(prot,b=0.0)&lt;br /&gt;
cmd.show_as(&amp;quot;cartoon&amp;quot;,prot)&lt;br /&gt;
&lt;br /&gt;
python&lt;br /&gt;
inFile = open(&amp;quot;phi_values.txt&amp;quot;, 'r')&lt;br /&gt;
val_list = []&lt;br /&gt;
for line in inFile.readlines()[1:]:&lt;br /&gt;
    split = line.split()&lt;br /&gt;
    resn = split[0][0] &lt;br /&gt;
    resi = split[0][1:-1]&lt;br /&gt;
    phi_ppm2 = float(split[1])&lt;br /&gt;
    phi_ppm2_err = float(split[3])&lt;br /&gt;
    R2_0 = float(split[4])&lt;br /&gt;
    R2_0_err = float(split[6])&lt;br /&gt;
    print &amp;quot;Resn=%s Resi=%s, phi_ppm2=%2.2f, phi_ppm2_err=%2.2f, R2_0=%2.2f, R2_0_err=%2.2f&amp;quot;%(resn,resi,phi_ppm2,phi_ppm2_err,R2_0,R2_0_err)&lt;br /&gt;
&lt;br /&gt;
    val_list.append(phi_ppm2)&lt;br /&gt;
    cmd.alter(&amp;quot;%s and resi %s and n. CA&amp;quot;%(prot,resi), &amp;quot;b=%s&amp;quot;%phi_ppm2)&lt;br /&gt;
&lt;br /&gt;
python end&lt;br /&gt;
minval = min(val_list)&lt;br /&gt;
print minval&lt;br /&gt;
maxval = max(val_list)&lt;br /&gt;
print maxval&lt;br /&gt;
cmd.spectrum(&amp;quot;b&amp;quot;, &amp;quot;blue_white_red&amp;quot;, &amp;quot;%s and n. CA&amp;quot;%prot, minimum=0, maximum=maxval)&lt;br /&gt;
cmd.ramp_new(&amp;quot;ramp_obj&amp;quot;, prot, range=[0, minval, maxval], color=&amp;quot;[blue, white, red ]&amp;quot;)&lt;br /&gt;
cmd.save(&amp;quot;%s_newBFactors.pdb&amp;quot;%prot, &amp;quot;%s&amp;quot;%prot)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expanding to Surface ===&lt;br /&gt;
See [[Expand_To_Surface]].&lt;br /&gt;
&lt;br /&gt;
If you have run the above code and would like the colors to be shown in the [[Surface]] representation, too, then you need to do the following:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Assumes alpha carbons colored from above.&lt;br /&gt;
create ca_obj, your-object-name and name ca &lt;br /&gt;
ramp_new ramp_obj, ca_obj, [0, 10], [-1, -1, 0]&lt;br /&gt;
set surface_color, ramp_obj, your-object-name&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thanks to Warren, for this one.&lt;br /&gt;
&lt;br /&gt;
=== Getting Atom Colors ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
stored.list = []&lt;br /&gt;
iterate all, stored.list.append(color) # use cmd.get_color_tuple(color) to convert color index to RGB values&lt;br /&gt;
print stored.list&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, you can [[label]] each atom by it's color code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
label all, color&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What colors does PyMOL currently have? ===&lt;br /&gt;
basic colors can be manually accessed and edited from the PyMOL menu under '''Setting''' --&amp;gt; '''Colors...'''&amp;lt;br&amp;gt;&lt;br /&gt;
At the Pymol prompt, you can use the command [[Get Color Indices]] to get a list of Pymols named colors.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Get_colors]] is a script that allows accessing colors as well.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Color States Individually ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 1nmr&lt;br /&gt;
set all_states&lt;br /&gt;
&lt;br /&gt;
# the object has 20 states, so we can set separate line colors&lt;br /&gt;
# for each state as follows:&lt;br /&gt;
for a in range(1,21): cmd.set(&amp;quot;line_color&amp;quot;,&amp;quot;auto&amp;quot;,&amp;quot;1nmr&amp;quot;,a)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Or, we can do it differently,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# start over,&lt;br /&gt;
fetch 1nmr&lt;br /&gt;
&lt;br /&gt;
# break apart the object by state&lt;br /&gt;
split_states 1nmr&lt;br /&gt;
&lt;br /&gt;
# delete the original&lt;br /&gt;
dele 1nmr&lt;br /&gt;
&lt;br /&gt;
# and color by object (carbons only)&lt;br /&gt;
util.color_objs(&amp;quot;elem c&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# (all atoms)&lt;br /&gt;
util.color_objs(&amp;quot;all&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Advanced Coloring]]&lt;br /&gt;
* [[Get Color Indices]]&lt;br /&gt;
* [[spectrum]]&lt;br /&gt;
* [[Ramp_New]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Objects_and_Selections|Color]]&lt;br /&gt;
[[Category:Commands|Color]]&lt;br /&gt;
[[Category:States|Coloring states individually]]&lt;br /&gt;
[[Category:Coloring|Color]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Spectrum&amp;diff=14647</id>
		<title>Spectrum</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Spectrum&amp;diff=14647"/>
		<updated>2019-10-22T18:56:55Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: 1.6 updates&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Spectrum_ex2.png|right|thumb|185px]]&lt;br /&gt;
[[Spectrum]] colors atoms with a spectrum of colors based on an atomic property.&lt;br /&gt;
    &lt;br /&gt;
''New in PyMOL 1.6: Supports any [[iterate]] expression, like [[spectrumany]]''&lt;br /&gt;
&lt;br /&gt;
''New in PyMOL 1.6: Supports space separated color list as palette, like [[spectrumany]]''&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
spectrum [expression [, palette [, selection [, minimum [, maximum [, byres ]]]]]]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
''expression''&lt;br /&gt;
::count (atom count), pc (partial charge), or any expression which is valid for [[iterate]]. Non-numerical values will be enumerated (e.g. chain) {default: count}&lt;br /&gt;
    &lt;br /&gt;
''palette''&lt;br /&gt;
::string: palette name, or space separated list of colors {default: rainbow}&lt;br /&gt;
 &lt;br /&gt;
''selection''&lt;br /&gt;
::string: atoms to color {default: (all)}&lt;br /&gt;
 &lt;br /&gt;
''minimum''&lt;br /&gt;
::float: {default: None (automatic)}&lt;br /&gt;
 &lt;br /&gt;
''maximum''&lt;br /&gt;
::float: {default: None (automatic)}&lt;br /&gt;
 &lt;br /&gt;
''byres''&lt;br /&gt;
::integer: controls whether coloring is applied per-residue {default: 0}&lt;br /&gt;
&lt;br /&gt;
= Notes =&lt;br /&gt;
Minimum and maximum are determined automatically unless '''both''' arguments are provided and ''minimum &amp;lt; maximum''.&lt;br /&gt;
&lt;br /&gt;
Available palettes include:&lt;br /&gt;
*blue_green&lt;br /&gt;
*blue_magenta &lt;br /&gt;
*blue_red&lt;br /&gt;
*blue_white_green&lt;br /&gt;
*blue_white_magenta&lt;br /&gt;
*blue_white_red&lt;br /&gt;
*blue_white_yellow&lt;br /&gt;
*blue_yellow&lt;br /&gt;
*cbmr&lt;br /&gt;
*cyan_magenta&lt;br /&gt;
*cyan_red&lt;br /&gt;
*cyan_white_magenta&lt;br /&gt;
*cyan_white_red&lt;br /&gt;
*cyan_white_yellow &lt;br /&gt;
*cyan_yellow&lt;br /&gt;
*gcbmry&lt;br /&gt;
*green_blue&lt;br /&gt;
*green_magenta&lt;br /&gt;
*green_red&lt;br /&gt;
*green_white_blue &lt;br /&gt;
*green_white_magenta&lt;br /&gt;
*green_white_red&lt;br /&gt;
*green_white_yellow &lt;br /&gt;
*green_yellow&lt;br /&gt;
*green_yellow_red&lt;br /&gt;
*magenta_blue&lt;br /&gt;
*magenta_cyan&lt;br /&gt;
*magenta_green&lt;br /&gt;
*magenta_white_blue&lt;br /&gt;
*magenta_white_cyan &lt;br /&gt;
*magenta_white_green&lt;br /&gt;
*magenta_white_yellow&lt;br /&gt;
*magenta_yellow&lt;br /&gt;
*rainbow&lt;br /&gt;
*rainbow2&lt;br /&gt;
*rainbow2_rev&lt;br /&gt;
*rainbow_cycle&lt;br /&gt;
*rainbow_cycle_rev &lt;br /&gt;
*rainbow_rev &lt;br /&gt;
*red_blue&lt;br /&gt;
*red_cyan &lt;br /&gt;
*red_green&lt;br /&gt;
*red_white_blue&lt;br /&gt;
*red_white_cyan&lt;br /&gt;
*red_white_green&lt;br /&gt;
*red_white_yellow&lt;br /&gt;
*red_yellow&lt;br /&gt;
*red_yellow_green&lt;br /&gt;
*rmbc&lt;br /&gt;
*yellow_blue&lt;br /&gt;
*yellow_cyan&lt;br /&gt;
*yellow_cyan_white&lt;br /&gt;
*yellow_green&lt;br /&gt;
*yellow_magenta&lt;br /&gt;
*yellow_red&lt;br /&gt;
*yellow_white_blue&lt;br /&gt;
*yellow_white_green&lt;br /&gt;
*yellow_white_magenta&lt;br /&gt;
*yellow_white_red &lt;br /&gt;
*yrmbcg&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
== Simple ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
spectrum b, blue_red, minimum=10, maximum=50&lt;br /&gt;
&lt;br /&gt;
spectrum count, rainbow_rev, chain A, byres=1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Non-numerical property (Since PyMOL 1.6):&lt;br /&gt;
&lt;br /&gt;
 spectrum chain&lt;br /&gt;
&lt;br /&gt;
Custom color list (Since PyMOL 1.6):&lt;br /&gt;
&lt;br /&gt;
 spectrum b, blue yellow cyan neon pink grey&lt;br /&gt;
&lt;br /&gt;
== Intermediate ==&lt;br /&gt;
The following script will create this image:&lt;br /&gt;
&lt;br /&gt;
[[Image:Spectrum_example.png|385px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# color atoms based on their distance from a point&lt;br /&gt;
# returns the length of the distance between atom A and atom B&lt;br /&gt;
&lt;br /&gt;
diff_len = lambda x,y : math.sqrt((x[0]-y[0])*(x[0]-y[0]) + (x[1]-y[1])*(x[1]-y[1]) + (x[2]-y[2])*(x[2]-y[2]))&lt;br /&gt;
&lt;br /&gt;
# fetch 1hug from the PDB&lt;br /&gt;
&lt;br /&gt;
fetch 1hug, async=0&lt;br /&gt;
&lt;br /&gt;
# show it as surface&lt;br /&gt;
&lt;br /&gt;
as surface&lt;br /&gt;
&lt;br /&gt;
# create the pseudoatom at the origin&lt;br /&gt;
&lt;br /&gt;
pseudoatom pOrig, pos=(0,0,0), label=origin&lt;br /&gt;
&lt;br /&gt;
# these are special PyMOL variables that will hold # the coordinates of &lt;br /&gt;
# the atoms and the  pseudoatom&lt;br /&gt;
&lt;br /&gt;
stored.origCoord = []&lt;br /&gt;
stored.distCoord = []&lt;br /&gt;
&lt;br /&gt;
# copy the coordinates into those special variables &lt;br /&gt;
&lt;br /&gt;
iterate_state 1, pOrig, stored.origCoord.append((x,y,z))&lt;br /&gt;
iterate_state 1, 1hug, stored.distCoord.append((x,y,z))&lt;br /&gt;
&lt;br /&gt;
# extend origCoord to be the same length as the other&lt;br /&gt;
&lt;br /&gt;
stored.origCoord *= len(stored.distCoord)&lt;br /&gt;
&lt;br /&gt;
# calculate the distances&lt;br /&gt;
&lt;br /&gt;
newB = map(lambda x,y: diff_len(x,y), stored.distCoord, stored.origCoord)&lt;br /&gt;
&lt;br /&gt;
# put them into the b-factor of the protein&lt;br /&gt;
&lt;br /&gt;
alter 1hug, b=newB.pop(0)&lt;br /&gt;
&lt;br /&gt;
# color by rainbow_rev or any other&lt;br /&gt;
# palette listed in &amp;quot;help spectrum&amp;quot;&lt;br /&gt;
&lt;br /&gt;
spectrum b, rainbow_rev, 1hug&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* [[Advanced Coloring]]&lt;br /&gt;
* [[Palette Colorbars]]&lt;br /&gt;
* [[Advanced_Coloring#Coloring_with_.27chainbows.27_from_a_script|chainbow]]&lt;br /&gt;
* [[spectrumany]]&lt;br /&gt;
* [[Ramp_New]]&lt;br /&gt;
* [[spectrumbar]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Isosurface&amp;diff=14628</id>
		<title>Isosurface</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Isosurface&amp;diff=14628"/>
		<updated>2019-10-14T13:30:23Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: examples&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''isosurface''' creates a new surface object from a map object.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 isosurface name, map, level [,(selection) [,buffer [,state [,carve ]]]]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name = the name for the new mesh isosurface object.&lt;br /&gt;
* map = the name of the map object to use for computing the mesh.&lt;br /&gt;
* level = the contour level.&lt;br /&gt;
* selection = an atom selection about which to display the mesh with an additional &amp;quot;buffer&amp;quot; (if provided).&lt;br /&gt;
* state = the state into which the object should be loaded (default=1) (set state=0 to append new surface as a new state)&lt;br /&gt;
* carve = a radius about each atom in the selection for which to include density. If &amp;quot;carve= not provided, then the whole brick is displayed.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
 fetch 1oky, type=2fofc, async=0&lt;br /&gt;
 isosurface 1okySurf, 1oky_2fofc&lt;br /&gt;
&lt;br /&gt;
With carving at 2 Angstrom around the molecular model:&lt;br /&gt;
&lt;br /&gt;
 fetch 1oky, async=0&lt;br /&gt;
 fetch 1oky, type=2fofc, async=0&lt;br /&gt;
 isosurface 1okySurf, 1oky_2fofc, 1.0, (1oky), carve=2.0&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
If the surface object already exists, then the new surface will be appended onto the object as a new state (unless you indicate a state).&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[volume]]&lt;br /&gt;
* [[isodot]]&lt;br /&gt;
* [[isomesh]]&lt;br /&gt;
* [[load]]&lt;br /&gt;
* [[Dynamic_mesh]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Isosurface]]&lt;br /&gt;
[[Category:States|Isosurface]]&lt;br /&gt;
[[Category:Electron_Density]]&lt;br /&gt;
[[Category:Maps]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Geo_Measures_Plugin&amp;diff=14630</id>
		<title>Geo Measures Plugin</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Geo_Measures_Plugin&amp;diff=14630"/>
		<updated>2019-10-14T12:40:09Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: created&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type = plugin&lt;br /&gt;
|download = https://github.com/lkagami/geo_measures_pymol/archive/master.zip&lt;br /&gt;
|author = Luciano Porto Kagami et al.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The [[Geo Measures Plugin]] can carry out geometric analysis on protein structures.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Install [https://github.com/lkagami/geo_measures_pymol/archive/master.zip geo_measures_pymol-master.zip] using the PyMOL [[Plugin Manager]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Color_h&amp;diff=14632</id>
		<title>Color h</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Color_h&amp;diff=14632"/>
		<updated>2019-10-09T10:43:16Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: python3&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
This script colors the selection passed in based on the hydrophobicity scale as defined by:&lt;br /&gt;
::Source: http://us.expasy.org/tools/pscale/Hphob.Eisenberg.html&lt;br /&gt;
::Amino acid scale: Normalized consensus hydrophobicity scale&lt;br /&gt;
:: Author(s): Eisenberg D., Schwarz E., Komarony M., Wall R.&lt;br /&gt;
::Reference: J. Mol. Biol. 179:125-142 (1984)&lt;br /&gt;
&lt;br /&gt;
Or check out hydrophobicity coloring, with rTools from Kristian Rother.&lt;br /&gt;
http://www.rubor.de/pymol_extensions_de.html&lt;br /&gt;
&lt;br /&gt;
= The Code =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# color_h&lt;br /&gt;
# -------&lt;br /&gt;
 &lt;br /&gt;
# PyMOL command to color protein molecules according to the Eisenberg hydrophobicity scale&lt;br /&gt;
 &lt;br /&gt;
#&lt;br /&gt;
# Source: http://us.expasy.org/tools/pscale/Hphob.Eisenberg.html&lt;br /&gt;
# Amino acid scale: Normalized consensus hydrophobicity scale&lt;br /&gt;
# Author(s): Eisenberg D., Schwarz E., Komarony M., Wall R.&lt;br /&gt;
# Reference: J. Mol. Biol. 179:125-142 (1984)&lt;br /&gt;
#&lt;br /&gt;
# Amino acid scale values:&lt;br /&gt;
#&lt;br /&gt;
# Ala:  0.620&lt;br /&gt;
# Arg: -2.530&lt;br /&gt;
# Asn: -0.780&lt;br /&gt;
# Asp: -0.900&lt;br /&gt;
# Cys:  0.290&lt;br /&gt;
# Gln: -0.850&lt;br /&gt;
# Glu: -0.740&lt;br /&gt;
# Gly:  0.480&lt;br /&gt;
# His: -0.400&lt;br /&gt;
# Ile:  1.380&lt;br /&gt;
# Leu:  1.060&lt;br /&gt;
# Lys: -1.500&lt;br /&gt;
# Met:  0.640&lt;br /&gt;
# Phe:  1.190&lt;br /&gt;
# Pro:  0.120&lt;br /&gt;
# Ser: -0.180&lt;br /&gt;
# Thr: -0.050&lt;br /&gt;
# Trp:  0.810&lt;br /&gt;
# Tyr:  0.260&lt;br /&gt;
# Val:  1.080&lt;br /&gt;
#&lt;br /&gt;
# Usage:&lt;br /&gt;
# color_h (selection)&lt;br /&gt;
#&lt;br /&gt;
from pymol import cmd&lt;br /&gt;
&lt;br /&gt;
def color_h(selection='all'):&lt;br /&gt;
        s = str(selection)&lt;br /&gt;
        print(s)&lt;br /&gt;
        cmd.set_color('color_ile',[0.996,0.062,0.062])&lt;br /&gt;
        cmd.set_color('color_phe',[0.996,0.109,0.109])&lt;br /&gt;
        cmd.set_color('color_val',[0.992,0.156,0.156])&lt;br /&gt;
        cmd.set_color('color_leu',[0.992,0.207,0.207])&lt;br /&gt;
        cmd.set_color('color_trp',[0.992,0.254,0.254])&lt;br /&gt;
        cmd.set_color('color_met',[0.988,0.301,0.301])&lt;br /&gt;
        cmd.set_color('color_ala',[0.988,0.348,0.348])&lt;br /&gt;
        cmd.set_color('color_gly',[0.984,0.394,0.394])&lt;br /&gt;
        cmd.set_color('color_cys',[0.984,0.445,0.445])&lt;br /&gt;
        cmd.set_color('color_tyr',[0.984,0.492,0.492])&lt;br /&gt;
        cmd.set_color('color_pro',[0.980,0.539,0.539])&lt;br /&gt;
        cmd.set_color('color_thr',[0.980,0.586,0.586])&lt;br /&gt;
        cmd.set_color('color_ser',[0.980,0.637,0.637])&lt;br /&gt;
        cmd.set_color('color_his',[0.977,0.684,0.684])&lt;br /&gt;
        cmd.set_color('color_glu',[0.977,0.730,0.730])&lt;br /&gt;
        cmd.set_color('color_asn',[0.973,0.777,0.777])&lt;br /&gt;
        cmd.set_color('color_gln',[0.973,0.824,0.824])&lt;br /&gt;
        cmd.set_color('color_asp',[0.973,0.875,0.875])&lt;br /&gt;
        cmd.set_color('color_lys',[0.899,0.922,0.922])&lt;br /&gt;
        cmd.set_color('color_arg',[0.899,0.969,0.969])&lt;br /&gt;
        cmd.color(&amp;quot;color_ile&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn ile)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_phe&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn phe)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_val&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn val)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_leu&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn leu)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_trp&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn trp)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_met&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn met)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_ala&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn ala)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_gly&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn gly)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_cys&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn cys)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_tyr&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn tyr)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_pro&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn pro)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_thr&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn thr)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_ser&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn ser)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_his&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn his)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_glu&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn glu)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_asn&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn asn)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_gln&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn gln)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_asp&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn asp)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_lys&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn lys)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_arg&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn arg)&amp;quot;)&lt;br /&gt;
cmd.extend('color_h',color_h)&lt;br /&gt;
&lt;br /&gt;
def color_h2(selection='all'):&lt;br /&gt;
        s = str(selection)&lt;br /&gt;
        print(s)&lt;br /&gt;
        cmd.set_color(&amp;quot;color_ile2&amp;quot;,[0.938,1,0.938])&lt;br /&gt;
        cmd.set_color(&amp;quot;color_phe2&amp;quot;,[0.891,1,0.891])&lt;br /&gt;
        cmd.set_color(&amp;quot;color_val2&amp;quot;,[0.844,1,0.844])&lt;br /&gt;
        cmd.set_color(&amp;quot;color_leu2&amp;quot;,[0.793,1,0.793])&lt;br /&gt;
        cmd.set_color(&amp;quot;color_trp2&amp;quot;,[0.746,1,0.746])&lt;br /&gt;
        cmd.set_color(&amp;quot;color_met2&amp;quot;,[0.699,1,0.699])&lt;br /&gt;
        cmd.set_color(&amp;quot;color_ala2&amp;quot;,[0.652,1,0.652])&lt;br /&gt;
        cmd.set_color(&amp;quot;color_gly2&amp;quot;,[0.606,1,0.606])&lt;br /&gt;
        cmd.set_color(&amp;quot;color_cys2&amp;quot;,[0.555,1,0.555])&lt;br /&gt;
        cmd.set_color(&amp;quot;color_tyr2&amp;quot;,[0.508,1,0.508])&lt;br /&gt;
        cmd.set_color(&amp;quot;color_pro2&amp;quot;,[0.461,1,0.461])&lt;br /&gt;
        cmd.set_color(&amp;quot;color_thr2&amp;quot;,[0.414,1,0.414])&lt;br /&gt;
        cmd.set_color(&amp;quot;color_ser2&amp;quot;,[0.363,1,0.363])&lt;br /&gt;
        cmd.set_color(&amp;quot;color_his2&amp;quot;,[0.316,1,0.316])&lt;br /&gt;
        cmd.set_color(&amp;quot;color_glu2&amp;quot;,[0.27,1,0.27])&lt;br /&gt;
        cmd.set_color(&amp;quot;color_asn2&amp;quot;,[0.223,1,0.223])&lt;br /&gt;
        cmd.set_color(&amp;quot;color_gln2&amp;quot;,[0.176,1,0.176])&lt;br /&gt;
        cmd.set_color(&amp;quot;color_asp2&amp;quot;,[0.125,1,0.125])&lt;br /&gt;
        cmd.set_color(&amp;quot;color_lys2&amp;quot;,[0.078,1,0.078])&lt;br /&gt;
        cmd.set_color(&amp;quot;color_arg2&amp;quot;,[0.031,1,0.031])&lt;br /&gt;
        cmd.color(&amp;quot;color_ile2&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn ile)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_phe2&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn phe)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_val2&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn val)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_leu2&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn leu)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_trp2&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn trp)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_met2&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn met)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_ala2&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn ala)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_gly2&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn gly)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_cys2&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn cys)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_tyr2&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn tyr)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_pro2&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn pro)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_thr2&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn thr)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_ser2&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn ser)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_his2&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn his)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_glu2&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn glu)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_asn2&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn asn)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_gln2&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn gln)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_asp2&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn asp)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_lys2&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn lys)&amp;quot;)&lt;br /&gt;
        cmd.color(&amp;quot;color_arg2&amp;quot;,&amp;quot;(&amp;quot;+s+&amp;quot; and resn arg)&amp;quot;)&lt;br /&gt;
cmd.extend('color_h2',color_h2)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Biochemical_Scripts]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Get_names_of_type&amp;diff=14634</id>
		<title>Get names of type</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Get_names_of_type&amp;diff=14634"/>
		<updated>2019-10-08T07:27:51Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: selection not valid&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''get_names_of_type''' returns a list of object and/or selection names.&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.get_names_of_type(string type)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===NOTES===&lt;br /&gt;
The object types are strings such as&lt;br /&gt;
&lt;br /&gt;
* object:molecule&lt;br /&gt;
* object:map&lt;br /&gt;
* object:mesh&lt;br /&gt;
* object:slice&lt;br /&gt;
* object:surface&lt;br /&gt;
* object:measurement&lt;br /&gt;
* object:cgo&lt;br /&gt;
* object:group&lt;br /&gt;
* object:volume&lt;br /&gt;
&lt;br /&gt;
=== EXAMPLES ===&lt;br /&gt;
Truncate names of all molecules&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Get names for all molecules.&lt;br /&gt;
for x in cmd.get_names_of_type(&amp;quot;object:molecule&amp;quot;): cmd.set_name(x,x[:5])&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[get_names]], [[get_type]], [[count_atoms]], [[count_states]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=2to3&amp;diff=14626</id>
		<title>2to3</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=2to3&amp;diff=14626"/>
		<updated>2019-08-28T07:08:13Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: str.translate&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is about porting your existing scripts and plugins to Python 3, while keeping Python 2 compatibility.&lt;br /&gt;
The strategies described here have also been used to port most of the scripts in [https://github.com/Pymol-Scripts/Pymol-script-repo Pymol-script-repo].&lt;br /&gt;
&lt;br /&gt;
Recipe overview:&lt;br /&gt;
&lt;br /&gt;
# Make a backup of your scripts (of course)&lt;br /&gt;
# 2to3 -w ...&lt;br /&gt;
# fix imports&lt;br /&gt;
# fix str/bytes mixing&lt;br /&gt;
# ...&lt;br /&gt;
&lt;br /&gt;
= 2to3 =&lt;br /&gt;
&lt;br /&gt;
[https://docs.python.org/3/library/2to3.html 2to3] is an automated conversion tool and part of every Python installation. It will for example replace &amp;lt;code&amp;gt;print &amp;quot;Hello&amp;quot;&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;print(&amp;quot;Hello&amp;quot;)&amp;lt;/code&amp;gt;. We'll exclude all &amp;lt;code&amp;gt;import&amp;lt;/code&amp;gt; fixes here, because we want to use a Python 2 compatible fix instead.&lt;br /&gt;
&lt;br /&gt;
Run in a terminal:&lt;br /&gt;
&lt;br /&gt;
 2to3 -w --nofix=imports --nofix=urllib --nofix=future myscript.py&lt;br /&gt;
&lt;br /&gt;
= Imports =&lt;br /&gt;
&lt;br /&gt;
Place (the relevant subset of) this block at the beginning of each of your script files:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; style=&amp;quot;font-size: 70%&amp;quot;&amp;gt;&lt;br /&gt;
from __future__ import division&lt;br /&gt;
from __future__ import print_function&lt;br /&gt;
from __future__ import absolute_import&lt;br /&gt;
&lt;br /&gt;
import sys&lt;br /&gt;
if sys.version_info[0] &amp;lt; 3:&lt;br /&gt;
    import urllib2&lt;br /&gt;
    from urllib2 import URLError, HTTPError&lt;br /&gt;
    from urllib import quote&lt;br /&gt;
    from idlelib.TreeWidget import TreeItem, TreeNode&lt;br /&gt;
    from Tkinter import *&lt;br /&gt;
    import Tkinter&lt;br /&gt;
    import tkSimpleDialog&lt;br /&gt;
    import tkFileDialog&lt;br /&gt;
    import tkMessageBox&lt;br /&gt;
    import tkColorChooser&lt;br /&gt;
    import Queue&lt;br /&gt;
    import ttk&lt;br /&gt;
    from StringIO import StringIO&lt;br /&gt;
else:&lt;br /&gt;
    import urllib.request as urllib2&lt;br /&gt;
    from urllib.error import URLError, HTTPError&lt;br /&gt;
    from urllib.parse import quote&lt;br /&gt;
    from idlelib.tree import TreeItem, TreeNode&lt;br /&gt;
    from tkinter import *&lt;br /&gt;
    import tkinter as Tkinter&lt;br /&gt;
    from tkinter import simpledialog as tkSimpleDialog&lt;br /&gt;
    from tkinter import filedialog as tkFileDialog&lt;br /&gt;
    import tkinter.messagebox as tkMessageBox&lt;br /&gt;
    import tkinter.colorchooser as tkColorChooser&lt;br /&gt;
    import queue as Queue&lt;br /&gt;
    import tkinter.ttk as ttk&lt;br /&gt;
    from io import StringIO&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Some important notes:'''&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;from __future__ import division&amp;lt;/code&amp;gt; will change the behavior of integer division, &amp;lt;code&amp;gt;3/2 == 1&amp;lt;/code&amp;gt; becomes &amp;lt;code&amp;gt;3/2 == 1.5&amp;lt;/code&amp;gt;. Use &amp;lt;code&amp;gt;//&amp;lt;/code&amp;gt; if you need [https://python-reference.readthedocs.io/en/latest/docs/operators/floor_division.html floor division] (&amp;lt;code&amp;gt;3//2 == 1&amp;lt;/code&amp;gt; in both Python 2 and 3).&lt;br /&gt;
* &amp;lt;code&amp;gt;io.StringIO&amp;lt;/code&amp;gt; is not an exact replacement for &amp;lt;code&amp;gt;StringIO.StringIO&amp;lt;/code&amp;gt;, it doesn't accept [https://docs.python.org/3/library/stdtypes.html#bytes bytes] input. You might need &amp;lt;code&amp;gt;io.BytesIO&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
&lt;br /&gt;
= str vs. bytes =&lt;br /&gt;
&lt;br /&gt;
This can be the most tricky part. In Python 3, all strings are unicode, and &amp;lt;code&amp;gt;unicode&amp;lt;/code&amp;gt; was renamed to &amp;lt;code&amp;gt;str&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;str&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;bytes&amp;lt;/code&amp;gt;. Also, Python 2 allowed mixing of &amp;lt;code&amp;gt;unicode&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;bytes&amp;lt;/code&amp;gt; and automatically encoded/decoded between them when needed. Python 3 doesn't do that, you have to encode and decode yourself, and pay attention to binary vs. text when writing files.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
! Python 2&lt;br /&gt;
! Python 3&lt;br /&gt;
! Literals (2 and 3 compatible)&lt;br /&gt;
|-&lt;br /&gt;
! Unicode type&lt;br /&gt;
| unicode&lt;br /&gt;
| str&lt;br /&gt;
| u&amp;quot;...&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Binary type&lt;br /&gt;
| str (alias bytes)&lt;br /&gt;
| bytes&lt;br /&gt;
| b&amp;quot;...&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Code examples that works in Python 2 and 3:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
text   = u&amp;quot;Greek letter alpha: \u03B1&amp;quot;&lt;br /&gt;
binary = u&amp;quot;Greek letter alpha: \u03B1&amp;quot;.encode(&amp;quot;utf-8&amp;quot;)&lt;br /&gt;
binary = b&amp;quot;Greek letter alpha: \xce\xb1&amp;quot;&lt;br /&gt;
text   = b&amp;quot;Greek letter alpha: \xce\xb1&amp;quot;.decode(&amp;quot;utf-8&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use binary mode when reading or writing bytes from/to files:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# text mode&lt;br /&gt;
with open(&amp;quot;file.txt&amp;quot;, &amp;quot;w&amp;quot;) as f:&lt;br /&gt;
    f.write(u&amp;quot;Hello World\n&amp;quot;)&lt;br /&gt;
    f.write(b&amp;quot;Hello World\n&amp;quot;.decode(&amp;quot;utf-8&amp;quot;))&lt;br /&gt;
&lt;br /&gt;
# binary mode&lt;br /&gt;
with open(&amp;quot;file.bin&amp;quot;, &amp;quot;wb&amp;quot;) as f:&lt;br /&gt;
    f.write(b&amp;quot;Hello World\n&amp;quot;)&lt;br /&gt;
    f.write(u&amp;quot;Hello World\n&amp;quot;.encode(&amp;quot;utf-8&amp;quot;))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The [https://docs.python.org/3/library/subprocess.html subprocess] modules opens streams in binary mode, unless you pass &amp;lt;code&amp;gt;universal_newlines=True&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# text mode&lt;br /&gt;
p = subprocess.Popen(['echo', 'Hello World'],&lt;br /&gt;
        universal_newlines=True,&lt;br /&gt;
        stdout=subprocess.PIPE)&lt;br /&gt;
text = p.stdout.read()&lt;br /&gt;
&lt;br /&gt;
# binary mode&lt;br /&gt;
p = subprocess.Popen(['echo', 'Hello World'],&lt;br /&gt;
        stdout=subprocess.PIPE)&lt;br /&gt;
binary = p.stdout.read()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= string module =&lt;br /&gt;
&lt;br /&gt;
Most [https://docs.python.org/2/library/string.html#deprecated-string-functions &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; module functions are gone], use &amp;lt;code&amp;gt;str&amp;lt;/code&amp;gt; methods instead.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Python 2 only&lt;br /&gt;
! Python 2 and 3&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;string.strip(&amp;quot; Hello &amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot; Hello &amp;quot;.strip()&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;string.split(&amp;quot;A B C&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;A B C&amp;quot;.split()&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;string.join([&amp;quot;A&amp;quot;, &amp;quot;B&amp;quot;, &amp;quot;C&amp;quot;], &amp;quot; &amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot; &amp;quot;.join([&amp;quot;A&amp;quot;, &amp;quot;B&amp;quot;, &amp;quot;C&amp;quot;])&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note: PyMOL has an interim solution for this, which will be removed in a future version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; style=&amp;quot;font-size: 70%&amp;quot;&amp;gt;&lt;br /&gt;
if sys.version_info[0] == 3:&lt;br /&gt;
    import string&lt;br /&gt;
    for attr in ['capitalize', 'count', 'find', 'index', 'lower',&lt;br /&gt;
            'replace', 'rstrip', 'split', 'strip', 'upper', 'zfill']:&lt;br /&gt;
        setattr(string, attr, getattr(str, attr))&lt;br /&gt;
    string.letters      = string.ascii_letters&lt;br /&gt;
    string.lowercase    = string.ascii_lowercase&lt;br /&gt;
    string.join = lambda words, sep=' ': sep.join(words)&lt;br /&gt;
    string.atoi = int&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Hex formatting of floats =&lt;br /&gt;
&lt;br /&gt;
This works in Python 2, but is an error in Python 3:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; '%x' % 12.34&lt;br /&gt;
TypeError: %x format: an integer is required, not float&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Solution: Convert floats to &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; '%x' % int(12.34)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= str.translate =&lt;br /&gt;
&lt;br /&gt;
The ''deletechars'' argument of [https://docs.python.org/2/library/stdtypes.html#str.translate str.translate] is gone.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Python 2 only&lt;br /&gt;
! Python 2 and 3&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;Hello&amp;quot;.translate(None, &amp;quot;aeiou&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;quot;&amp;quot;.join(c for c in &amp;quot;Hello&amp;quot; if c not in &amp;quot;aeiou&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Spaceball_plugin&amp;diff=14619</id>
		<title>Spaceball plugin</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Spaceball_plugin&amp;diff=14619"/>
		<updated>2019-08-18T18:29:36Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: PyMOL 2.1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = plugin&lt;br /&gt;
|download  = http://divites.de/files/pymol/spaceball.tar.gz&lt;br /&gt;
|author    = [[User:RaphaelDives|Raphael Dives]]&lt;br /&gt;
|license   = BSD-3-Clause&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #9f9; padding: 10px; margin-bottom: 20px; text-align: center&amp;quot;&amp;gt;&lt;br /&gt;
'''Note:''' PyMOL 2.1 has built-in SpaceNavigator support for all platforms, see https://pymol.org/spacenavigator&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
This plugin integrates Spaceball devices on Linux Systems.&lt;br /&gt;
&lt;br /&gt;
It was developed and tested with the SpaceNavigator(TM) by 3DConnexion.&lt;br /&gt;
&lt;br /&gt;
But it *should* work with other (Linux based) systems and Spacenav Driver compatible devices as well.&lt;br /&gt;
&lt;br /&gt;
The used software was:&lt;br /&gt;
:PyMOL version 1.7&lt;br /&gt;
:Ubuntu-12.04 / 14.04&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
[http://divites.de/files/pymol/spaceball.tar.gz Download] the plugin and install it using the PyMOL plugin wizard.&lt;br /&gt;
&lt;br /&gt;
Please consider the following requirements:&lt;br /&gt;
#Install the &amp;quot;libspnav0&amp;quot; and &amp;quot;libspnav-dev&amp;quot; packages from the repositories&lt;br /&gt;
#Obtain and install the current version of the Spacenav driver from [http://www.spacenav.sourceforge.net/ http://www.spacenav.sourceforge.net/]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Important ==&lt;br /&gt;
&lt;br /&gt;
The name &amp;quot;SpaceMouse&amp;quot; is registered trademark of 3DConnexion.&lt;br /&gt;
&lt;br /&gt;
This plugin uses the spnav-0.9 package&lt;br /&gt;
:Copyright (c) 2011, Stanley Seibert&lt;br /&gt;
:All rights reserved.&lt;br /&gt;
:The BSD-License agreement and the Readme for this package are located in the spnav_docs folder.&lt;br /&gt;
:Please see the http://bitbucket.org/seibert/spnav/ for more information.&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;br /&gt;
[[Category:Pymol-script-repo]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Caver3&amp;diff=14621</id>
		<title>Caver3</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Caver3&amp;diff=14621"/>
		<updated>2019-08-15T07:34:55Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: github&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type = plugin&lt;br /&gt;
|download = https://github.com/loschmidt/caver-pymol-plugin/archive/master.zip&lt;br /&gt;
|author = CAVER Team&lt;br /&gt;
|license = GPL&lt;br /&gt;
|homepage = http://www.caver.cz&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The [[Caver3]] plugin is the successor of [[Caver2]].&lt;br /&gt;
CAVER is a software tool for analysis and visualization of tunnels and channels in protein structures.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
# Install [https://java.com/en/download/ Java]&lt;br /&gt;
# Install [https://github.com/loschmidt/caver-pymol-plugin/archive/master.zip caver-pymol-plugin-master.zip] using the PyMOL [[Plugin Manager]]&lt;br /&gt;
&lt;br /&gt;
[[File:PluginManagerCaverPlugin301_fixed.png|345px]]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Mole2]]&lt;br /&gt;
* [[Caver2]] (old version)&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Launching_From_a_Script&amp;diff=14615</id>
		<title>Launching From a Script</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Launching_From_a_Script&amp;diff=14615"/>
		<updated>2019-07-08T09:39:22Z</updated>

		<summary type="html">&lt;p&gt;Speleo3: see also Jupyter&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;background-color: #ccc; padding: 20px&amp;quot;&amp;gt;&lt;br /&gt;
The recommended way to run PyMOL-Python scripts is by using PyMOL as the interpreter. This is supported by all versions of PyMOL, including the pre-compiled bundles provided by Schrödinger.&lt;br /&gt;
&lt;br /&gt;
Example from a shell:&lt;br /&gt;
&lt;br /&gt;
 shell&amp;gt; pymol -cq script.py&lt;br /&gt;
&lt;br /&gt;
With arguments (''sys.argv'' becomes ''[&amp;quot;script.py&amp;quot;, &amp;quot;foo&amp;quot;, &amp;quot;bar&amp;quot;]''):&lt;br /&gt;
&lt;br /&gt;
 shell&amp;gt; pymol -cq script.py -- foo bar&lt;br /&gt;
&lt;br /&gt;
Example from a running PyMOL instance:&lt;br /&gt;
&lt;br /&gt;
 PyMOL&amp;gt; run script.py&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For advanced users, the following PyMOL versions also allow to run PyMOL from an existing Python process:&lt;br /&gt;
&lt;br /&gt;
* [https://pymol.org/2/#download PyMOL 2.0] based on Anaconda (using Anaconda's python, which is included in bundles provided by Schrödinger)&lt;br /&gt;
* Open-Source PyMOL&lt;br /&gt;
* Schrödinger-provided &amp;quot;[http://pymol.org/download Mac alternative X11-only build]&amp;quot; of the 1.8.x series&lt;br /&gt;
&lt;br /&gt;
After importing the '''pymol''' module, PyMOL's event loop has to be started with a call to '''pymol.finish_launching()'''.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
With PyMOL 2.1, calling any pymol.cmd function will automatically start a backend process without the GUI in the main thread. &amp;quot;finish_launching&amp;quot; should not be necessary, and will launch PyMOL in a new thread with an event loop, which will cause 100% CPU usage (at least with &amp;quot;-c&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from pymol import cmd&lt;br /&gt;
cmd.fragment('ala')&lt;br /&gt;
cmd.zoom()&lt;br /&gt;
cmd.png('/tmp/test.png', 300, 200)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since PyMOL 1.7.4, the following form is sufficient:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import pymol&lt;br /&gt;
pymol.finish_launching(['pymol', '-q'])&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before 1.7.4, either &amp;quot;-K&amp;quot; was needed as an additional argument, or arguments had to be assigned to __main__.pymol_argv or pymol.pymol_argv.&lt;br /&gt;
&lt;br /&gt;
== Example 1 ==&lt;br /&gt;
&lt;br /&gt;
Here is an example script that launches PyMol for stereo viewing on a [http://www.visbox.com/boxMain.html VisBox].  It runs PyMol fullscreen stereo, and disables the internal gui.&lt;br /&gt;
The environment (PYTHON_PATH and PYMOL_PATH) must already be set up for this example to work (see [[#Example 2|Example 2]] below for how to setup within the script).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/bin/env python&lt;br /&gt;
 &lt;br /&gt;
# Tell PyMOL to launch quiet (-q), fullscreen (-e) and without internal GUI (-i)&lt;br /&gt;
import __main__&lt;br /&gt;
__main__.pymol_argv = [ 'pymol', '-qei' ]&lt;br /&gt;
 &lt;br /&gt;
import pymol&lt;br /&gt;
 &lt;br /&gt;
# Call the function below before using any PyMOL modules.&lt;br /&gt;
pymol.finish_launching()&lt;br /&gt;
 &lt;br /&gt;
from pymol import cmd&lt;br /&gt;
cmd.stereo('walleye')&lt;br /&gt;
cmd.set('stereo_shift', 0.23)&lt;br /&gt;
cmd.set('stereo_angle', 1.0)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example 2 ==&lt;br /&gt;
&lt;br /&gt;
This script launches PyMOL without any GUI for scripting only. It enables tab-completion on the python command line and does the PyMOL environment setup (you need to adjust the '''moddir''' variable!). ''Hint: You may save this as &amp;quot;pymol-cli&amp;quot; executable.''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/bin/python2.6 -i&lt;br /&gt;
&lt;br /&gt;
import sys, os&lt;br /&gt;
&lt;br /&gt;
# autocompletion&lt;br /&gt;
import readline&lt;br /&gt;
import rlcompleter&lt;br /&gt;
readline.parse_and_bind('tab: complete')&lt;br /&gt;
&lt;br /&gt;
# pymol environment&lt;br /&gt;
moddir='/opt/pymol-svn/modules'&lt;br /&gt;
sys.path.insert(0, moddir)&lt;br /&gt;
os.environ['PYMOL_PATH'] = os.path.join(moddir, 'pymol/pymol_path')&lt;br /&gt;
&lt;br /&gt;
# pymol launching: quiet (-q), without GUI (-c) and with arguments from command line&lt;br /&gt;
import pymol&lt;br /&gt;
pymol.pymol_argv = ['pymol','-qc'] + sys.argv[1:]&lt;br /&gt;
pymol.finish_launching()&lt;br /&gt;
cmd = pymol.cmd&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== STDOUT ==&lt;br /&gt;
&lt;br /&gt;
PyMOL captures '''sys.stdout''' and '''sys.stderr''', to control it with it's own [[feedback]] mechanism. To prevent that, save and restore both streams, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import sys&lt;br /&gt;
stdout = sys.stdout&lt;br /&gt;
stderr = sys.stderr&lt;br /&gt;
pymol.finish_launching(['pymol', '-xiq'])&lt;br /&gt;
sys.stdout = stdout&lt;br /&gt;
sys.stderr = stderr&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Independent PyMOL Instances ==&lt;br /&gt;
It's possible to have multiple independent instances. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import pymol2&lt;br /&gt;
p1 = pymol2.PyMOL()&lt;br /&gt;
p1.start()&lt;br /&gt;
&lt;br /&gt;
p2 = pymol2.PyMOL()&lt;br /&gt;
p2.start()&lt;br /&gt;
&lt;br /&gt;
p1.cmd.fragment('ala')&lt;br /&gt;
p1.cmd.zoom()&lt;br /&gt;
p1.cmd.png('/tmp/ala.png', 1000, 800, dpi=150, ray=1)&lt;br /&gt;
&lt;br /&gt;
p2.cmd.fragment('ser')&lt;br /&gt;
p2.cmd.zoom()&lt;br /&gt;
p2.cmd.png('/tmp/ser.png', 1000, 800, dpi=150, ray=1)&lt;br /&gt;
&lt;br /&gt;
p1.stop()&lt;br /&gt;
p2.stop()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Independent PyMOL Instances (Context Manager) ==&lt;br /&gt;
&lt;br /&gt;
PyMOL 2.2 adds context manager support.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import pymol2&lt;br /&gt;
with pymol2.PyMOL() as p1:&lt;br /&gt;
    p1.cmd.fragment('ala')&lt;br /&gt;
    p1.cmd.zoom()&lt;br /&gt;
    p1.cmd.png('/tmp/ala.png', 1000, 800, dpi=150, ray=1)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Command Line Options]]&lt;br /&gt;
* [[Jupyter]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Launching]]&lt;br /&gt;
[[Category:Script_Library]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
</feed>