<?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=Folf</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=Folf"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php/Special:Contributions/Folf"/>
	<updated>2026-04-17T03:27:06Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=User:Folf&amp;diff=12195</id>
		<title>User:Folf</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=User:Folf&amp;diff=12195"/>
		<updated>2014-09-16T13:43:52Z</updated>

		<summary type="html">&lt;p&gt;Folf: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
Using PyMOL for generation of publication quality pictures as well as structure analysis.&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=User:Folf&amp;diff=3260</id>
		<title>User:Folf</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=User:Folf&amp;diff=3260"/>
		<updated>2012-08-13T11:32:18Z</updated>

		<summary type="html">&lt;p&gt;Folf: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
I am a post-doc at MAXlab (http://www.maxlab.lu.se), working at the crystallography beamlines with software installation/hardware updates/user support and my own research.&lt;br /&gt;
&lt;br /&gt;
Using PyMOL for generation of publication quality pictures as well as structure analysis.&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=User:Folf&amp;diff=3259</id>
		<title>User:Folf</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=User:Folf&amp;diff=3259"/>
		<updated>2012-08-13T11:31:23Z</updated>

		<summary type="html">&lt;p&gt;Folf: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
I am a post-doc at MAXlab (www.maxlab.lu.se), working at the crystallography beamlines with software installation/hardware updates/user support and my own research.&lt;br /&gt;
&lt;br /&gt;
Using PyMOL for generation of publication quality pictures as well as structure analysis.&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=User:Folf&amp;diff=3258</id>
		<title>User:Folf</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=User:Folf&amp;diff=3258"/>
		<updated>2012-08-13T11:31:05Z</updated>

		<summary type="html">&lt;p&gt;Folf: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
I am a post-doc at MAXlab, working at the crystallography beamlines with software installation/hardware updates/user support and my own research.&lt;br /&gt;
&lt;br /&gt;
Using PyMOL for generation of publication quality pictures as well as structure analysis.&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Git_install_scripts&amp;diff=7776</id>
		<title>Git install scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Git_install_scripts&amp;diff=7776"/>
		<updated>2012-08-13T11:28:01Z</updated>

		<summary type="html">&lt;p&gt;Folf: /* For Linux users */  changed the output path (deleted /Software/pymol)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Manual download of scripts ==&lt;br /&gt;
If you don't have the option or want't to install git on your system, then go to&lt;br /&gt;
 https://github.com/Pymol-Scripts/Pymol-script-repo&lt;br /&gt;
Click the &amp;quot;ZIP&amp;quot; button, near the top left corner.&lt;br /&gt;
Now unpack the files to a directory. For example:&lt;br /&gt;
 C:/Users/YOURNAME/Pymol-script-repo&lt;br /&gt;
 /home/YOURNAME/Pymol-script-repo&lt;br /&gt;
&lt;br /&gt;
Now go to: '''Adding Pymol-script-repo to PyMOL search path''' [http://www.pymolwiki.org/index.php/Git_install#Adding_Pymol-script-repo_to_PyMOL_search_path]&lt;br /&gt;
&lt;br /&gt;
== Git install instructions ==&lt;br /&gt;
=== For Windows users ===&lt;br /&gt;
# Install [http://code.google.com/p/msysgit/downloads/list?can=3&amp;amp;q=official+Git Git for Windows].&lt;br /&gt;
Use following settings in options, [http://www.geekgumbo.com/2010/04/09/installing-git-on-windows/ (You can read more here)].&lt;br /&gt;
* Windows Explorer Integration -&amp;gt; Context Menu Entries -&amp;gt; Git Bash Here + Git GUI here&lt;br /&gt;
* Run Git and included Unix tools from Windows Command prompts&lt;br /&gt;
* Checkout Windows style, commit Unix-style endings&lt;br /&gt;
&lt;br /&gt;
# Navigate to: '''C:\Users\YOURNAME'''&lt;br /&gt;
# Right click in folder -&amp;gt; Select: Git Gui -&amp;gt; Clone Existing Repository&lt;br /&gt;
# Source Location: git://github.com/Pymol-Scripts/Pymol-script-repo.git&lt;br /&gt;
# Target Directory: C:\\Users\\YOURNAME\\Pymol-script-repo&lt;br /&gt;
#: A backslash &amp;quot;\&amp;quot; in a string is [http://effbot.org/pyref/string-literals.htm is used for escape sequences]. To get a real backslash in a string, use double backslash &amp;quot;\\&amp;quot;   &lt;br /&gt;
You now have all the scripts available in your directory.&lt;br /&gt;
&lt;br /&gt;
=== For Linux users ===&lt;br /&gt;
# Install git&lt;br /&gt;
 # Debian/Ubuntu/Mint&lt;br /&gt;
 sudo apt-get install git&lt;br /&gt;
 # Fedora&lt;br /&gt;
 su -c 'yum install git'&lt;br /&gt;
 # openSUSE&lt;br /&gt;
 sudo zypper in git&lt;br /&gt;
&lt;br /&gt;
# Navigate to desired folder: &lt;br /&gt;
 cd /home/YOURNAME/&lt;br /&gt;
 git clone git://github.com/Pymol-Scripts/Pymol-script-repo.git&lt;br /&gt;
You now have all the scripts available in: /home/YOURNAME/Pymol-script-repo&lt;br /&gt;
&lt;br /&gt;
== Adding Pymol-script-repo to PyMOL search path ==&lt;br /&gt;
You now have to add the &amp;quot;Pymol-script-repo&amp;quot; directory to the PyMOL search path. &lt;br /&gt;
&lt;br /&gt;
PyMOL has since revision 3997 (30 April 2012) an improved plugin/script manager.&lt;br /&gt;
You have to remove old installations of plugins first, to get the automatic plugin installation to work.&lt;br /&gt;
=== Making a personal &amp;quot;pymolrc&amp;quot; file - for personal use ===&lt;br /&gt;
# Open notepad/gedit and save under:&lt;br /&gt;
## Win: '''C:\Users\YOURNAME\pymolrc.pym''' (Set: &amp;quot;Save as type&amp;quot; to &amp;quot;All files&amp;quot;)&lt;br /&gt;
## Linux: '''~/.pymolrc'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Add paths to sys.path so PyMOL can find modules and scripts&lt;br /&gt;
import sys, os&lt;br /&gt;
pymol_git = os.path.abspath(os.path.join(os.path.expanduser('~'), 'Pymol-script-repo'))&lt;br /&gt;
os.environ['PYMOL_GIT_MOD'] = os.path.join(pymol_git,'modules')&lt;br /&gt;
sys.path.append(pymol_git)&lt;br /&gt;
sys.path.append(os.environ['PYMOL_GIT_MOD'])&lt;br /&gt;
&lt;br /&gt;
# Make starting directory and change to it.&lt;br /&gt;
home_dir = os.path.abspath(os.path.join(os.path.expanduser('~'), 'pymol'))&lt;br /&gt;
if not os.path.exists(home_dir): os.makedirs(home_dir)&lt;br /&gt;
os.chdir(home_dir)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then open PyMOL. Go to top menu: Plugin-&amp;gt;Plugin Manager&lt;br /&gt;
# Installed plugins: Unclick &amp;quot;apbs_tools&amp;quot; as &amp;quot;load on startup&amp;quot;. (The Pymol-script-repo has a fine-tuned version, &amp;quot;apbsplugin&amp;quot;)&lt;br /&gt;
# Settings-&amp;gt;Add new directory: Point to: /custom/path/Pymol-script-repo/plugins&lt;br /&gt;
# Restart PyMOL&lt;br /&gt;
&lt;br /&gt;
=== Making a general &amp;quot;run_on_startup.py&amp;quot; - for all users ===&lt;br /&gt;
If you have a shared PyMOL installation for several linux computers, you can make general wide changes for the startup of PyMOL.&amp;lt;br&amp;gt;&lt;br /&gt;
First locate your PYMOL_PATH. Start PyMOL, and write:&lt;br /&gt;
 import os&lt;br /&gt;
 print os.environ['PYMOL_PATH']&lt;br /&gt;
In this folder, you place &amp;quot;run_on_startup.py&amp;quot; and the Pymol-script-repo directory.&amp;lt;br&amp;gt;&lt;br /&gt;
Write in &amp;quot;run_on_startup.py&amp;quot; : &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Add paths to sys.path so PyMOL can find modules and scripts&lt;br /&gt;
import sys, os&lt;br /&gt;
pymol_git = os.path.abspath(os.path.join(os.environ['PYMOL_PATH'], 'Pymol-script-repo'))&lt;br /&gt;
os.environ['PYMOL_GIT_MOD'] = os.path.join(pymol_git,'modules')&lt;br /&gt;
sys.path.append(pymol_git)&lt;br /&gt;
sys.path.append(os.environ['PYMOL_GIT_MOD'])&lt;br /&gt;
&lt;br /&gt;
# Make starting directory and change to it.&lt;br /&gt;
home_dir = os.path.abspath(os.path.join(os.path.expanduser('~'), 'pymol'))&lt;br /&gt;
if not os.path.exists(home_dir): os.makedirs(home_dir)&lt;br /&gt;
os.chdir(home_dir)&lt;br /&gt;
&lt;br /&gt;
# Make setting changes to Plugin Manager&lt;br /&gt;
import pymol.plugins&lt;br /&gt;
pymol.plugins.preferences = {'instantsave': False, 'verbose': False}&lt;br /&gt;
pymol.plugins.autoload = {'apbs_tools': False}&lt;br /&gt;
pymol.plugins.set_startup_path([os.path.join(pymol_git, 'plugins'), os.path.join(sys.prefix, 'Lib', 'site-packages', 'pmg_tk', 'startup')])&lt;br /&gt;
pymol.plugins.preferences = {'instantsave': True, 'verbose': False}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test the Scripts ==&lt;br /&gt;
Now start PyMOL, and test in PyMOL.&lt;br /&gt;
 print sys.path&lt;br /&gt;
 import colorbydisplacement&lt;br /&gt;
 help(colorbydisplacement)&lt;br /&gt;
&lt;br /&gt;
== Get latest changes to scripts ==&lt;br /&gt;
If new scripts are available or changes have been made, then:&lt;br /&gt;
=== For windows users ===&lt;br /&gt;
# Navigate to '''C:\Users\YOURNAME\Pymol-script-repo'''&lt;br /&gt;
# Right click in folder -&amp;gt; Select: Git Bash&lt;br /&gt;
# Write in terminal&lt;br /&gt;
 git pull origin master&lt;br /&gt;
&lt;br /&gt;
=== For Ubuntu/Mint users ===&lt;br /&gt;
# Navigate to '''/home/YOURNAME/Pymol-script-repo'''&lt;br /&gt;
# Write in terminal.&lt;br /&gt;
 git pull origin master&lt;br /&gt;
&lt;br /&gt;
= Do you want to contribute with a script? =&lt;br /&gt;
Information how to contribute scripts to the repository. It's easy! &amp;lt;br&amp;gt;&lt;br /&gt;
http://www.pymolwiki.org/index.php/git_authors&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Git_install_scripts&amp;diff=8256</id>
		<title>Git install scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Git_install_scripts&amp;diff=8256"/>
		<updated>2012-05-14T13:34:47Z</updated>

		<summary type="html">&lt;p&gt;Folf: /* Alternative */  changed PYMOL_GIT_MOD to point in the right direction&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Manual download of scripts ==&lt;br /&gt;
If you don't have the option or want't to install git on your system, then go to&lt;br /&gt;
 https://github.com/Pymol-Scripts/Pymol-script-repo&lt;br /&gt;
Click the &amp;quot;ZIP&amp;quot; button, near the top left corner.&lt;br /&gt;
Now unpack the files to a directory. For example:&lt;br /&gt;
 C:/Users/YOURNAME/Documents/Pymol-script-repo&lt;br /&gt;
or&lt;br /&gt;
 /home/YOURNAME/Software/pymol&lt;br /&gt;
&lt;br /&gt;
Now go to: '''Adding Pymol-script-repo to PyMOL search path''' [http://www.pymolwiki.org/index.php/Git_install#Adding_Pymol-script-repo_to_PyMOL_search_path]&lt;br /&gt;
&lt;br /&gt;
== Git install instructions ==&lt;br /&gt;
=== For Windows users ===&lt;br /&gt;
# Install [http://code.google.com/p/msysgit/downloads/list?can=3&amp;amp;q=official+Git Git for Windows].&lt;br /&gt;
Use following settings in options, [http://www.geekgumbo.com/2010/04/09/installing-git-on-windows/ (You can read more here)].&lt;br /&gt;
* Windows Explorer Integration -&amp;gt; Context Menu Entries -&amp;gt; Git Bash Here + Git GUI here&lt;br /&gt;
* Run Git and included Unix tools from Windows Command prompts&lt;br /&gt;
* Checkout Windows style, commit Unix-style endings&lt;br /&gt;
&lt;br /&gt;
# Navigate to: '''C:\Users\YOURNAME\Documents\pymol'''&lt;br /&gt;
# Right click in folder -&amp;gt; Select: Git Gui -&amp;gt; Clone Existing Repository&lt;br /&gt;
# Source Location: git://github.com/Pymol-Scripts/Pymol-script-repo.git&lt;br /&gt;
# Target Directory: C:\\Users\\YOURNAME\\Documents\\pymol\Pymol-script-repo&lt;br /&gt;
#: A backslash &amp;quot;\&amp;quot; in a string is [http://effbot.org/pyref/string-literals.htm is used for escape sequences]. To get a real backslash in a string, use double backslash &amp;quot;\\&amp;quot;   &lt;br /&gt;
You now have all the scripts available in your directory.&lt;br /&gt;
&lt;br /&gt;
Add '''python.exe''' to your '''PATH''', so external .py scripts can be executed.&amp;lt;br&amp;gt;&lt;br /&gt;
Open control panel. Search for, and click: '''Edit environment variables for your account'''&amp;lt;br&amp;gt;&lt;br /&gt;
Add to end of variable PATH: ''';C:\Python27'''   (Or other path to your python python.exe)&amp;lt;br&amp;gt;&lt;br /&gt;
Click start button, and open '''cmd.exe'''. Try starting python by writing: '''python'''&lt;br /&gt;
&lt;br /&gt;
=== For Linux users ===&lt;br /&gt;
# Install git&lt;br /&gt;
 # Debian/Ubuntu/Mint&lt;br /&gt;
 sudo apt-get install git&lt;br /&gt;
 # Fedora&lt;br /&gt;
 su -c 'yum install git'&lt;br /&gt;
 # openSUSE&lt;br /&gt;
 sudo zypper in git&lt;br /&gt;
&lt;br /&gt;
# Navigate to desired folder: &lt;br /&gt;
 cd /home/YOURNAME/Software/pymol&lt;br /&gt;
 git clone git://github.com/Pymol-Scripts/Pymol-script-repo.git&lt;br /&gt;
You now have all the scripts available in: /home/YOURNAME/Software/pymol/Pymol-script-repo&lt;br /&gt;
&lt;br /&gt;
== Adding Pymol-script-repo to PyMOL search path ==&lt;br /&gt;
You now have to add the &amp;quot;Pymol-script-repo&amp;quot; directory to the PyMOL search path. &lt;br /&gt;
&lt;br /&gt;
The project also have automatically plugin installer: http://www.pymolwiki.org/index.php/plugindirectory &amp;lt;br&amp;gt;&lt;br /&gt;
This is activated with: '''import plugins'''. &amp;lt;br&amp;gt;&lt;br /&gt;
'''You have to remove old installations of plugins first, to get the automatic plugin installation to work.'''&lt;br /&gt;
=== For Windows users ===&lt;br /&gt;
# Open notepad&lt;br /&gt;
# Write (Remember double backslashes)&lt;br /&gt;
 import sys,os&lt;br /&gt;
 sys.path.append('C:\\Users\\YOURNAME\\Documents\\pymol\\Pymol-script-repo')&lt;br /&gt;
 os.environ['PYMOL_GIT_MOD']='C:\\Users\\YOURNAME\\Documents\\pymol\\Pymol-script-repo\\modules'&lt;br /&gt;
 import plugins&lt;br /&gt;
 os.chdir('C:\\Users\\YOURNAME\\Documents\\pymol')                                # Your standard working dir&lt;br /&gt;
Save under: '''C:\Users\YOURNAME\pymolrc.pym''' (Set: &amp;quot;Save as type&amp;quot; to &amp;quot;All files&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
=== For Linux users ===&lt;br /&gt;
 gedit ~/.pymolrc&lt;br /&gt;
Write&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 import sys,os&lt;br /&gt;
 sys.path.append('/home/YOU/Software/pymol/Pymol-script-repo')&lt;br /&gt;
 os.environ['PYMOL_GIT_MOD']='/home/YOU/Software/pymol/Pymol-script-repo/modules'&lt;br /&gt;
 import plugins&lt;br /&gt;
 os.chdir('/home/YOU/Software/pymol/')                              # Your standard working dir&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Save and exit&lt;br /&gt;
&lt;br /&gt;
==== Alternative ====&lt;br /&gt;
Or perhaps insert the following code instead (no need to insert USERNAME, so more generic) &amp;lt;!-- this works for me, but please edit if this is wrong --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# eventually add ~/Software/pymol/Pymol-script-repo to sys.path&lt;br /&gt;
import sys, os&lt;br /&gt;
sys.path.append(os.path.expanduser('~/Software/pymol/Pymol-script-repo'))&lt;br /&gt;
os.environ['PYMOL_GIT_MOD']=os.path.expanduser('~/Software/pymol/Pymol-script-repo/modules')&lt;br /&gt;
 &lt;br /&gt;
# load the module&lt;br /&gt;
import plugins&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test the Scripts ==&lt;br /&gt;
Now start PyMOL, and test in PyMOL.&lt;br /&gt;
 print sys.path&lt;br /&gt;
 import colorbydisplacement&lt;br /&gt;
 help(colorbydisplacement)&lt;br /&gt;
&lt;br /&gt;
== Get latest changes to scripts ==&lt;br /&gt;
If new scripts are available or changes have been made, then:&lt;br /&gt;
=== For windows users ===&lt;br /&gt;
# Navigate to '''C:\Users\YOURNAME\Documents\Pymol-script-repo'''&lt;br /&gt;
# Right click in folder -&amp;gt; Select: Git Bash&lt;br /&gt;
# Write in terminal&lt;br /&gt;
 git pull origin master&lt;br /&gt;
&lt;br /&gt;
=== For Ubuntu/Mint users ===&lt;br /&gt;
# Navigate to '''/home/YOURNAME/Software/pymol/Pymol-script-repo'''&lt;br /&gt;
# Write in terminal.&lt;br /&gt;
 git pull origin master&lt;br /&gt;
&lt;br /&gt;
= Do you want to contribute with a script? =&lt;br /&gt;
Information how to contribute scripts to the repository. It's easy! &amp;lt;br&amp;gt;&lt;br /&gt;
http://www.pymolwiki.org/index.php/git_authors&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Git_install_scripts&amp;diff=8255</id>
		<title>Git install scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Git_install_scripts&amp;diff=8255"/>
		<updated>2012-05-14T11:09:14Z</updated>

		<summary type="html">&lt;p&gt;Folf: /* For Linux users */  added alternative version of the .pymolrc text for username-agnostic version&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Manual download of scripts ==&lt;br /&gt;
If you don't have the option or want't to install git on your system, then go to&lt;br /&gt;
 https://github.com/Pymol-Scripts/Pymol-script-repo&lt;br /&gt;
Click the &amp;quot;ZIP&amp;quot; button, near the top left corner.&lt;br /&gt;
Now unpack the files to a directory. For example:&lt;br /&gt;
 C:/Users/YOURNAME/Documents/Pymol-script-repo&lt;br /&gt;
or&lt;br /&gt;
 /home/YOURNAME/Software/pymol&lt;br /&gt;
&lt;br /&gt;
Now go to: '''Adding Pymol-script-repo to PyMOL search path''' [http://www.pymolwiki.org/index.php/Git_install#Adding_Pymol-script-repo_to_PyMOL_search_path]&lt;br /&gt;
&lt;br /&gt;
== Git install instructions ==&lt;br /&gt;
=== For Windows users ===&lt;br /&gt;
# Install [http://code.google.com/p/msysgit/downloads/list?can=3&amp;amp;q=official+Git Git for Windows].&lt;br /&gt;
Use following settings in options, [http://www.geekgumbo.com/2010/04/09/installing-git-on-windows/ (You can read more here)].&lt;br /&gt;
* Windows Explorer Integration -&amp;gt; Context Menu Entries -&amp;gt; Git Bash Here + Git GUI here&lt;br /&gt;
* Run Git and included Unix tools from Windows Command prompts&lt;br /&gt;
* Checkout Windows style, commit Unix-style endings&lt;br /&gt;
&lt;br /&gt;
# Navigate to: '''C:\Users\YOURNAME\Documents\pymol'''&lt;br /&gt;
# Right click in folder -&amp;gt; Select: Git Gui -&amp;gt; Clone Existing Repository&lt;br /&gt;
# Source Location: git://github.com/Pymol-Scripts/Pymol-script-repo.git&lt;br /&gt;
# Target Directory: C:\\Users\\YOURNAME\\Documents\\pymol\Pymol-script-repo&lt;br /&gt;
#: A backslash &amp;quot;\&amp;quot; in a string is [http://effbot.org/pyref/string-literals.htm is used for escape sequences]. To get a real backslash in a string, use double backslash &amp;quot;\\&amp;quot;   &lt;br /&gt;
You now have all the scripts available in your directory.&lt;br /&gt;
&lt;br /&gt;
Add '''python.exe''' to your '''PATH''', so external .py scripts can be executed.&amp;lt;br&amp;gt;&lt;br /&gt;
Open control panel. Search for, and click: '''Edit environment variables for your account'''&amp;lt;br&amp;gt;&lt;br /&gt;
Add to end of variable PATH: ''';C:\Python27'''   (Or other path to your python python.exe)&amp;lt;br&amp;gt;&lt;br /&gt;
Click start button, and open '''cmd.exe'''. Try starting python by writing: '''python'''&lt;br /&gt;
&lt;br /&gt;
=== For Linux users ===&lt;br /&gt;
# Install git&lt;br /&gt;
 # Debian/Ubuntu/Mint&lt;br /&gt;
 sudo apt-get install git&lt;br /&gt;
 # Fedora&lt;br /&gt;
 su -c 'yum install git'&lt;br /&gt;
 # openSUSE&lt;br /&gt;
 sudo zypper in git&lt;br /&gt;
&lt;br /&gt;
# Navigate to desired folder: &lt;br /&gt;
 cd /home/YOURNAME/Software/pymol&lt;br /&gt;
 git clone git://github.com/Pymol-Scripts/Pymol-script-repo.git&lt;br /&gt;
You now have all the scripts available in: /home/YOURNAME/Software/pymol/Pymol-script-repo&lt;br /&gt;
&lt;br /&gt;
== Adding Pymol-script-repo to PyMOL search path ==&lt;br /&gt;
You now have to add the &amp;quot;Pymol-script-repo&amp;quot; directory to the PyMOL search path. &lt;br /&gt;
&lt;br /&gt;
The project also have automatically plugin installer: http://www.pymolwiki.org/index.php/plugindirectory &amp;lt;br&amp;gt;&lt;br /&gt;
This is activated with: '''import plugins'''. &amp;lt;br&amp;gt;&lt;br /&gt;
'''You have to remove old installations of plugins first, to get the automatic plugin installation to work.'''&lt;br /&gt;
=== For Windows users ===&lt;br /&gt;
# Open notepad&lt;br /&gt;
# Write (Remember double backslashes)&lt;br /&gt;
 import sys,os&lt;br /&gt;
 sys.path.append('C:\\Users\\YOURNAME\\Documents\\pymol\\Pymol-script-repo')&lt;br /&gt;
 os.environ['PYMOL_GIT_MOD']='C:\\Users\\YOURNAME\\Documents\\pymol\\Pymol-script-repo\\modules'&lt;br /&gt;
 import plugins&lt;br /&gt;
 os.chdir('C:\\Users\\YOURNAME\\Documents\\pymol')                                # Your standard working dir&lt;br /&gt;
Save under: '''C:\Users\YOURNAME\pymolrc.pym''' (Set: &amp;quot;Save as type&amp;quot; to &amp;quot;All files&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
=== For Linux users ===&lt;br /&gt;
 gedit ~/.pymolrc&lt;br /&gt;
Write&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 import sys,os&lt;br /&gt;
 sys.path.append('/home/YOU/Software/pymol/Pymol-script-repo')&lt;br /&gt;
 os.environ['PYMOL_GIT_MOD']='/home/YOU/Software/pymol/Pymol-script-repo/modules'&lt;br /&gt;
 import plugins&lt;br /&gt;
 os.chdir('/home/YOU/Software/pymol/')                              # Your standard working dir&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Save and exit&lt;br /&gt;
&lt;br /&gt;
==== Alternative ====&lt;br /&gt;
Or perhaps insert the following code instead (no need to insert USERNAME, so more generic) &amp;lt;!-- this works for me, but please edit if this is wrong --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# eventually add ~/Software/pymol/Pymol-script-repo to sys.path&lt;br /&gt;
import sys, os&lt;br /&gt;
sys.path.append(os.path.expanduser('~/Software/pymol/Pymol-script-repo'))&lt;br /&gt;
os.environ['PYMOL_GIT_MOD']=os.path.expanduser('~/Software/pymol/Pymol-script-repo')&lt;br /&gt;
 &lt;br /&gt;
# load the module&lt;br /&gt;
import plugins&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test the Scripts ==&lt;br /&gt;
Now start PyMOL, and test in PyMOL.&lt;br /&gt;
 print sys.path&lt;br /&gt;
 import colorbydisplacement&lt;br /&gt;
 help(colorbydisplacement)&lt;br /&gt;
&lt;br /&gt;
== Get latest changes to scripts ==&lt;br /&gt;
If new scripts are available or changes have been made, then:&lt;br /&gt;
=== For windows users ===&lt;br /&gt;
# Navigate to '''C:\Users\YOURNAME\Documents\Pymol-script-repo'''&lt;br /&gt;
# Right click in folder -&amp;gt; Select: Git Bash&lt;br /&gt;
# Write in terminal&lt;br /&gt;
 git pull origin master&lt;br /&gt;
&lt;br /&gt;
=== For Ubuntu/Mint users ===&lt;br /&gt;
# Navigate to '''/home/YOURNAME/Software/pymol/Pymol-script-repo'''&lt;br /&gt;
# Write in terminal.&lt;br /&gt;
 git pull origin master&lt;br /&gt;
&lt;br /&gt;
= Do you want to contribute with a script? =&lt;br /&gt;
Information how to contribute scripts to the repository. It's easy! &amp;lt;br&amp;gt;&lt;br /&gt;
http://www.pymolwiki.org/index.php/git_authors&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=12488</id>
		<title>Linux Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Linux_Install&amp;diff=12488"/>
		<updated>2012-01-27T09:40:39Z</updated>

		<summary type="html">&lt;p&gt;Folf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how to install open-source PyMOL on Linux.&lt;br /&gt;
&lt;br /&gt;
== Install distribution specific binary package ==&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:&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;
sudo apt-get install pymol&lt;br /&gt;
&lt;br /&gt;
# Fedora&lt;br /&gt;
su -c 'yum install pymol'&lt;br /&gt;
&lt;br /&gt;
# Gentoo&lt;br /&gt;
su -c 'emerge -av pymol'&lt;br /&gt;
&lt;br /&gt;
# openSUSE (12.1 and later)&lt;br /&gt;
sudo zypper install 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;
su -c 'yum --enablerepo=epel install 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;
=== 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;
* [http://subversion.apache.org/ Subversion] to download the source code&lt;br /&gt;
* [http://www.python.org/ Python] (with distutils)&lt;br /&gt;
* [http://pmw.sf.net Pmw] (Python Megawidgets)&lt;br /&gt;
* OpenGL driver (I use [http://www.nvidia.com/object/unix.html NVidia])&lt;br /&gt;
* libpng&lt;br /&gt;
* freetype&lt;br /&gt;
&lt;br /&gt;
On many Linux systems, one of the following commands installs all requirements:&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;
sudo apt-get install subversion build-essential python-dev python-pmw \&lt;br /&gt;
  libglew-dev freeglut3-dev libpng-dev libfreetype6-dev&lt;br /&gt;
&lt;br /&gt;
# Fedora/CentOS&lt;br /&gt;
su -c 'yum install subversion python-devel freeglut-devel freetype-devel tkinter python-pmw'&lt;br /&gt;
&lt;br /&gt;
# Gentoo&lt;br /&gt;
sudo -c 'emerge -av dev-vcs/subversion dev-lang/python dev-python/pmw media-libs/glew \&lt;br /&gt;
  media-libs/freeglut media-libs/libpng media-libs/freetype'&lt;br /&gt;
&lt;br /&gt;
# openSUSE&lt;br /&gt;
sudo zypper install python-devel freeglut-devel gcc-c++ glew-devel libpng-devel python-pmw subversion&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Get latest source from SVN ===&lt;br /&gt;
&lt;br /&gt;
This will download the latest source to '''/tmp/pymol''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /tmp&lt;br /&gt;
svn co https://pymol.svn.sourceforge.net/svnroot/pymol/trunk/pymol pymol&lt;br /&gt;
cd pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Compile and install ===&lt;br /&gt;
&lt;br /&gt;
This will install PyMOL as normal user into '''/opt/pymol-svn'''. If you don't have write permissions to '''/opt''', change the &amp;lt;code&amp;gt;prefix&amp;lt;/code&amp;gt; variable to something like '''$HOME/pymol-svn'''.&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=/opt/pymol-svn&lt;br /&gt;
modules=$prefix/modules&lt;br /&gt;
&lt;br /&gt;
python setup.py build install \&lt;br /&gt;
    --home=$prefix \&lt;br /&gt;
    --install-purelib=$modules \&lt;br /&gt;
    --install-platlib=$modules&lt;br /&gt;
&lt;br /&gt;
export PYTHONPATH=$modules:$PYTHONPATH&lt;br /&gt;
python setup2.py install&lt;br /&gt;
install pymol $prefix/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now launch PyMOL like this (you may copy this launcher into your '''$PATH''',&lt;br /&gt;
like to '''/usr/local/bin'''):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/opt/pymol-svn/pymol&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
* On Linux Mint 11 there have been reports of gcc-4.5 breaking Pymol. You could use gcc-4.4 instead. (reported by [[User:Tlinnet]])&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install build-essential gcc-4.4 g++-4.4&lt;br /&gt;
export CC=/usr/bin/gcc-4.4&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you get an error message &amp;quot;ImportError: No module named Pmw&amp;quot; and lack half of the user interface, then run the additional command &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python setup2.py install pmw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
to install a copy of the Python MegaWidgets.&lt;br /&gt;
&lt;br /&gt;
* If you're using Ubuntu 11.10 with an Intel Sandy Bridge video card and get graphics oddities. Please see [https://launchpad.net/~glasen/+archive/intel-driver Intel Driver Post for Ubuntu].&lt;br /&gt;
&lt;br /&gt;
== Ubuntu/Mint 12 compile and install with MPEG support ==&lt;br /&gt;
First install dependencies.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install subversion git&lt;br /&gt;
sudo apt-get install python-imaging python-pygame apbs&lt;br /&gt;
sudo apt-get install build-essential python-dev python-pmw libglew-dev freeglut3-dev libpng-dev libfreetype6-dev&lt;br /&gt;
bash installpymol.sh&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Red Hat Enterprise Linux RHEL 6 compile and install with MPEG support for x86_64 bit ==&lt;br /&gt;
Install the EPEL repository: The .rpm will be download from here &amp;lt;br&amp;gt; &lt;br /&gt;
http://fedoraproject.org/wiki/EPEL &amp;lt;br&amp;gt;&lt;br /&gt;
And the CentOS repository for additional .rpm are located here &amp;lt;br&amp;gt; &lt;br /&gt;
http://mirror.centos.org/centos/6/os/x86_64/Packages/ &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bash&lt;br /&gt;
cd &amp;amp;&amp;amp; wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm&lt;br /&gt;
sudo rpm -i epel-release-6-5.noarch.rpm&lt;br /&gt;
rm epel-release-6-5.noarch.rpm&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Then add Centos repository&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo gedit /etc/yum.repos.d/centos.repo&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Write these lines.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
[centos]&lt;br /&gt;
name=Centos for RHEL/ CentOS $releasever - $basearch&lt;br /&gt;
baseurl=http://mirror.centos.org/centos/6/os/x86_64&lt;br /&gt;
enabled=1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Then check configuration. Do NOT UPGRADE PACKAGES from CentOS. It will replace RHEL packages. &amp;lt;br&amp;gt; &lt;br /&gt;
If you do upgrade packages, you will now see Centos login and such, but not much is problematic.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo yum repolist all&lt;br /&gt;
sudo yum install subversion git&lt;br /&gt;
sudo yum install python-imaging pygame apbs&lt;br /&gt;
sudo yum install gcc-c++ python-devel python-pmw glew-devel freeglut-devel libpng-devel freetype-devel&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Then disable centos repository. Set '''enabled=0'''&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo gedit /etc/yum.repos.d/centos.repo&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
Now install pymol&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bash installpymol.sh&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Make sure, that you will have '''~/bin''' as part of your path&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
gedit ~/.cshrc&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Make sure this lines is in the file. Only if you use tcsh shell.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
setenv PATH ${PATH}:{$HOME}/bin&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install script ===&lt;br /&gt;
Make a text file &amp;quot;installpymol.sh&amp;quot; and make it executable&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
chmod u+x installpymol.sh&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Put this in the file, modify the first line&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -e&lt;br /&gt;
pymoldir=$HOME/Software/pymol&lt;br /&gt;
modules=$pymoldir/modules&lt;br /&gt;
svnpymol=svnpymol&lt;br /&gt;
svnfreemol=svnfreemol&lt;br /&gt;
pymolplugins=pymolplugins&lt;br /&gt;
pymolscriptrepo=Pymol-script-repo &lt;br /&gt;
 &lt;br /&gt;
###################################################&lt;br /&gt;
[ -d $HOME/Software ] || mkdir $HOME/Software&lt;br /&gt;
[ -d $pymoldir ] || mkdir $pymoldir&lt;br /&gt;
[ -d $HOME/bin ] || mkdir $HOME/bin&lt;br /&gt;
[ -d $HOME/pymol ] || mkdir $HOME/pymol&lt;br /&gt;
&lt;br /&gt;
# Checkout svn&lt;br /&gt;
svn co https://pymol.svn.sourceforge.net/svnroot/pymol/trunk/pymol $pymoldir/$svnpymol&lt;br /&gt;
 &lt;br /&gt;
# Build and install pymol&lt;br /&gt;
cd $pymoldir/$svnpymol&lt;br /&gt;
python setup.py build install --home=$pymoldir --install-purelib=$modules --install-platlib=$modules&lt;br /&gt;
export PYTHONPATH=$modules:$PYTHONPATH&lt;br /&gt;
python setup2.py install&lt;br /&gt;
install pymol $pymoldir/&lt;br /&gt;
&lt;br /&gt;
########## Setup freemol - for MPEG support ############&lt;br /&gt;
svn co svn://bioinformatics.org/svnroot/freemol/trunk $pymoldir/$svnfreemol&lt;br /&gt;
 &lt;br /&gt;
cd $pymoldir/$svnfreemol/src/mpeg_encode&lt;br /&gt;
export FREEMOL=$pymoldir/$svnfreemol/freemol&lt;br /&gt;
./configure&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
 &lt;br /&gt;
## Make a shortcut to set env for freemol and then execute pymol&lt;br /&gt;
echo '#!/bin/bash' &amp;gt;&amp;gt; $pymoldir/pymolMPEG.sh&lt;br /&gt;
echo &amp;quot;export FREEMOL=$pymoldir/$svnfreemol/freemol&amp;quot; &amp;gt;&amp;gt; $pymoldir/pymolMPEG.sh&lt;br /&gt;
tail -n +2 $pymoldir/pymol &amp;gt;&amp;gt; $pymoldir/pymolMPEG.sh&lt;br /&gt;
chmod u+x $pymoldir/pymolMPEG.sh &lt;br /&gt;
 &lt;br /&gt;
## Make a link, so we execute pymol with the freemol env exported&lt;br /&gt;
ln -s $pymoldir/pymolMPEG.sh $HOME/bin/pymol&lt;br /&gt;
&lt;br /&gt;
########## Install PluginArchitecture ############&lt;br /&gt;
git clone https://github.com/speleo3/pymolplugins.git $pymoldir/$pymolplugins&lt;br /&gt;
t=&amp;quot;'&amp;quot;&lt;br /&gt;
echo &amp;quot;import sys&amp;quot; &amp;gt;&amp;gt; $pymoldir/.pymolrc.py&lt;br /&gt;
echo &amp;quot;sys.path.append($t$pymoldir$t)&amp;quot; &amp;gt;&amp;gt; $pymoldir/.pymolrc.py&lt;br /&gt;
echo &amp;quot;import $pymolplugins&amp;quot; &amp;gt;&amp;gt; $pymoldir/.pymolrc.py&lt;br /&gt;
&lt;br /&gt;
########## Install Pymol-script-repo ############&lt;br /&gt;
git clone git://github.com/Pymol-Scripts/Pymol-script-repo.git $pymoldir/$pymolscriptrepo&lt;br /&gt;
echo &amp;quot;import sys,os&amp;quot; &amp;gt;&amp;gt; $pymoldir/.pymolrc&lt;br /&gt;
echo &amp;quot;sys.path.append($t$pymoldir/$pymolscriptrepo$t)&amp;quot; &amp;gt;&amp;gt; $pymoldir/.pymolrc&lt;br /&gt;
echo &amp;quot;os.environ['PYMOL_GIT_MOD']=$t$pymoldir/$pymolscriptrepo/modules$t&amp;quot; &amp;gt;&amp;gt; $pymoldir/.pymolrc&lt;br /&gt;
echo &amp;quot;import plugins&amp;quot; &amp;gt;&amp;gt; $pymoldir/.pymolrc&lt;br /&gt;
echo &amp;quot;os.chdir($t$HOME/pymol$t)&amp;quot; &amp;gt;&amp;gt; $pymoldir/.pymolrc&lt;br /&gt;
&lt;br /&gt;
########## Make links ############&lt;br /&gt;
ln -s $pymoldir/.pymolrc.py $HOME/.pymolrc.py&lt;br /&gt;
ln -s $pymoldir/.pymolrc $HOME/.pymolrc&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Update script ===&lt;br /&gt;
To pull and update PyMOL, one can make this script&lt;br /&gt;
&lt;br /&gt;
Make a text file &amp;quot;updatepymol.sh&amp;quot; and make it executable&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
chmod u+x updatepymol.sh&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Put this in the file, modify the first line&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash -e&lt;br /&gt;
pymoldir=$HOME/Software/pymol&lt;br /&gt;
modules=$pymoldir/modules&lt;br /&gt;
svnpymol=svnpymol&lt;br /&gt;
svnfreemol=svnfreemol&lt;br /&gt;
pymolplugins=pymolplugins&lt;br /&gt;
pymolscriptrepo=Pymol-script-repo &lt;br /&gt;
&lt;br /&gt;
svn up $pymoldir/$svnpymol&lt;br /&gt;
svn up $pymoldir/$svnfreemol&lt;br /&gt;
cd $pymoldir/$pymolplugins&lt;br /&gt;
git pull&lt;br /&gt;
cd $pymoldir/$pymolscriptrepo&lt;br /&gt;
git pull&lt;br /&gt;
&lt;br /&gt;
cd $pymoldir/$svnpymol&lt;br /&gt;
python setup.py build install --home=$pymoldir --install-purelib=$modules --install-platlib=$modules&lt;br /&gt;
export PYTHONPATH=$modules:$PYTHONPATH&lt;br /&gt;
python setup2.py install&lt;br /&gt;
install pymol $pymoldir/&lt;br /&gt;
 &lt;br /&gt;
########## Setup freemol - for MPEG support ############&lt;br /&gt;
cd $pymoldir/$svnfreemol/src/mpeg_encode&lt;br /&gt;
export FREEMOL=$pymoldir/$svnfreemol/freemol&lt;br /&gt;
./configure&lt;br /&gt;
make&lt;br /&gt;
make install&lt;br /&gt;
&lt;br /&gt;
## Make a shortcut to set env for freemol and then execute pymol&lt;br /&gt;
rm $pymoldir/pymolMPEG.sh&lt;br /&gt;
echo '#!/bin/bash' &amp;gt;&amp;gt; $pymoldir/pymolMPEG.sh&lt;br /&gt;
echo &amp;quot;export FREEMOL=$pymoldir/$svnfreemol/freemol&amp;quot; &amp;gt;&amp;gt; $pymoldir/pymolMPEG.sh&lt;br /&gt;
tail -n +2 $pymoldir/pymol &amp;gt;&amp;gt; $pymoldir/pymolMPEG.sh&lt;br /&gt;
chmod u+x $pymoldir/pymolMPEG.sh &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Change MPEG settings ===&lt;br /&gt;
Change settings in&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$HOME/Software/pymol/svnfreemol/freemol/libpy/freemol/mpeg_encode.py&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
For example, change in line 205:&amp;lt;br&amp;gt; &lt;br /&gt;
FRAME_RATE 24&amp;lt;br&amp;gt;&lt;br /&gt;
(Note, only legal values is allowed: 23.976, 24, 25, 29.97, 30, 50 ,59.94, 60)&lt;br /&gt;
&lt;br /&gt;
Then restart PyMOL. &lt;br /&gt;
&lt;br /&gt;
[[Category:Installation|Linux Installation]]&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Movie.produce&amp;diff=7882</id>
		<title>Movie.produce</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Movie.produce&amp;diff=7882"/>
		<updated>2011-06-23T08:25:07Z</updated>

		<summary type="html">&lt;p&gt;Folf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''movie.produce ''' can be used to generate a movie file (mpg) after using the movie commands, see [[Movie_school]]&lt;br /&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;
movie.produce filename [, mode [, first [, last [, preserve [, encoder [, quality [, quiet ]]]]]]]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ARGUMENTS===&lt;br /&gt;
'''filename'''&lt;br /&gt;
::output file&lt;br /&gt;
'''mode'''&lt;br /&gt;
::    normal {default}&lt;br /&gt;
::    draw&lt;br /&gt;
::    ray&lt;br /&gt;
'''first'''&lt;br /&gt;
::    start frame {default: first frame}&lt;br /&gt;
'''last'''&lt;br /&gt;
::    end frame {default: last frame}&lt;br /&gt;
'''preserve'''&lt;br /&gt;
::    = 0: cleanup frames from temp directory {default}&lt;br /&gt;
::    = 1: leave temp directory &amp;amp; frames &lt;br /&gt;
'''encoder'''&lt;br /&gt;
::     which encode to use {default freemol's mpeg_encode}&lt;br /&gt;
'''quality'''&lt;br /&gt;
::    integer 0..100: for visual quality of final movie; corresponds to movie_quality setting&lt;br /&gt;
'''quiet'''&lt;br /&gt;
::    verbosity&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# generate myfile.mpg&lt;br /&gt;
movie.produce myfile.mpg&lt;br /&gt;
&lt;br /&gt;
# generate movie myfile.mpg ray'ing frames 20-100 while preserving the ppm images of each frame in the myfile.tmp directory&lt;br /&gt;
movie.produce myfile.mpg, ray, 20, 100, 1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
* [[Movie_school]]&lt;br /&gt;
* [[Movie_from_scenes]]&lt;br /&gt;
* http://freemol.org&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Movies]]&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Rotate&amp;diff=9589</id>
		<title>Rotate</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Rotate&amp;diff=9589"/>
		<updated>2011-03-29T11:39:00Z</updated>

		<summary type="html">&lt;p&gt;Folf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''rotate''' can be used to rotate the atomic coordinates of a molecular object.  Behavior differs depending on whether or not the '''object''' parameter is specified.&lt;br /&gt;
 &lt;br /&gt;
If object is '''None''', then rotate rotates the atomic coordinates according to the axes and angle for the selection and state provided.  &lt;br /&gt;
&lt;br /&gt;
If object is set to an object name, then selection and state are ignored and instead of translating the atomic coordinates, the [[Object_Matrix|object matrix]] is modified. This option is intended for use in animations.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;camera&amp;quot; option controls whether the camera or the model's axes are used to interpret the translation vector.  To move the object relative to the camera set '''camera=1''' (which is default), or to move the molecule relative to the model's geometry, set '''camera=0'''.&lt;br /&gt;
&lt;br /&gt;
If this doesn't do what you want, consider [[Turn]].&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rotate axis, angle [,selection [,state [,camera [,object [,origin]]]]]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===ARGUMENTS===&lt;br /&gt;
'''axis'''&lt;br /&gt;
::x, y, z, or float vector: axis about which to rotate&lt;br /&gt;
&lt;br /&gt;
'''angle'''&lt;br /&gt;
::float: degrees of rotation&lt;br /&gt;
&lt;br /&gt;
'''selection'''&lt;br /&gt;
::    string: atoms whose coordinates should be modified {default: all}&lt;br /&gt;
'''state'''&lt;br /&gt;
::    &amp;gt; 0: only the indicated state is modified&lt;br /&gt;
::    = 0: all states are modified&lt;br /&gt;
::    = -1: only the current state is modified {default}&lt;br /&gt;
'''camera'''&lt;br /&gt;
::     = 0 or 1: is the axis specific in camera coordinates? {default: 1}&lt;br /&gt;
'''object'''&lt;br /&gt;
::    string: object name (only if changing object matrix) {default: None}&lt;br /&gt;
'''origin'''&lt;br /&gt;
::    float vector: origin of rotation {default: None}&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.rotate(list-or-string axis, angle=0, string selection = &amp;quot;all&amp;quot;, int state = 0,&lt;br /&gt;
           int camera = 1, string object = None)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
 rotate x, 45, pept&lt;br /&gt;
 rotate [1,1,1], 10, chain A&lt;br /&gt;
&lt;br /&gt;
=====Electrostatic Map Caveat=====&lt;br /&gt;
If you have an electrostatic map and it's not rotating with the molecule as you expect it to, see the [[Cmd turn|Turn]] command.  [[Cmd turn|Turn]] moves the camera and thus the protein and map will be changed.&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[Object_Matrix|object matrix]] [[Translate]] [[Turn]] [[Model_Space_and_Camera_Space]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Rotate]]&lt;br /&gt;
[[Category:States|Rotate]]&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=ColorByDisplacement&amp;diff=7551</id>
		<title>ColorByDisplacement</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=ColorByDisplacement&amp;diff=7551"/>
		<updated>2011-01-13T12:17:18Z</updated>

		<summary type="html">&lt;p&gt;Folf: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Acknowledgement ==&lt;br /&gt;
This script is based on the scaffold from [[ColorByRMSD]]. Peace love and harmomy goes to Shivender Shandilya and Jason Vertrees.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
This script allows you to color two structures by distance displacement between an Open and Closed form of a protein, as calculated by PyMol's internal distance command. The pairwise distance is calculated between, C-alpha or all-atoms. The distance displacement values are stored as B-factors of these residues, which are colored by a ''rainbow'' color spectrum, with blue specifying minimum  and red indicating maximum.&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
Do keep in mind, all original B-factors values are overwritten!&lt;br /&gt;
&lt;br /&gt;
There exist two versions. &amp;lt;br&amp;gt;&lt;br /&gt;
ColorByDisplacement'''CA''' is quick and is between CA atoms. Ideal for helices representation. &amp;lt;br&amp;gt;&lt;br /&gt;
ColorByDisplacement'''All''' is between All atoms in residues and is quite slow =&amp;gt; 3-5 mins for a run. Ideal for sticks representation.&lt;br /&gt;
&lt;br /&gt;
'''You have to specify which residues should be used in the alignment procedure, or it will take all residues as standard'''&lt;br /&gt;
&lt;br /&gt;
V.2 is implemented the 2011.01.06 - Due to a bug in coloring.&lt;br /&gt;
&lt;br /&gt;
== Bug in code ==&lt;br /&gt;
A bug in the boolean operator of the spectrum command has been found. This versions work for version 1.3 Educational product. &amp;lt;br&amp;gt;&lt;br /&gt;
For other versions of pymol, try to change (comment/uncomment) the '''cmd.spectrum''' line.&lt;br /&gt;
The other spectrum line works for Open-Source PyMOL 1.2r3pre, Incentive product&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
ColorByDisplacementCA O5NT, C5NT, super1=resi 26-355, super2=resi 26-355, doColor=t, doAlign=t&lt;br /&gt;
ColorByDisplacementAll O5NT, C5NT, super1=resi 26-355, super2=resi 26-355, doColor=t, doAlign=t&lt;br /&gt;
&lt;br /&gt;
ColorByDisplacementCA O5NT, C5NT, super1=resi 26-355, super2=resi 26-355, doColor=t, doAlign=t, AlignedWhite='no'&lt;br /&gt;
ColorByDisplacementAll O5NT, C5NT, super1=resi 26-355, super2=resi 26-355, doColor=t, doAlign=t, AlignedWhite='no'&lt;br /&gt;
&lt;br /&gt;
ColorByDisplacementCA O5NT, C5NT, resi 26-355, resi 26-355&lt;br /&gt;
ColorByDisplacementAll O5NT, C5NT, resi 26-355, resi 26-355&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery heights=&amp;quot;240px&amp;quot; widths=&amp;quot;340px&amp;quot;&amp;gt;&lt;br /&gt;
Image:ColorByDisplacement-CA-1.png|ColorByDisplacementCA used on 1HP1 and 1HPU aligned and colored by distance displacement.&lt;br /&gt;
Image:ColorByDisplacement-CA-2.png|ColorByDisplacementCA used on 1HP1 and 1HPU aligned and colored by distance displacement.&lt;br /&gt;
Image:ColorByDisplacement-All-1.png|ColorByDisplacementAll used on 1HP1 and 1HPU aligned and colored by distance displacement.&lt;br /&gt;
Image:ColorByDisplacement-All-2.png|ColorByDisplacementAll used on 1HP1 and 1HPU aligned and colored by distance displacement.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
Dark blue is low displacement, higher displacements are in orange/yellow/red. &amp;lt;br&amp;gt;&lt;br /&gt;
Residues used for alignment is colored white. Can be turned off in top of algorithm.&lt;br /&gt;
Residues not in both pdb files is colored black&lt;br /&gt;
&lt;br /&gt;
== Example Pymol Script ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cd C:\Users\tlinnet\Documents\My Dropbox\Speciale\5NT-project\Mutant-construct\Distance-Plot&lt;br /&gt;
#cd /homes/linnet/Documents/Speciale/5NT-project/Mutant-construct/Distance-Plot&lt;br /&gt;
### load pdb files and rename&lt;br /&gt;
load 1HP1.pdb, O5NT-1HP1&lt;br /&gt;
load 1HPU.pdb, C5NT-1HPU&lt;br /&gt;
&lt;br /&gt;
hide everything&lt;br /&gt;
### Select asymmetric units from pdb file&lt;br /&gt;
create O5NT, /O5NT-1HP1//A&lt;br /&gt;
create C5NT, /C5NT-1HPU//C&lt;br /&gt;
delete O5NT-1HP1&lt;br /&gt;
delete C5NT-1HPU&lt;br /&gt;
&lt;br /&gt;
cartoon auto&lt;br /&gt;
show cartoon, O5NT&lt;br /&gt;
show cartoon, C5NT&lt;br /&gt;
set cartoon_fancy_helices=1&lt;br /&gt;
set bg,[1,1,1]&lt;br /&gt;
&lt;br /&gt;
set auto_zoom, off&lt;br /&gt;
&lt;br /&gt;
### Make sharper&lt;br /&gt;
set fog=0&lt;br /&gt;
&lt;br /&gt;
### Load my function, and run function with input&lt;br /&gt;
run ColorByDisplacement.py&lt;br /&gt;
ColorByDisplacementCA O5NT, C5NT, super1=resi 26-355, super2=resi 26-355, doColor=t, doAlign=t&lt;br /&gt;
#ColorByDisplacementAll O5NT, C5NT, super1=resi 26-355, super2=resi 26-355, doColor=t, doAlign=t&lt;br /&gt;
&lt;br /&gt;
set_view (\&lt;br /&gt;
     0.094686687,   -0.390707940,    0.915631354,\&lt;br /&gt;
     0.809000611,   -0.505792081,   -0.299485058,\&lt;br /&gt;
     0.580131471,    0.769104064,    0.268191338,\&lt;br /&gt;
     0.000000000,    0.000000000, -280.940521240,\&lt;br /&gt;
    26.240486145,   46.146961212,   21.702068329,\&lt;br /&gt;
   231.830673218,  330.050415039,  -20.000000000 )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Python Code ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import pymol&lt;br /&gt;
import cmd&lt;br /&gt;
from pymol import stored&lt;br /&gt;
&lt;br /&gt;
### Thanks for inspiration from:&lt;br /&gt;
&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
--- ColorByRMSD: RMSD based coloring ---&lt;br /&gt;
Authors : Shivender Shandilya; Jason Vertrees&lt;br /&gt;
Program : ColorByRMSD&lt;br /&gt;
Date    : July 2009&lt;br /&gt;
http://www.pymolwiki.org/index.php/ColorByRMSD&lt;br /&gt;
&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
### Author Troels Linnet - troels.linnet att bbz.uni-leipzig.de&lt;br /&gt;
&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
--- ColorByDisplacementCA: Displacement based coloring ---&lt;br /&gt;
Authors : Troels E. Linnet&lt;br /&gt;
Program : ColorByDisplacementCA&lt;br /&gt;
Date    : January 2011&lt;br /&gt;
email: troels.linnet att bbz.uni-leipzig.de&lt;br /&gt;
&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    ColorByDisplacementCA --&lt;br /&gt;
	Show the distance displacement deviation in color to more easily see variable regions.&lt;br /&gt;
&lt;br /&gt;
    PARAMS&lt;br /&gt;
&lt;br /&gt;
        objSel1 (valid PyMOL object or selection)&lt;br /&gt;
            The first object&lt;br /&gt;
&lt;br /&gt;
        objSel2 (valid PyMOL object or selection)&lt;br /&gt;
            The second object&lt;br /&gt;
&lt;br /&gt;
        doColor (boolean, either True or False)&lt;br /&gt;
            If doColor=True then a simple representation is created to&lt;br /&gt;
            highlight the differences.  If False, then no changes are made.&lt;br /&gt;
            DEFAULT: False&lt;br /&gt;
&lt;br /&gt;
    RETURNS&lt;br /&gt;
        None.&lt;br /&gt;
&lt;br /&gt;
    SIDE-EFFECTS&lt;br /&gt;
        Modifies the B-factor columns in your original structures.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
def strTrue(p):&lt;br /&gt;
    return p[0].upper() == &amp;quot;T&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# The main function that assigns current displacement distance as the new B-factor&lt;br /&gt;
def displacementUpdateB(objA, alnAri, objB, alnBri):&lt;br /&gt;
    ### If residue is unassigned in one of the pdb files, we reset its value&lt;br /&gt;
    for x in range(len(alnAri)):&lt;br /&gt;
        s1 = objA + &amp;quot; and name CA and resi &amp;quot; + alnAri[x]&lt;br /&gt;
 	cmd.alter( s1, &amp;quot;b = &amp;quot; + str(-0.01))&lt;br /&gt;
    for x in range(len(alnBri)):&lt;br /&gt;
	s2 = objB + &amp;quot; and name CA and resi &amp;quot; + alnBri[x]&lt;br /&gt;
        cmd.alter( s2, &amp;quot;b = &amp;quot; + str(-0.01))&lt;br /&gt;
    cmd.sort(objA); cmd.sort(objB)&lt;br /&gt;
    for x in range(len(alnAri)):&lt;br /&gt;
        s1 = objA + &amp;quot; and name CA and resi &amp;quot; + alnAri[x]&lt;br /&gt;
	s2 = objB + &amp;quot; and name CA and resi &amp;quot; + alnAri[x]&lt;br /&gt;
	### Names starting with __ (underscores) are normally hidden by PyMOL&lt;br /&gt;
	tempObject = &amp;quot;__tempObject&amp;quot;&lt;br /&gt;
	Displacement = cmd.distance(tempObject, s1, s2)&lt;br /&gt;
 	cmd.alter( s1, &amp;quot;b = &amp;quot; + str(Displacement))&lt;br /&gt;
        cmd.alter( s2, &amp;quot;b = &amp;quot; + str(Displacement))&lt;br /&gt;
	cmd.delete(tempObject)&lt;br /&gt;
    cmd.sort(objA); cmd.sort(objB)&lt;br /&gt;
&lt;br /&gt;
def ColorByDisplacementCA(objSel1, objSel2, super1='all', super2='all', doColor=&amp;quot;True&amp;quot;, doAlign=&amp;quot;True&amp;quot;, AlignedWhite='yes'):&lt;br /&gt;
    ### First create backup copies; names starting with __ (underscores) are normally hidden by PyMOL&lt;br /&gt;
    tObj1, tObj2, aln = &amp;quot;__tempObj1&amp;quot;, &amp;quot;__tempObj2&amp;quot;, &amp;quot;__aln&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    if strTrue(doAlign):&lt;br /&gt;
        ### Create temp objects&lt;br /&gt;
        cmd.create( tObj1, objSel1 )&lt;br /&gt;
        cmd.create( tObj2, objSel2 )&lt;br /&gt;
	### Align and make create an object aln which indicates which atoms were paired between the two structures&lt;br /&gt;
	### Super is must faster than align http://www.pymolwiki.org/index.php/Super&lt;br /&gt;
        cmd.super(tObj1 + ' and ' + str(super1), tObj2 + ' and ' + str(super2), object=aln)&lt;br /&gt;
	### Modify the original matrix of object1 from the alignment&lt;br /&gt;
        cmd.matrix_copy(tObj1, objSel1)&lt;br /&gt;
    else:&lt;br /&gt;
        ### Create temp objects&lt;br /&gt;
        cmd.create( tObj1, objSel1 )&lt;br /&gt;
        cmd.create( tObj2, objSel2 )&lt;br /&gt;
	### Align and make create an object aln which indicates which atoms were paired between the two structures&lt;br /&gt;
	### Super is must faster than align http://www.pymolwiki.org/index.php/Super&lt;br /&gt;
        cmd.super(tObj1 + ' and ' + str(super1), tObj2 + ' and ' + str(super2), object=aln)&lt;br /&gt;
&lt;br /&gt;
    ### Modify the B-factor columns of the original objects,&lt;br /&gt;
    ### in order to identify the residues NOT used for alignment, later on&lt;br /&gt;
    cmd.alter( objSel1 + &amp;quot; or &amp;quot; + objSel2, &amp;quot;b=-0.2&amp;quot;)&lt;br /&gt;
    cmd.alter( tObj1 + &amp;quot; or &amp;quot; + tObj2, &amp;quot;chain='A'&amp;quot;)&lt;br /&gt;
    cmd.alter( tObj1 + &amp;quot; or &amp;quot; + tObj2, &amp;quot;segi='A'&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    ### Update pymol internal representations; one of these should do the trick&lt;br /&gt;
    cmd.refresh(); cmd.rebuild(); cmd.sort(tObj1); cmd.sort(tObj2)&lt;br /&gt;
&lt;br /&gt;
    ###  Create lists for storage&lt;br /&gt;
    stored.alnAres, stored.alnBres = [], []&lt;br /&gt;
&lt;br /&gt;
    ### Iterate over objects&lt;br /&gt;
    if AlignedWhite=='yes':&lt;br /&gt;
        cmd.iterate(tObj1 + &amp;quot; and n. CA and not &amp;quot; + aln, &amp;quot;stored.alnAres.append(resi)&amp;quot;)&lt;br /&gt;
	cmd.iterate(tObj2 + &amp;quot; and n. CA and not &amp;quot; + aln, &amp;quot;stored.alnBres.append(resi)&amp;quot;)&lt;br /&gt;
    else:&lt;br /&gt;
	cmd.iterate(tObj1 + &amp;quot; and n. CA&amp;quot;, &amp;quot;stored.alnAres.append(resi)&amp;quot;)&lt;br /&gt;
        cmd.iterate(tObj2 + &amp;quot; and n. CA&amp;quot;, &amp;quot;stored.alnBres.append(resi)&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    ### Change the B-factors for EACH object&lt;br /&gt;
    displacementUpdateB(tObj1,stored.alnAres,tObj2,stored.alnBres)&lt;br /&gt;
&lt;br /&gt;
    ### Store the NEW B-factors&lt;br /&gt;
    stored.alnAnb, stored.alnBnb = [], []&lt;br /&gt;
    ### Iterate over objects and get b&lt;br /&gt;
    if AlignedWhite=='yes':&lt;br /&gt;
	### Iterate over objects which is not aligned&lt;br /&gt;
    	cmd.iterate(tObj1 + &amp;quot; and n. CA and not &amp;quot; + aln, &amp;quot;stored.alnAnb.append(b)&amp;quot; )&lt;br /&gt;
	cmd.iterate(tObj2 + &amp;quot; and n. CA and not &amp;quot; + aln, &amp;quot;stored.alnBnb.append(b)&amp;quot; )&lt;br /&gt;
    else:&lt;br /&gt;
	### Or Iterate over all objects with CA&lt;br /&gt;
    	cmd.iterate(tObj1 + &amp;quot; and n. CA&amp;quot;, &amp;quot;stored.alnAnb.append(b)&amp;quot; )&lt;br /&gt;
    	cmd.iterate(tObj2 + &amp;quot; and n. CA&amp;quot;, &amp;quot;stored.alnBnb.append(b)&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
    ### Get rid of all intermediate objects and clean up&lt;br /&gt;
    cmd.delete(tObj1)&lt;br /&gt;
    cmd.delete(tObj2)&lt;br /&gt;
    cmd.delete(aln)&lt;br /&gt;
&lt;br /&gt;
    ### Assign the just stored NEW B-factors to the original objects&lt;br /&gt;
    for x in range(len(stored.alnAres)):&lt;br /&gt;
        cmd.alter(objSel1 + &amp;quot; and n. CA and i. &amp;quot; + str(stored.alnAres[x]), &amp;quot;b = &amp;quot; + str(stored.alnAnb[x]))&lt;br /&gt;
    for x in range(len(stored.alnBres)):&lt;br /&gt;
        cmd.alter(objSel2 + &amp;quot; and n. CA and i. &amp;quot; + str(stored.alnBres[x]), &amp;quot;b = &amp;quot; + str(stored.alnBnb[x]))&lt;br /&gt;
    cmd.rebuild(); cmd.refresh(); cmd.sort(objSel1); cmd.sort(objSel2)&lt;br /&gt;
&lt;br /&gt;
    ### Provide some useful information&lt;br /&gt;
    stored.allRMSDval = []&lt;br /&gt;
    stored.allRMSDval = stored.alnAnb + stored.alnBnb&lt;br /&gt;
    print &amp;quot;\nColorByDisplacementCA completed successfully.&amp;quot;&lt;br /&gt;
    print &amp;quot;The MAXIMUM Displacement is: &amp;quot;+str(max(stored.allRMSDval)) +&amp;quot; residue &amp;quot;+str(stored.alnAres[int(stored.allRMSDval.index(max(stored.allRMSDval)))])&lt;br /&gt;
&lt;br /&gt;
    if strTrue(doColor):&lt;br /&gt;
        ### Showcase what we did&lt;br /&gt;
        #cmd.orient()&lt;br /&gt;
        #cmd.hide(&amp;quot;all&amp;quot;)&lt;br /&gt;
        cmd.show(&amp;quot;cartoon&amp;quot;, objSel1 + &amp;quot; or &amp;quot; + objSel2)&lt;br /&gt;
        ### Select the residues not used for alignment; they still have their B-factors as &amp;quot;-0.2&amp;quot;&lt;br /&gt;
        cmd.select(&amp;quot;notUsedForAln&amp;quot;, &amp;quot;b = -0.2&amp;quot;)&lt;br /&gt;
        ### White-wash the residues not used for alignment&lt;br /&gt;
        cmd.color(&amp;quot;white&amp;quot;, &amp;quot;notUsedForAln&amp;quot;)&lt;br /&gt;
        ### Select the residues not in both pdb files; they have their B-factors as &amp;quot;-0. 01&amp;quot;&lt;br /&gt;
        cmd.select(&amp;quot;ResNotInBothPDB&amp;quot;, &amp;quot;b = -0.01&amp;quot;)&lt;br /&gt;
        ### White-wash the residues not used for alignment&lt;br /&gt;
        cmd.color(&amp;quot;black&amp;quot;, &amp;quot;ResNotInBothPDB&amp;quot;)&lt;br /&gt;
        ### Color the residues used for alignment according to their B-factors (Displacment values)&lt;br /&gt;
#        cmd.spectrum(&amp;quot;b&amp;quot;, 'rainbow',  &amp;quot;((&amp;quot; + objSel1 + &amp;quot; and n. CA) or (n. CA and &amp;quot; + objSel2 +&amp;quot; )) and not notUsedForAln+ResNotInBothPDB&amp;quot;)&lt;br /&gt;
        cmd.spectrum(&amp;quot;b&amp;quot;, 'rainbow',  &amp;quot;((&amp;quot; + objSel1 + &amp;quot; and n. CA) or (n. CA and &amp;quot; + objSel2 +&amp;quot; )) and not (notUsedForAln or ResNotInBothPDB)&amp;quot;)&lt;br /&gt;
        ### Delete the selection of atoms not used for alignment&lt;br /&gt;
        ### If you would like to keep this selection intact,&lt;br /&gt;
        ### just comment &amp;quot;cmd.delete&amp;quot; line and&lt;br /&gt;
        ### uncomment the &amp;quot;cmd.disable&amp;quot; line abowe.&lt;br /&gt;
        cmd.disable(&amp;quot;notUsedForAln&amp;quot;)&lt;br /&gt;
        cmd.delete(&amp;quot;notUsedForAln&amp;quot;)&lt;br /&gt;
        cmd.disable(&amp;quot;ResNotInBothPDB&amp;quot;)&lt;br /&gt;
        cmd.delete(&amp;quot;ResNotInBothPDB&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
        print &amp;quot;\nObjects are now colored by C-alpha displacement deviation.&amp;quot;&lt;br /&gt;
        print &amp;quot;Blue is minimum and red is maximum...&amp;quot;&lt;br /&gt;
        print &amp;quot;White is those residues used in the alignment algorithm. Can be turned off in top of algorithm.&amp;quot;&lt;br /&gt;
	print &amp;quot;Black is residues that does not exist in both files...&amp;quot;&lt;br /&gt;
cmd.extend(&amp;quot;ColorByDisplacementCA&amp;quot;, ColorByDisplacementCA)&lt;br /&gt;
&lt;br /&gt;
def displacementUpdateBAll(objA, alnAri, objB, alnBri):&lt;br /&gt;
    print &amp;quot;This will take a while to go through the for loops. Give me around 3-5 minutes...&amp;quot;&lt;br /&gt;
    ### If residue is unassigned in one of the pdb files, we reset its value&lt;br /&gt;
    for x in range(len(alnAri)):&lt;br /&gt;
        s1 = objA + &amp;quot; and resi &amp;quot; + alnAri[x][0] + &amp;quot; and name &amp;quot; + str(alnAri[x][1])&lt;br /&gt;
 	cmd.alter( s1, &amp;quot;b = &amp;quot; + str(-0.01))&lt;br /&gt;
    for x in range(len(alnBri)):&lt;br /&gt;
	s2 = objB + &amp;quot; and resi &amp;quot; + alnBri[x][0] + &amp;quot; and name &amp;quot; + alnBri[x][1]&lt;br /&gt;
        cmd.alter( s2, &amp;quot;b = &amp;quot; + str(-0.01))&lt;br /&gt;
    cmd.sort(objA); cmd.sort(objB)&lt;br /&gt;
    for x in range(len(alnAri)):&lt;br /&gt;
        s1 = objA + &amp;quot; and resi &amp;quot; + alnAri[x][0] + &amp;quot; and name &amp;quot; + alnAri[x][1]&lt;br /&gt;
	s2 = objB + &amp;quot; and resi &amp;quot; + alnAri[x][0] + &amp;quot; and name &amp;quot; + alnAri[x][1]&lt;br /&gt;
	### Names starting with __ (underscores) are normally hidden by PyMOL&lt;br /&gt;
	tempObject = &amp;quot;__tempObject&amp;quot;&lt;br /&gt;
	Displacement = cmd.distance(tempObject, s1, s2)&lt;br /&gt;
 	cmd.alter( s1, &amp;quot;b = &amp;quot; + str(Displacement))&lt;br /&gt;
        cmd.alter( s2, &amp;quot;b = &amp;quot; + str(Displacement))&lt;br /&gt;
	cmd.delete(tempObject)&lt;br /&gt;
    cmd.sort(objA); cmd.sort(objB)&lt;br /&gt;
&lt;br /&gt;
def ColorByDisplacementAll(objSel1, objSel2, super1='all', super2='all', doColor=&amp;quot;True&amp;quot;, doAlign=&amp;quot;True&amp;quot;, AlignedWhite='yes'):&lt;br /&gt;
    ### First create backup copies; names starting with __ (underscores) are normally hidden by PyMOL&lt;br /&gt;
    tObj1, tObj2, aln = &amp;quot;__tempObj1&amp;quot;, &amp;quot;__tempObj2&amp;quot;, &amp;quot;__aln&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    if strTrue(doAlign):&lt;br /&gt;
        ### Create temp objects&lt;br /&gt;
        cmd.create( tObj1, objSel1 )&lt;br /&gt;
        cmd.create( tObj2, objSel2 )&lt;br /&gt;
	### Align and make create an object aln which indicates which atoms were paired between the two structures&lt;br /&gt;
	### Super is must faster than align http://www.pymolwiki.org/index.php/Super&lt;br /&gt;
        cmd.super(tObj1 + ' and ' + str(super1), tObj2 + ' and ' + str(super2), object=aln)&lt;br /&gt;
	### Modify the original matrix of object1 from the alignment&lt;br /&gt;
        cmd.matrix_copy(tObj1, objSel1)&lt;br /&gt;
    else:&lt;br /&gt;
        ### Create temp objects&lt;br /&gt;
        cmd.create( tObj1, objSel1 )&lt;br /&gt;
        cmd.create( tObj2, objSel2 )&lt;br /&gt;
	### Align and make create an object aln which indicates which atoms were paired between the two structures&lt;br /&gt;
	### Super is must faster than align http://www.pymolwiki.org/index.php/Super&lt;br /&gt;
        cmd.super(tObj1 + ' and ' + str(super1), tObj2 + ' and ' + str(super2), object=aln)&lt;br /&gt;
&lt;br /&gt;
    ### Modify the B-factor columns of the original objects,&lt;br /&gt;
    ### in order to identify the residues NOT used for alignment, later on&lt;br /&gt;
    cmd.alter( objSel1 + &amp;quot; or &amp;quot; + objSel2, &amp;quot;b=-0.2&amp;quot;)&lt;br /&gt;
    cmd.alter( tObj1 + &amp;quot; or &amp;quot; + tObj2, &amp;quot;chain='A'&amp;quot;)&lt;br /&gt;
    cmd.alter( tObj1 + &amp;quot; or &amp;quot; + tObj2, &amp;quot;segi='A'&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    ### Update pymol internal representations; one of these should do the trick&lt;br /&gt;
    cmd.refresh(); cmd.rebuild(); cmd.sort(tObj1); cmd.sort(tObj2)&lt;br /&gt;
&lt;br /&gt;
    ###  Create lists for storage&lt;br /&gt;
    stored.alnAres, stored.alnBres = [], []&lt;br /&gt;
&lt;br /&gt;
    ### Iterate over objects and get resi&lt;br /&gt;
    if AlignedWhite=='yes':&lt;br /&gt;
        cmd.iterate(tObj1 + &amp;quot; and not &amp;quot; + aln, &amp;quot;stored.alnAres.append((resi, name))&amp;quot;)&lt;br /&gt;
        cmd.iterate(tObj2 + &amp;quot; and not &amp;quot; + aln, &amp;quot;stored.alnBres.append((resi, name))&amp;quot;)&lt;br /&gt;
    else:&lt;br /&gt;
        cmd.iterate(tObj1, &amp;quot;stored.alnAres.append((resi, name))&amp;quot;)&lt;br /&gt;
        cmd.iterate(tObj2, &amp;quot;stored.alnBres.append((resi, name))&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    ### Change the B-factors for EACH object&lt;br /&gt;
    displacementUpdateBAll(tObj1,stored.alnAres,tObj2,stored.alnBres)&lt;br /&gt;
&lt;br /&gt;
    ### Store the NEW B-factors&lt;br /&gt;
    stored.alnAnb, stored.alnBnb = [], []&lt;br /&gt;
    ### Iterate over objects and get b&lt;br /&gt;
&lt;br /&gt;
    if AlignedWhite=='yes':&lt;br /&gt;
        ### Iterate over objects which is not aligned&lt;br /&gt;
        cmd.iterate(tObj1 + &amp;quot; and not &amp;quot; + aln, &amp;quot;stored.alnAnb.append(b)&amp;quot; )&lt;br /&gt;
        cmd.iterate(tObj2 + &amp;quot; and not &amp;quot; + aln, &amp;quot;stored.alnBnb.append(b)&amp;quot; )&lt;br /&gt;
    else:&lt;br /&gt;
	### Or Iterate over all objects with CA&lt;br /&gt;
        cmd.iterate(tObj1, &amp;quot;stored.alnAnb.append(b)&amp;quot; )&lt;br /&gt;
        cmd.iterate(tObj2, &amp;quot;stored.alnBnb.append(b)&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
    ### Get rid of all intermediate objects and clean up&lt;br /&gt;
    cmd.delete(tObj1)&lt;br /&gt;
    cmd.delete(tObj2)&lt;br /&gt;
    cmd.delete(aln)&lt;br /&gt;
&lt;br /&gt;
    ### Assign the just stored NEW B-factors to the original objects&lt;br /&gt;
    print &amp;quot;Sooon ready. 1 more minute&amp;quot;&lt;br /&gt;
    for x in range(len(stored.alnAres)):&lt;br /&gt;
        cmd.alter(objSel1 + &amp;quot; and resi &amp;quot; + str(stored.alnAres[x][0]) + &amp;quot; and name &amp;quot; + str(stored.alnAres[x][1]), &amp;quot;b = &amp;quot; + str(stored.alnAnb[x]))&lt;br /&gt;
    for x in range(len(stored.alnBres)):&lt;br /&gt;
        cmd.alter(objSel2 + &amp;quot; and resi &amp;quot; + str(stored.alnBres[x][0]) + &amp;quot; and name &amp;quot; + str(stored.alnBres[x][1]), &amp;quot;b = &amp;quot; + str(stored.alnBnb[x]))&lt;br /&gt;
    cmd.rebuild(); cmd.refresh(); cmd.sort(objSel1); cmd.sort(objSel2)&lt;br /&gt;
&lt;br /&gt;
    ### Provide some useful information&lt;br /&gt;
    stored.allRMSDval = []&lt;br /&gt;
    stored.allRMSDval = stored.alnAnb + stored.alnBnb&lt;br /&gt;
    print &amp;quot;\nColorByDisplacementAll completed successfully.&amp;quot;&lt;br /&gt;
    print &amp;quot;The MAXIMUM Displacement is: &amp;quot;+str(max(stored.allRMSDval)) +&amp;quot; residue &amp;quot;+str(stored.alnAres[int(stored.allRMSDval.index(max(stored.allRMSDval)))])&lt;br /&gt;
&lt;br /&gt;
    if strTrue(doColor):&lt;br /&gt;
        ### Showcase what we did&lt;br /&gt;
        #cmd.orient()&lt;br /&gt;
        #cmd.hide(&amp;quot;all&amp;quot;)&lt;br /&gt;
        cmd.show(&amp;quot;sticks&amp;quot;, objSel1 + &amp;quot; or &amp;quot; + objSel2)&lt;br /&gt;
        ### Select the residues not used for alignment; they still have their B-factors as &amp;quot;-0.2&amp;quot;&lt;br /&gt;
        cmd.select(&amp;quot;notUsedForAln&amp;quot;, &amp;quot;b = -0.2&amp;quot;)&lt;br /&gt;
        ### White-wash the residues not used for alignment&lt;br /&gt;
        cmd.color(&amp;quot;white&amp;quot;, &amp;quot;notUsedForAln&amp;quot;)&lt;br /&gt;
        ### Select the residues not in both pdb files; they have their B-factors as &amp;quot;-0.01&amp;quot;&lt;br /&gt;
        cmd.select(&amp;quot;ResNotInBothPDB&amp;quot;, &amp;quot;b = -0.01&amp;quot;)&lt;br /&gt;
        ### White-wash the residues not used for alignment&lt;br /&gt;
        cmd.color(&amp;quot;black&amp;quot;, &amp;quot;ResNotInBothPDB&amp;quot;)&lt;br /&gt;
        ### Color the residues used for alignment according to their B-factors (Displacement values)&lt;br /&gt;
#        cmd.spectrum(&amp;quot;b&amp;quot;, 'rainbow',  &amp;quot;((&amp;quot; + objSel1 + &amp;quot;) or (&amp;quot; + objSel2 +&amp;quot; )) and not notUsedForAln+ResNotInBothPDB&amp;quot;)&lt;br /&gt;
        cmd.spectrum(&amp;quot;b&amp;quot;, 'rainbow',  &amp;quot;((&amp;quot; + objSel1 + &amp;quot;) or (&amp;quot; + objSel2 +&amp;quot; )) and not (notUsedForAln or ResNotInBothPDB)&amp;quot;)&lt;br /&gt;
        ### Delete the selection of atoms not used for alignment&lt;br /&gt;
        ### If you would like to keep this selection intact,&lt;br /&gt;
        ### just comment &amp;quot;cmd.delete&amp;quot; line and&lt;br /&gt;
        ### uncomment the &amp;quot;cmd.disable&amp;quot; line abowe.&lt;br /&gt;
        cmd.disable(&amp;quot;notUsedForAln&amp;quot;)&lt;br /&gt;
        cmd.delete(&amp;quot;notUsedForAln&amp;quot;)&lt;br /&gt;
        cmd.disable(&amp;quot;ResNotInBothPDB&amp;quot;)&lt;br /&gt;
        cmd.delete(&amp;quot;ResNotInBothPDB&amp;quot;)&lt;br /&gt;
        print &amp;quot;\nObjects are now colored by C-alpha displacement deviation.&amp;quot;&lt;br /&gt;
        print &amp;quot;Blue is minimum and red is maximum...&amp;quot;&lt;br /&gt;
        print &amp;quot;White is those residues used in the alignment algorithm. Can be turned off in top of algorithm.&amp;quot;&lt;br /&gt;
	print &amp;quot;Black is residues that does not exist in both files...&amp;quot;&lt;br /&gt;
cmd.extend(&amp;quot;ColorByDisplacementAll&amp;quot;, ColorByDisplacementAll)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Structural_Biology_Scripts]]&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=MakeVinaCommand&amp;diff=8078</id>
		<title>MakeVinaCommand</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=MakeVinaCommand&amp;diff=8078"/>
		<updated>2010-08-24T12:58:26Z</updated>

		<summary type="html">&lt;p&gt;Folf: /* The Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
[http://vina.scripps.edu/ Vina] is a new, very fast, molecular docking program, written by Oleg Trott.  In order to run Vina, you should have [http://mgltools.scripps.edu/downloads MGLTools1.5.4] installed (you need prepare_receptor4.py and prepare_ligand4.py).  But, you don't need MGLTools for this script to run.&lt;br /&gt;
&lt;br /&gt;
To run Vina it needs to know the center of the protein and also its extents (size in XYZ directions).  We can easily do this with PyMOL.&lt;br /&gt;
&lt;br /&gt;
Requirements:&lt;br /&gt;
* [[COM]] -- simple script to get the center of mass of a selection&lt;br /&gt;
&lt;br /&gt;
Todo:&lt;br /&gt;
* Commandline options&lt;br /&gt;
* Robustness to vagaries of input&lt;br /&gt;
* Usage &amp;amp; Help&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
pymol -cq ./makeVinaCommandFromProtein.py proteinFile ligandFile&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For high-throughput screening, where we compare each ligand to each protein, I typically wrap the script in a for-loop like:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# foreach protein in my proteins directory&lt;br /&gt;
for protein in proteinsDir/*; do&lt;br /&gt;
&lt;br /&gt;
  # foreach ligand in my ligands directory&lt;br /&gt;
  for ligand in ligandsDir/*; do;&lt;br /&gt;
&lt;br /&gt;
    # make a Vina command to run the protein vs the ligand.&lt;br /&gt;
    # note the backticks to run the output&lt;br /&gt;
    `pymol -cq ./makeVinaCommandFromProtein.py $protein $ligand | grep vina`;&lt;br /&gt;
&lt;br /&gt;
  done;&lt;br /&gt;
done;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= The Code =&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: utf-8 -*-&lt;br /&gt;
#&lt;br /&gt;
# makeVinaCommandFromProtein.py -- automatically make a valid Vina command from a PDB file and a ligand (name)&lt;br /&gt;
#&lt;br /&gt;
# Author: Jason Vertrees&lt;br /&gt;
# Date  : 2/2009&lt;br /&gt;
#&lt;br /&gt;
from pymol import cmd&lt;br /&gt;
from sys import argv&lt;br /&gt;
from os import path&lt;br /&gt;
&lt;br /&gt;
# try to keep PyMOL quiet&lt;br /&gt;
cmd.feedback(&amp;quot;disable&amp;quot;,&amp;quot;all&amp;quot;,&amp;quot;actions&amp;quot;)&lt;br /&gt;
cmd.feedback(&amp;quot;disable&amp;quot;,&amp;quot;all&amp;quot;,&amp;quot;results&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# prepare some output names&lt;br /&gt;
protName= path.basename(argv[-2])&lt;br /&gt;
ligName = path.basename(argv[-1])&lt;br /&gt;
outName = protName.split(&amp;quot;.&amp;quot;)[0] + &amp;quot;.&amp;quot; + ligName.split(&amp;quot;.&amp;quot;)[0] + &amp;quot;.docked.pdbqt&amp;quot;&lt;br /&gt;
logName = protName.split(&amp;quot;.&amp;quot;)[0] + &amp;quot;.&amp;quot; + ligName.split(&amp;quot;.&amp;quot;)[0] + &amp;quot;.log&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# very unsafe commandline checking; needs updating&lt;br /&gt;
cmd.load(argv[-2], protName)&lt;br /&gt;
cmd.load(argv[-1], ligName)&lt;br /&gt;
&lt;br /&gt;
# remove the ligand before calculating the center of mass&lt;br /&gt;
cmd.delete(ligName)&lt;br /&gt;
&lt;br /&gt;
# load center of mass script&lt;br /&gt;
cmd.do(&amp;quot;run /home/path/to/COM.py&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# calculate the center of mass and extents&lt;br /&gt;
(comX, comY, comZ) = COM(protName)&lt;br /&gt;
((maxX, maxY, maxZ), (minX, minY, minZ)) = cmd.get_extent(protName)&lt;br /&gt;
&lt;br /&gt;
# print the command line&lt;br /&gt;
print &amp;quot;vina --receptor &amp;quot;+protName&amp;quot;qt --ligand &amp;quot;+ligName+&amp;quot;qt --center_x &amp;quot;, str(comX), &amp;quot; --center_y &amp;quot;, str(comY),\&lt;br /&gt;
&amp;quot; --center_z &amp;quot;, str(comZ), &amp;quot; --size_x &amp;quot;, str(abs(maxX-minX)), &amp;quot; --size_y &amp;quot;, str(abs(maxY-minY)), &amp;quot; --size_z &amp;quot;, \&lt;br /&gt;
str(abs(maxZ-minZ)), &amp;quot; --all &amp;quot;, outName , &amp;quot; --exhaustiveness 200 --log &amp;quot;, logName, &amp;quot; \n&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Example =&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# execute the script&lt;br /&gt;
&amp;gt; pymol -cq ./makeVinaCommandFromProtein.py 1ia6_gh09.pdb glucose.pdb | grep vina&lt;br /&gt;
&lt;br /&gt;
# the output&lt;br /&gt;
vina --receptor  1ia6_gh09.pdbqt  --ligand  glucose_dimer.pdbqt --center_x  1.86797851457  --center_y  17.7951449088  --center_z  65.2250072289  --size_x  55.9499988556  --size_y  49.7459993362  --size_z  58.1769981384  --all  1ia6_gh09.glucose_dimer.docked.pdbqt  --exhaustiveness 100 --log  1ia6_gh09.glucose_dimer.log&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
* [[COM]] -- you need this script&lt;br /&gt;
* [http://vina.scripps.edu/ Vina] -- the docking software&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|MakeVinaCommandFromProtein]]&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Surface&amp;diff=5657</id>
		<title>Surface</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Surface&amp;diff=5657"/>
		<updated>2010-06-10T12:19:41Z</updated>

		<summary type="html">&lt;p&gt;Folf: /* Representation-independent Color Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The surface representation of a protein, in PyMol, shows the [http://en.wikipedia.org/wiki/Connolly_surface &amp;quot;Connolly&amp;quot; surface] or the surface that would be traced out by the '''surfaces''' of waters in contact with the protein at all possible positions. [[Image:Surface_ex.png|thumb|Surface Representation Example|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enabling==&lt;br /&gt;
To enable the surface representation do&lt;br /&gt;
 show surface, SEL&lt;br /&gt;
for any proper selection SEL.&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
*[[surface_best]]                 &lt;br /&gt;
*[[surface_negative_color]]     &lt;br /&gt;
*[[surface_carve_cutoff]]         &lt;br /&gt;
*[[surface_negative_visible]]   &lt;br /&gt;
*[[surface_carve_normal_cutoff]]  &lt;br /&gt;
*[[surface_normal]]             &lt;br /&gt;
*[[surface_carve_selection]]      &lt;br /&gt;
*[[surface_optimize_subsets]]   &lt;br /&gt;
*[[surface_carve_state]]          &lt;br /&gt;
*[[surface_poor]]               &lt;br /&gt;
*[[surface_circumscribe]]         &lt;br /&gt;
*[[surface_proximity]]          &lt;br /&gt;
*[[surface_clear_cutoff]]         &lt;br /&gt;
*[[surface_quality]]            &lt;br /&gt;
*[[surface_clear_selection]]      &lt;br /&gt;
*[[surface_ramp_above_mode]]    &lt;br /&gt;
*[[surface_clear_state]]          &lt;br /&gt;
*[[surface_solvent]]            &lt;br /&gt;
*[[surface_color]]                &lt;br /&gt;
*[[surface_trim_cutoff]]        &lt;br /&gt;
*[[surface_debug]]                &lt;br /&gt;
*[[surface_trim_factor]]        &lt;br /&gt;
*[[surface_miserable]]            &lt;br /&gt;
*[[surface_type]]               &lt;br /&gt;
*[[surface_mode]]   &lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
====Transparency====&lt;br /&gt;
To adjust the transparency of surfaces try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set transparency, 0.5&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Where 1.0 will be an invisible and 0.0 a completely solid surface.&lt;br /&gt;
&lt;br /&gt;
====Quality====&lt;br /&gt;
To smooth your surface representation try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set surface_quality, 1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or higher if you wish, though it will take longer and might look odd.&lt;br /&gt;
&lt;br /&gt;
====Probe Radius====&lt;br /&gt;
To change the probe radius other than default 1.4 Å, you need to change the solvent radius, say, 1.6 Å:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set solvent_radius, 1.6&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface does not change correspondingly, use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tips==&lt;br /&gt;
&lt;br /&gt;
=== Exporting Surface/Mesh Coordinates to File===&lt;br /&gt;
&lt;br /&gt;
PyMOL can export its coordinates as WRL wireframe model files for VRML input.&lt;br /&gt;
&lt;br /&gt;
====Older PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to povray&lt;br /&gt;
open(&amp;quot;surface.inc&amp;quot;,&amp;quot;w&amp;quot;).write(cmd.get_povray()[1])&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Newer PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .wrl file&lt;br /&gt;
save myscene.wrl&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .obj file&lt;br /&gt;
save myscene.obj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Representation-independent Color Control===&lt;br /&gt;
To color the surface representation a different color than the underlying cartoon or ligand representations, simply duplicate the object, show only the surface in the duplicate, and show only the cartoon and/or ligands in the original object.&lt;br /&gt;
&lt;br /&gt;
Or use the [[surface_color]] setting that is available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Representation independent color control.jpg|thumb|Representation-independent Color Control Example|left]]&lt;br /&gt;
&lt;br /&gt;
===Displaying a protein as surface with a ligand as sticks===&lt;br /&gt;
An easy way to do this is to create separate objects for each type of display. &lt;br /&gt;
&lt;br /&gt;
1 Load your protein&lt;br /&gt;
&lt;br /&gt;
2 Select the ligand &lt;br /&gt;
&lt;br /&gt;
3 Create a separate object for the ligand &lt;br /&gt;
&lt;br /&gt;
4 Remove ligand atoms from the protein&lt;br /&gt;
&lt;br /&gt;
5 Display both objects separately&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
load prot.ent,protein&lt;br /&gt;
select ligand,resn FAD&lt;br /&gt;
create lig_sticks,ligand&lt;br /&gt;
remove ligand&lt;br /&gt;
show sticks,lig_sticks&lt;br /&gt;
show surface,protein&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Even easier is to:&lt;br /&gt;
&lt;br /&gt;
1 Load the protein&lt;br /&gt;
&lt;br /&gt;
2 S (Show) &amp;gt; organic &amp;gt; stick&lt;br /&gt;
&lt;br /&gt;
3 S (Show) &amp;gt; surface&lt;br /&gt;
&lt;br /&gt;
===Calculating a partial surface===&lt;br /&gt;
There is, until now, an undocumented way to calculate a surface for only a part of an object without creating a new one:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
flag ignore, not A/49-63/, set&lt;br /&gt;
delete indicate&lt;br /&gt;
show surface&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface was already computed, then you'll also need to issue the command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[Get_Area]] for more information on surface area calculations.&lt;br /&gt;
&lt;br /&gt;
===Displaying surface inside a molecule===&lt;br /&gt;
As far as I can tell, setting ambient to zero alone doesn't quite do the job, since some triangles still get lit by the light source. The best combination I can find is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set ambient=0&lt;br /&gt;
set direct=0.7&lt;br /&gt;
set reflect=0.0&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Which gives no shadows and only a few artifacts.&lt;br /&gt;
&lt;br /&gt;
As an alternative, you might just consider showing the inside of the surface directly...that will create less visual artifacts, and so long as ambient and direct are sufficiently low, it will look reasonable in &amp;quot;ray&amp;quot;.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
util.ray_shadows(&amp;quot;heavy&amp;quot;)&lt;br /&gt;
set two_sided_lighting=1&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Creating a Closed Surface===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Surface_open.png|Example OPEN Surface&lt;br /&gt;
Image:Surface_closed.png|Example CLOSED Surface&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create what I'll call a '''closed surface''' (see images), you need to first make your atom selections, then create a new object for that selection then show the surface for that object.  Here's an example.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 sel A, id 1-100&lt;br /&gt;
 create B, A&lt;br /&gt;
 show surface, B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Huge Surfaces ===&lt;br /&gt;
If your protein or complex is too large to render ([[ray]] runs out of RAM, for example) then check out the [[Huge_surfaces|tip for huge surfaces]].&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
To optimize performance and responsiveness, PyMOL tends to defer compute-intensive tasks until their results are actually needed.  Thus, &lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.show(&amp;quot;surface&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
doesn't actually show a surface, it only sets the surface visibility flag on the atoms present (for future reference).  An actual surface won't be computed until PyMOL is asked to refresh or render the display.  When running a script, you can force an update by calling:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.refresh()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
after cmd.show.&lt;br /&gt;
&lt;br /&gt;
[[Category:Representations|Surface]]&lt;br /&gt;
[[Category:VRML]]&lt;br /&gt;
[[Category:Surfaces]]&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Surface&amp;diff=5656</id>
		<title>Surface</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Surface&amp;diff=5656"/>
		<updated>2010-06-10T12:19:20Z</updated>

		<summary type="html">&lt;p&gt;Folf: /* Representation-independent Color Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The surface representation of a protein, in PyMol, shows the [http://en.wikipedia.org/wiki/Connolly_surface &amp;quot;Connolly&amp;quot; surface] or the surface that would be traced out by the '''surfaces''' of waters in contact with the protein at all possible positions. [[Image:Surface_ex.png|thumb|Surface Representation Example|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enabling==&lt;br /&gt;
To enable the surface representation do&lt;br /&gt;
 show surface, SEL&lt;br /&gt;
for any proper selection SEL.&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
*[[surface_best]]                 &lt;br /&gt;
*[[surface_negative_color]]     &lt;br /&gt;
*[[surface_carve_cutoff]]         &lt;br /&gt;
*[[surface_negative_visible]]   &lt;br /&gt;
*[[surface_carve_normal_cutoff]]  &lt;br /&gt;
*[[surface_normal]]             &lt;br /&gt;
*[[surface_carve_selection]]      &lt;br /&gt;
*[[surface_optimize_subsets]]   &lt;br /&gt;
*[[surface_carve_state]]          &lt;br /&gt;
*[[surface_poor]]               &lt;br /&gt;
*[[surface_circumscribe]]         &lt;br /&gt;
*[[surface_proximity]]          &lt;br /&gt;
*[[surface_clear_cutoff]]         &lt;br /&gt;
*[[surface_quality]]            &lt;br /&gt;
*[[surface_clear_selection]]      &lt;br /&gt;
*[[surface_ramp_above_mode]]    &lt;br /&gt;
*[[surface_clear_state]]          &lt;br /&gt;
*[[surface_solvent]]            &lt;br /&gt;
*[[surface_color]]                &lt;br /&gt;
*[[surface_trim_cutoff]]        &lt;br /&gt;
*[[surface_debug]]                &lt;br /&gt;
*[[surface_trim_factor]]        &lt;br /&gt;
*[[surface_miserable]]            &lt;br /&gt;
*[[surface_type]]               &lt;br /&gt;
*[[surface_mode]]   &lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
====Transparency====&lt;br /&gt;
To adjust the transparency of surfaces try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set transparency, 0.5&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Where 1.0 will be an invisible and 0.0 a completely solid surface.&lt;br /&gt;
&lt;br /&gt;
====Quality====&lt;br /&gt;
To smooth your surface representation try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set surface_quality, 1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or higher if you wish, though it will take longer and might look odd.&lt;br /&gt;
&lt;br /&gt;
====Probe Radius====&lt;br /&gt;
To change the probe radius other than default 1.4 Å, you need to change the solvent radius, say, 1.6 Å:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set solvent_radius, 1.6&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface does not change correspondingly, use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tips==&lt;br /&gt;
&lt;br /&gt;
=== Exporting Surface/Mesh Coordinates to File===&lt;br /&gt;
&lt;br /&gt;
PyMOL can export its coordinates as WRL wireframe model files for VRML input.&lt;br /&gt;
&lt;br /&gt;
====Older PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to povray&lt;br /&gt;
open(&amp;quot;surface.inc&amp;quot;,&amp;quot;w&amp;quot;).write(cmd.get_povray()[1])&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Newer PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .wrl file&lt;br /&gt;
save myscene.wrl&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .obj file&lt;br /&gt;
save myscene.obj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Representation-independent Color Control===&lt;br /&gt;
To color the surface representation a different color than the underlying cartoon or ligand representations, simply duplicate the object, show only the surface in the duplicate, and show only the cartoon and/or ligands in the original object.&lt;br /&gt;
&lt;br /&gt;
Or use the [[surface_color]] setting that is available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Representation independent color control.jpg|thumb|Representation-independent Color Control Example|left]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Displaying a protein as surface with a ligand as sticks===&lt;br /&gt;
An easy way to do this is to create separate objects for each type of display. &lt;br /&gt;
&lt;br /&gt;
1 Load your protein&lt;br /&gt;
&lt;br /&gt;
2 Select the ligand &lt;br /&gt;
&lt;br /&gt;
3 Create a separate object for the ligand &lt;br /&gt;
&lt;br /&gt;
4 Remove ligand atoms from the protein&lt;br /&gt;
&lt;br /&gt;
5 Display both objects separately&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
load prot.ent,protein&lt;br /&gt;
select ligand,resn FAD&lt;br /&gt;
create lig_sticks,ligand&lt;br /&gt;
remove ligand&lt;br /&gt;
show sticks,lig_sticks&lt;br /&gt;
show surface,protein&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Even easier is to:&lt;br /&gt;
&lt;br /&gt;
1 Load the protein&lt;br /&gt;
&lt;br /&gt;
2 S (Show) &amp;gt; organic &amp;gt; stick&lt;br /&gt;
&lt;br /&gt;
3 S (Show) &amp;gt; surface&lt;br /&gt;
&lt;br /&gt;
===Calculating a partial surface===&lt;br /&gt;
There is, until now, an undocumented way to calculate a surface for only a part of an object without creating a new one:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
flag ignore, not A/49-63/, set&lt;br /&gt;
delete indicate&lt;br /&gt;
show surface&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface was already computed, then you'll also need to issue the command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[Get_Area]] for more information on surface area calculations.&lt;br /&gt;
&lt;br /&gt;
===Displaying surface inside a molecule===&lt;br /&gt;
As far as I can tell, setting ambient to zero alone doesn't quite do the job, since some triangles still get lit by the light source. The best combination I can find is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set ambient=0&lt;br /&gt;
set direct=0.7&lt;br /&gt;
set reflect=0.0&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Which gives no shadows and only a few artifacts.&lt;br /&gt;
&lt;br /&gt;
As an alternative, you might just consider showing the inside of the surface directly...that will create less visual artifacts, and so long as ambient and direct are sufficiently low, it will look reasonable in &amp;quot;ray&amp;quot;.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
util.ray_shadows(&amp;quot;heavy&amp;quot;)&lt;br /&gt;
set two_sided_lighting=1&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Creating a Closed Surface===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Surface_open.png|Example OPEN Surface&lt;br /&gt;
Image:Surface_closed.png|Example CLOSED Surface&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create what I'll call a '''closed surface''' (see images), you need to first make your atom selections, then create a new object for that selection then show the surface for that object.  Here's an example.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 sel A, id 1-100&lt;br /&gt;
 create B, A&lt;br /&gt;
 show surface, B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Huge Surfaces ===&lt;br /&gt;
If your protein or complex is too large to render ([[ray]] runs out of RAM, for example) then check out the [[Huge_surfaces|tip for huge surfaces]].&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
To optimize performance and responsiveness, PyMOL tends to defer compute-intensive tasks until their results are actually needed.  Thus, &lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.show(&amp;quot;surface&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
doesn't actually show a surface, it only sets the surface visibility flag on the atoms present (for future reference).  An actual surface won't be computed until PyMOL is asked to refresh or render the display.  When running a script, you can force an update by calling:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.refresh()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
after cmd.show.&lt;br /&gt;
&lt;br /&gt;
[[Category:Representations|Surface]]&lt;br /&gt;
[[Category:VRML]]&lt;br /&gt;
[[Category:Surfaces]]&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Surface&amp;diff=5655</id>
		<title>Surface</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Surface&amp;diff=5655"/>
		<updated>2010-06-10T12:18:38Z</updated>

		<summary type="html">&lt;p&gt;Folf: /* Displaying a protein as surface with a ligand as sticks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The surface representation of a protein, in PyMol, shows the [http://en.wikipedia.org/wiki/Connolly_surface &amp;quot;Connolly&amp;quot; surface] or the surface that would be traced out by the '''surfaces''' of waters in contact with the protein at all possible positions. [[Image:Surface_ex.png|thumb|Surface Representation Example|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enabling==&lt;br /&gt;
To enable the surface representation do&lt;br /&gt;
 show surface, SEL&lt;br /&gt;
for any proper selection SEL.&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
*[[surface_best]]                 &lt;br /&gt;
*[[surface_negative_color]]     &lt;br /&gt;
*[[surface_carve_cutoff]]         &lt;br /&gt;
*[[surface_negative_visible]]   &lt;br /&gt;
*[[surface_carve_normal_cutoff]]  &lt;br /&gt;
*[[surface_normal]]             &lt;br /&gt;
*[[surface_carve_selection]]      &lt;br /&gt;
*[[surface_optimize_subsets]]   &lt;br /&gt;
*[[surface_carve_state]]          &lt;br /&gt;
*[[surface_poor]]               &lt;br /&gt;
*[[surface_circumscribe]]         &lt;br /&gt;
*[[surface_proximity]]          &lt;br /&gt;
*[[surface_clear_cutoff]]         &lt;br /&gt;
*[[surface_quality]]            &lt;br /&gt;
*[[surface_clear_selection]]      &lt;br /&gt;
*[[surface_ramp_above_mode]]    &lt;br /&gt;
*[[surface_clear_state]]          &lt;br /&gt;
*[[surface_solvent]]            &lt;br /&gt;
*[[surface_color]]                &lt;br /&gt;
*[[surface_trim_cutoff]]        &lt;br /&gt;
*[[surface_debug]]                &lt;br /&gt;
*[[surface_trim_factor]]        &lt;br /&gt;
*[[surface_miserable]]            &lt;br /&gt;
*[[surface_type]]               &lt;br /&gt;
*[[surface_mode]]   &lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
====Transparency====&lt;br /&gt;
To adjust the transparency of surfaces try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set transparency, 0.5&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Where 1.0 will be an invisible and 0.0 a completely solid surface.&lt;br /&gt;
&lt;br /&gt;
====Quality====&lt;br /&gt;
To smooth your surface representation try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set surface_quality, 1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or higher if you wish, though it will take longer and might look odd.&lt;br /&gt;
&lt;br /&gt;
====Probe Radius====&lt;br /&gt;
To change the probe radius other than default 1.4 Å, you need to change the solvent radius, say, 1.6 Å:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set solvent_radius, 1.6&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface does not change correspondingly, use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tips==&lt;br /&gt;
&lt;br /&gt;
=== Exporting Surface/Mesh Coordinates to File===&lt;br /&gt;
&lt;br /&gt;
PyMOL can export its coordinates as WRL wireframe model files for VRML input.&lt;br /&gt;
&lt;br /&gt;
====Older PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to povray&lt;br /&gt;
open(&amp;quot;surface.inc&amp;quot;,&amp;quot;w&amp;quot;).write(cmd.get_povray()[1])&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Newer PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .wrl file&lt;br /&gt;
save myscene.wrl&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .obj file&lt;br /&gt;
save myscene.obj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Representation-independent Color Control===&lt;br /&gt;
To color the surface representation a different color than the underlying cartoon or ligand representations, simply duplicate the object, show only the surface in the duplicate, and show only the cartoon and/or ligands in the original object.&lt;br /&gt;
&lt;br /&gt;
Or use the [[surface_color]] setting that is available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Representation independent color control.jpg|thumb|Representation-independent Color Control Example|left]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Displaying a protein as surface with a ligand as sticks===&lt;br /&gt;
An easy way to do this is to create separate objects for each type of display. &lt;br /&gt;
&lt;br /&gt;
1 Load your protein&lt;br /&gt;
&lt;br /&gt;
2 Select the ligand &lt;br /&gt;
&lt;br /&gt;
3 Create a separate object for the ligand &lt;br /&gt;
&lt;br /&gt;
4 Remove ligand atoms from the protein&lt;br /&gt;
&lt;br /&gt;
5 Display both objects separately&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
load prot.ent,protein&lt;br /&gt;
select ligand,resn FAD&lt;br /&gt;
create lig_sticks,ligand&lt;br /&gt;
remove ligand&lt;br /&gt;
show sticks,lig_sticks&lt;br /&gt;
show surface,protein&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Even easier is to:&lt;br /&gt;
&lt;br /&gt;
1 Load the protein&lt;br /&gt;
&lt;br /&gt;
2 S (Show) &amp;gt; organic &amp;gt; stick&lt;br /&gt;
&lt;br /&gt;
3 S (Show) &amp;gt; surface&lt;br /&gt;
&lt;br /&gt;
===Calculating a partial surface===&lt;br /&gt;
There is, until now, an undocumented way to calculate a surface for only a part of an object without creating a new one:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
flag ignore, not A/49-63/, set&lt;br /&gt;
delete indicate&lt;br /&gt;
show surface&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface was already computed, then you'll also need to issue the command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[Get_Area]] for more information on surface area calculations.&lt;br /&gt;
&lt;br /&gt;
===Displaying surface inside a molecule===&lt;br /&gt;
As far as I can tell, setting ambient to zero alone doesn't quite do the job, since some triangles still get lit by the light source. The best combination I can find is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set ambient=0&lt;br /&gt;
set direct=0.7&lt;br /&gt;
set reflect=0.0&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Which gives no shadows and only a few artifacts.&lt;br /&gt;
&lt;br /&gt;
As an alternative, you might just consider showing the inside of the surface directly...that will create less visual artifacts, and so long as ambient and direct are sufficiently low, it will look reasonable in &amp;quot;ray&amp;quot;.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
util.ray_shadows(&amp;quot;heavy&amp;quot;)&lt;br /&gt;
set two_sided_lighting=1&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Creating a Closed Surface===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Surface_open.png|Example OPEN Surface&lt;br /&gt;
Image:Surface_closed.png|Example CLOSED Surface&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create what I'll call a '''closed surface''' (see images), you need to first make your atom selections, then create a new object for that selection then show the surface for that object.  Here's an example.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 sel A, id 1-100&lt;br /&gt;
 create B, A&lt;br /&gt;
 show surface, B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Huge Surfaces ===&lt;br /&gt;
If your protein or complex is too large to render ([[ray]] runs out of RAM, for example) then check out the [[Huge_surfaces|tip for huge surfaces]].&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
To optimize performance and responsiveness, PyMOL tends to defer compute-intensive tasks until their results are actually needed.  Thus, &lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.show(&amp;quot;surface&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
doesn't actually show a surface, it only sets the surface visibility flag on the atoms present (for future reference).  An actual surface won't be computed until PyMOL is asked to refresh or render the display.  When running a script, you can force an update by calling:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.refresh()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
after cmd.show.&lt;br /&gt;
&lt;br /&gt;
[[Category:Representations|Surface]]&lt;br /&gt;
[[Category:VRML]]&lt;br /&gt;
[[Category:Surfaces]]&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Surface&amp;diff=5654</id>
		<title>Surface</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Surface&amp;diff=5654"/>
		<updated>2010-06-10T12:18:24Z</updated>

		<summary type="html">&lt;p&gt;Folf: /* Representation-independent Color Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The surface representation of a protein, in PyMol, shows the [http://en.wikipedia.org/wiki/Connolly_surface &amp;quot;Connolly&amp;quot; surface] or the surface that would be traced out by the '''surfaces''' of waters in contact with the protein at all possible positions. [[Image:Surface_ex.png|thumb|Surface Representation Example|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enabling==&lt;br /&gt;
To enable the surface representation do&lt;br /&gt;
 show surface, SEL&lt;br /&gt;
for any proper selection SEL.&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
*[[surface_best]]                 &lt;br /&gt;
*[[surface_negative_color]]     &lt;br /&gt;
*[[surface_carve_cutoff]]         &lt;br /&gt;
*[[surface_negative_visible]]   &lt;br /&gt;
*[[surface_carve_normal_cutoff]]  &lt;br /&gt;
*[[surface_normal]]             &lt;br /&gt;
*[[surface_carve_selection]]      &lt;br /&gt;
*[[surface_optimize_subsets]]   &lt;br /&gt;
*[[surface_carve_state]]          &lt;br /&gt;
*[[surface_poor]]               &lt;br /&gt;
*[[surface_circumscribe]]         &lt;br /&gt;
*[[surface_proximity]]          &lt;br /&gt;
*[[surface_clear_cutoff]]         &lt;br /&gt;
*[[surface_quality]]            &lt;br /&gt;
*[[surface_clear_selection]]      &lt;br /&gt;
*[[surface_ramp_above_mode]]    &lt;br /&gt;
*[[surface_clear_state]]          &lt;br /&gt;
*[[surface_solvent]]            &lt;br /&gt;
*[[surface_color]]                &lt;br /&gt;
*[[surface_trim_cutoff]]        &lt;br /&gt;
*[[surface_debug]]                &lt;br /&gt;
*[[surface_trim_factor]]        &lt;br /&gt;
*[[surface_miserable]]            &lt;br /&gt;
*[[surface_type]]               &lt;br /&gt;
*[[surface_mode]]   &lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
====Transparency====&lt;br /&gt;
To adjust the transparency of surfaces try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set transparency, 0.5&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Where 1.0 will be an invisible and 0.0 a completely solid surface.&lt;br /&gt;
&lt;br /&gt;
====Quality====&lt;br /&gt;
To smooth your surface representation try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set surface_quality, 1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or higher if you wish, though it will take longer and might look odd.&lt;br /&gt;
&lt;br /&gt;
====Probe Radius====&lt;br /&gt;
To change the probe radius other than default 1.4 Å, you need to change the solvent radius, say, 1.6 Å:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set solvent_radius, 1.6&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface does not change correspondingly, use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tips==&lt;br /&gt;
&lt;br /&gt;
=== Exporting Surface/Mesh Coordinates to File===&lt;br /&gt;
&lt;br /&gt;
PyMOL can export its coordinates as WRL wireframe model files for VRML input.&lt;br /&gt;
&lt;br /&gt;
====Older PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to povray&lt;br /&gt;
open(&amp;quot;surface.inc&amp;quot;,&amp;quot;w&amp;quot;).write(cmd.get_povray()[1])&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Newer PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .wrl file&lt;br /&gt;
save myscene.wrl&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .obj file&lt;br /&gt;
save myscene.obj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Representation-independent Color Control===&lt;br /&gt;
To color the surface representation a different color than the underlying cartoon or ligand representations, simply duplicate the object, show only the surface in the duplicate, and show only the cartoon and/or ligands in the original object.&lt;br /&gt;
&lt;br /&gt;
Or use the [[surface_color]] setting that is available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Representation independent color control.jpg|thumb|Representation-independent Color Control Example|left]]&lt;br /&gt;
&lt;br /&gt;
===Displaying a protein as surface with a ligand as sticks===&lt;br /&gt;
An easy way to do this is to create separate objects for each type of display. &lt;br /&gt;
&lt;br /&gt;
1 Load your protein&lt;br /&gt;
&lt;br /&gt;
2 Select the ligand &lt;br /&gt;
&lt;br /&gt;
3 Create a separate object for the ligand &lt;br /&gt;
&lt;br /&gt;
4 Remove ligand atoms from the protein&lt;br /&gt;
&lt;br /&gt;
5 Display both objects separately&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
load prot.ent,protein&lt;br /&gt;
select ligand,resn FAD&lt;br /&gt;
create lig_sticks,ligand&lt;br /&gt;
remove ligand&lt;br /&gt;
show sticks,lig_sticks&lt;br /&gt;
show surface,protein&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Even easier is to:&lt;br /&gt;
&lt;br /&gt;
1 Load the protein&lt;br /&gt;
&lt;br /&gt;
2 S (Show) &amp;gt; organic &amp;gt; stick&lt;br /&gt;
&lt;br /&gt;
3 S (Show) &amp;gt; surface&lt;br /&gt;
&lt;br /&gt;
===Calculating a partial surface===&lt;br /&gt;
There is, until now, an undocumented way to calculate a surface for only a part of an object without creating a new one:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
flag ignore, not A/49-63/, set&lt;br /&gt;
delete indicate&lt;br /&gt;
show surface&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface was already computed, then you'll also need to issue the command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[Get_Area]] for more information on surface area calculations.&lt;br /&gt;
&lt;br /&gt;
===Displaying surface inside a molecule===&lt;br /&gt;
As far as I can tell, setting ambient to zero alone doesn't quite do the job, since some triangles still get lit by the light source. The best combination I can find is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set ambient=0&lt;br /&gt;
set direct=0.7&lt;br /&gt;
set reflect=0.0&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Which gives no shadows and only a few artifacts.&lt;br /&gt;
&lt;br /&gt;
As an alternative, you might just consider showing the inside of the surface directly...that will create less visual artifacts, and so long as ambient and direct are sufficiently low, it will look reasonable in &amp;quot;ray&amp;quot;.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
util.ray_shadows(&amp;quot;heavy&amp;quot;)&lt;br /&gt;
set two_sided_lighting=1&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Creating a Closed Surface===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Surface_open.png|Example OPEN Surface&lt;br /&gt;
Image:Surface_closed.png|Example CLOSED Surface&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create what I'll call a '''closed surface''' (see images), you need to first make your atom selections, then create a new object for that selection then show the surface for that object.  Here's an example.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 sel A, id 1-100&lt;br /&gt;
 create B, A&lt;br /&gt;
 show surface, B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Huge Surfaces ===&lt;br /&gt;
If your protein or complex is too large to render ([[ray]] runs out of RAM, for example) then check out the [[Huge_surfaces|tip for huge surfaces]].&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
To optimize performance and responsiveness, PyMOL tends to defer compute-intensive tasks until their results are actually needed.  Thus, &lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.show(&amp;quot;surface&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
doesn't actually show a surface, it only sets the surface visibility flag on the atoms present (for future reference).  An actual surface won't be computed until PyMOL is asked to refresh or render the display.  When running a script, you can force an update by calling:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.refresh()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
after cmd.show.&lt;br /&gt;
&lt;br /&gt;
[[Category:Representations|Surface]]&lt;br /&gt;
[[Category:VRML]]&lt;br /&gt;
[[Category:Surfaces]]&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Surface&amp;diff=5653</id>
		<title>Surface</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Surface&amp;diff=5653"/>
		<updated>2010-06-10T12:17:41Z</updated>

		<summary type="html">&lt;p&gt;Folf: /* Representation-independent Color Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The surface representation of a protein, in PyMol, shows the [http://en.wikipedia.org/wiki/Connolly_surface &amp;quot;Connolly&amp;quot; surface] or the surface that would be traced out by the '''surfaces''' of waters in contact with the protein at all possible positions. [[Image:Surface_ex.png|thumb|Surface Representation Example|right]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Enabling==&lt;br /&gt;
To enable the surface representation do&lt;br /&gt;
 show surface, SEL&lt;br /&gt;
for any proper selection SEL.&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
*[[surface_best]]                 &lt;br /&gt;
*[[surface_negative_color]]     &lt;br /&gt;
*[[surface_carve_cutoff]]         &lt;br /&gt;
*[[surface_negative_visible]]   &lt;br /&gt;
*[[surface_carve_normal_cutoff]]  &lt;br /&gt;
*[[surface_normal]]             &lt;br /&gt;
*[[surface_carve_selection]]      &lt;br /&gt;
*[[surface_optimize_subsets]]   &lt;br /&gt;
*[[surface_carve_state]]          &lt;br /&gt;
*[[surface_poor]]               &lt;br /&gt;
*[[surface_circumscribe]]         &lt;br /&gt;
*[[surface_proximity]]          &lt;br /&gt;
*[[surface_clear_cutoff]]         &lt;br /&gt;
*[[surface_quality]]            &lt;br /&gt;
*[[surface_clear_selection]]      &lt;br /&gt;
*[[surface_ramp_above_mode]]    &lt;br /&gt;
*[[surface_clear_state]]          &lt;br /&gt;
*[[surface_solvent]]            &lt;br /&gt;
*[[surface_color]]                &lt;br /&gt;
*[[surface_trim_cutoff]]        &lt;br /&gt;
*[[surface_debug]]                &lt;br /&gt;
*[[surface_trim_factor]]        &lt;br /&gt;
*[[surface_miserable]]            &lt;br /&gt;
*[[surface_type]]               &lt;br /&gt;
*[[surface_mode]]   &lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
====Transparency====&lt;br /&gt;
To adjust the transparency of surfaces try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set transparency, 0.5&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Where 1.0 will be an invisible and 0.0 a completely solid surface.&lt;br /&gt;
&lt;br /&gt;
====Quality====&lt;br /&gt;
To smooth your surface representation try:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set surface_quality, 1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or higher if you wish, though it will take longer and might look odd.&lt;br /&gt;
&lt;br /&gt;
====Probe Radius====&lt;br /&gt;
To change the probe radius other than default 1.4 Å, you need to change the solvent radius, say, 1.6 Å:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set solvent_radius, 1.6&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface does not change correspondingly, use:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tips==&lt;br /&gt;
&lt;br /&gt;
=== Exporting Surface/Mesh Coordinates to File===&lt;br /&gt;
&lt;br /&gt;
PyMOL can export its coordinates as WRL wireframe model files for VRML input.&lt;br /&gt;
&lt;br /&gt;
====Older PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to povray&lt;br /&gt;
open(&amp;quot;surface.inc&amp;quot;,&amp;quot;w&amp;quot;).write(cmd.get_povray()[1])&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Newer PyMOL Versions====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .wrl file&lt;br /&gt;
save myscene.wrl&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# export the coordinates to .obj file&lt;br /&gt;
save myscene.obj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Representation-independent Color Control===&lt;br /&gt;
To color the surface representation a different color than the underlying cartoon or ligand representations, simply duplicate the object, show only the surface in the duplicate, and show only the cartoon and/or ligands in the original object.&lt;br /&gt;
&lt;br /&gt;
Or use the *[[surface_color]]                setting that is available.&lt;br /&gt;
&lt;br /&gt;
[[Image:Representation independent color control.jpg|thumb|Representation-independent Color Control Example|left]]&lt;br /&gt;
&lt;br /&gt;
===Displaying a protein as surface with a ligand as sticks===&lt;br /&gt;
An easy way to do this is to create separate objects for each type of display. &lt;br /&gt;
&lt;br /&gt;
1 Load your protein&lt;br /&gt;
&lt;br /&gt;
2 Select the ligand &lt;br /&gt;
&lt;br /&gt;
3 Create a separate object for the ligand &lt;br /&gt;
&lt;br /&gt;
4 Remove ligand atoms from the protein&lt;br /&gt;
&lt;br /&gt;
5 Display both objects separately&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
load prot.ent,protein&lt;br /&gt;
select ligand,resn FAD&lt;br /&gt;
create lig_sticks,ligand&lt;br /&gt;
remove ligand&lt;br /&gt;
show sticks,lig_sticks&lt;br /&gt;
show surface,protein&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Even easier is to:&lt;br /&gt;
&lt;br /&gt;
1 Load the protein&lt;br /&gt;
&lt;br /&gt;
2 S (Show) &amp;gt; organic &amp;gt; stick&lt;br /&gt;
&lt;br /&gt;
3 S (Show) &amp;gt; surface&lt;br /&gt;
&lt;br /&gt;
===Calculating a partial surface===&lt;br /&gt;
There is, until now, an undocumented way to calculate a surface for only a part of an object without creating a new one:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
flag ignore, not A/49-63/, set&lt;br /&gt;
delete indicate&lt;br /&gt;
show surface&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the surface was already computed, then you'll also need to issue the command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[Get_Area]] for more information on surface area calculations.&lt;br /&gt;
&lt;br /&gt;
===Displaying surface inside a molecule===&lt;br /&gt;
As far as I can tell, setting ambient to zero alone doesn't quite do the job, since some triangles still get lit by the light source. The best combination I can find is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set ambient=0&lt;br /&gt;
set direct=0.7&lt;br /&gt;
set reflect=0.0&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Which gives no shadows and only a few artifacts.&lt;br /&gt;
&lt;br /&gt;
As an alternative, you might just consider showing the inside of the surface directly...that will create less visual artifacts, and so long as ambient and direct are sufficiently low, it will look reasonable in &amp;quot;ray&amp;quot;.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
util.ray_shadows(&amp;quot;heavy&amp;quot;)&lt;br /&gt;
set two_sided_lighting=1&lt;br /&gt;
set backface_cull=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Creating a Closed Surface===&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Surface_open.png|Example OPEN Surface&lt;br /&gt;
Image:Surface_closed.png|Example CLOSED Surface&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create what I'll call a '''closed surface''' (see images), you need to first make your atom selections, then create a new object for that selection then show the surface for that object.  Here's an example.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 sel A, id 1-100&lt;br /&gt;
 create B, A&lt;br /&gt;
 show surface, B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Huge Surfaces ===&lt;br /&gt;
If your protein or complex is too large to render ([[ray]] runs out of RAM, for example) then check out the [[Huge_surfaces|tip for huge surfaces]].&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
To optimize performance and responsiveness, PyMOL tends to defer compute-intensive tasks until their results are actually needed.  Thus, &lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.show(&amp;quot;surface&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
doesn't actually show a surface, it only sets the surface visibility flag on the atoms present (for future reference).  An actual surface won't be computed until PyMOL is asked to refresh or render the display.  When running a script, you can force an update by calling:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.refresh()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
after cmd.show.&lt;br /&gt;
&lt;br /&gt;
[[Category:Representations|Surface]]&lt;br /&gt;
[[Category:VRML]]&lt;br /&gt;
[[Category:Surfaces]]&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=User:Inchoate&amp;diff=4870</id>
		<title>User:Inchoate</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=User:Inchoate&amp;diff=4870"/>
		<updated>2009-09-11T13:59:33Z</updated>

		<summary type="html">&lt;p&gt;Folf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;My name is Jason Vertrees and I'm an independent consultant working with DeLano Scientific to promote PyMOL.  My previous work was in theoretical biophysics and machine learning to predict properties of proteins.&lt;br /&gt;
&lt;br /&gt;
Also, I am the owner of the PyMOLWiki website.  I started it to help the PyMOL community store and organize information regarding PyMOL.&lt;br /&gt;
&lt;br /&gt;
If you are interested in Biophysical, Structural or Compuational Biology, check out [http://www.bscb.utmb.edu/ BSCB@UTMB] -- my old school.&lt;br /&gt;
&lt;br /&gt;
-- '''Jason Vertrees, PhD &amp;lt;br/&amp;gt;&lt;br /&gt;
''Jason dot Vertrees (_at-) gmail dot com''&lt;br /&gt;
&lt;br /&gt;
= My ~/.pymolrc =&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
run ~/playground/pymol_scripts/oload.py&lt;br /&gt;
run ~/playground/cealign/qkabsch.py&lt;br /&gt;
run ~/playground/cealign/cealign.py&lt;br /&gt;
run ~/playground/pymol_scripts/find_bind.py&lt;br /&gt;
run ~/playground/pymol_scripts/zero.py&lt;br /&gt;
run ~/playground/pymol_scripts/removeAlt.py&lt;br /&gt;
run ~/playground/pymol_scripts/toGroup.py&lt;br /&gt;
&lt;br /&gt;
one_letter ={'VAL':'V', 'ILE':'I', 'LEU':'L', 'GLU':'E', 'GLN':'Q', \&lt;br /&gt;
'ASP':'D', 'ASN':'N', 'HIS':'H', 'TRP':'W', 'PHE':'F', 'TYR':'Y',    \&lt;br /&gt;
'ARG':'R', 'LYS':'K', 'SER':'S', 'THR':'T', 'MET':'M', 'ALA':'A',    \&lt;br /&gt;
'GLY':'G', 'PRO':'P', 'CYS':'C'}&lt;br /&gt;
&lt;br /&gt;
set ribbon_width, 8&lt;br /&gt;
set antialias,2&lt;br /&gt;
set cartoon_fancy_helices,1&lt;br /&gt;
set ray_trace_mode,1&lt;br /&gt;
set depth_cue,0&lt;br /&gt;
set ray_trace_fog,0&lt;br /&gt;
set ray_opaque_background,0&lt;br /&gt;
set defer_builds_mode, 3&lt;br /&gt;
set async_builds, 1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== To Do ==&lt;br /&gt;
* Movie-&amp;gt;UpdateMovie&lt;br /&gt;
* Scene-&amp;gt;Optmize (before saving scenes; use before optimizing)&lt;br /&gt;
* Scene-&amp;gt;Cache (cache's surface data)&lt;br /&gt;
* dot_solvent&lt;br /&gt;
&lt;br /&gt;
=== Movie Notes ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# Simple movie of independent motions&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# This create an ala and a tyr.  It moves the ala indepdendent&lt;br /&gt;
# of the tyr. &lt;br /&gt;
#&lt;br /&gt;
# Q: Why are the orientations off?  What is the equivalent&lt;br /&gt;
#    command to moving something with mouse_motions?&lt;br /&gt;
&lt;br /&gt;
# reinit&lt;br /&gt;
reinitialize&lt;br /&gt;
&lt;br /&gt;
set matrix_mode, 1&lt;br /&gt;
# turns on handy scene buttons&lt;br /&gt;
set scene_buttons, 1&lt;br /&gt;
# turns on the movie panel at the bottom of the sceen&lt;br /&gt;
set movie_panel, 1&lt;br /&gt;
# turns on a special mouse button panel&lt;br /&gt;
config_mouse three_button_motions&lt;br /&gt;
&lt;br /&gt;
# start with an empty movie, scene 1 with 90 frames&lt;br /&gt;
mset 1 x90&lt;br /&gt;
&lt;br /&gt;
# create an ala and tyr&lt;br /&gt;
frag ala&lt;br /&gt;
frag tyr&lt;br /&gt;
as spheres&lt;br /&gt;
&lt;br /&gt;
# create our scene&lt;br /&gt;
translate [10, 0, 0], object=ala, camera=0&lt;br /&gt;
orient&lt;br /&gt;
&lt;br /&gt;
# store the first frame&lt;br /&gt;
frame 1&lt;br /&gt;
mview store, object=ala&lt;br /&gt;
&lt;br /&gt;
# goto the next frame&lt;br /&gt;
frame 45&lt;br /&gt;
translate [-20, 0, 0], object=ala, camera=0&lt;br /&gt;
orient&lt;br /&gt;
&lt;br /&gt;
# store this frame&lt;br /&gt;
mview store, object=ala&lt;br /&gt;
&lt;br /&gt;
#reinterpolate the scene&lt;br /&gt;
mview reinterpolate, object=ala&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New motions&lt;br /&gt;
* Enter alone will store+reinterpolate&lt;br /&gt;
* Shift-Enter will just store &amp;amp; clears the reinterpolation&lt;br /&gt;
* CTRL-Enter will store but not reinterpolate&lt;br /&gt;
&lt;br /&gt;
New Scenes&lt;br /&gt;
* setups the scenes first&lt;br /&gt;
* then just goto the frame you want and hit enter and the current will be stored with it&lt;br /&gt;
* or you can right-click on the movie_panel and store with scene&lt;br /&gt;
&lt;br /&gt;
* purge kills the matrix info for the object&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New movie stuff&lt;br /&gt;
* CTRL-LEFTCLK + DRAG RIGHT = add frame/states&lt;br /&gt;
* CTRL-LEFTCLK + DRAG LEFT = erase frame/states&lt;br /&gt;
* Rt clk on object&lt;br /&gt;
** Shift+Middle = drag&lt;br /&gt;
** shift+Left = rotate&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
[[oload]], [[Cealign]], [[find_bind]], [[zero]], [[removeAlt]], [[toGroup]], [[ribbon_width]], [[antialias]], [[cartoon_fancy_helices]], [[depth_cue]], [[ray_trace_fog]], [[ray_opaque_background]], [[defer_builds_mode]], [[ray_trace_mode]].&lt;br /&gt;
&lt;br /&gt;
[[User:Inchoate|Tree]] 19:08, 26 May 2009 (UTC)&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=User:Folf&amp;diff=3257</id>
		<title>User:Folf</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=User:Folf&amp;diff=3257"/>
		<updated>2009-09-11T13:57:40Z</updated>

		<summary type="html">&lt;p&gt;Folf: Created page with ' == Description ==  I am a post-doc at the Danish Technical University doing crystallography and depending on PyMOL for generation of publication quality pictures as well as stru…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
I am a post-doc at the Danish Technical University doing crystallography and depending on PyMOL for generation of publication quality pictures as well as structure analysis.&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Align&amp;diff=720</id>
		<title>Align</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Align&amp;diff=720"/>
		<updated>2009-09-11T13:27:12Z</updated>

		<summary type="html">&lt;p&gt;Folf: /* Algorithm Details */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===DESCRIPTION===&lt;br /&gt;
'''align''' performs a sequence alignment followed by a structural alignment, and then carrys out zero or more cycles of refinement in order to reject structural outliers found during the fit.  For comparing proteins with lower sequence identity, an alignment program like, [[Cealign]] might be a better choice.&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:before_alignment.png|Two unaligned proteins&lt;br /&gt;
Image:after_alignment.png|Two proteins after structure alignment&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Algorithm Details ====&lt;br /&gt;
'''align''' does a BLAST-like BLOSUM62-weighted dynamic programming sequence alignment followed by a series of refinement cycles intended to improve the fit by eliminating pairing with high relative variability (e.g. &amp;gt;2 standard deviations from the cycle's mean deviance).&lt;br /&gt;
&lt;br /&gt;
Your can write the final alignment to a file see [[save]].&lt;br /&gt;
&lt;br /&gt;
=== Super! ===&lt;br /&gt;
PyMOL now has another command -- '''[[super]]'''.  Super allows for much more robust alignments.  It's fast, and under testing, does MUCH better than the original '''align''' command.&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
align (source), (target) [,cutoff [,cycles [,gap [,extend \&lt;br /&gt;
      [,skip [,object [,matrix [, quiet ]]]]]]]]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===PYMOL API===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.align( string source, string target, float cutoff=2.0,&lt;br /&gt;
           int cycles=2, float gap=-10.0, float extend=-0.5,&lt;br /&gt;
           int skip=0, string object=None, string matrix=&amp;quot;BLOSUM62&amp;quot;,&lt;br /&gt;
           int quiet=1 )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
align  prot1////CA, prot2, object=alignment&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===NOTE===&lt;br /&gt;
* If object is not None, then align will create an object which indicates which atoms were paired between the two structures&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Important note: &amp;lt;/b&amp;gt; the molecules you want to align need to be in two different objects. Else, PyMol will answer with a rather cryptic error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
ExecutiveAlign: invalid selections for alignment.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
You can skirt this problem by making a temporary object and aligning your original to the copy.&lt;br /&gt;
&lt;br /&gt;
* Sometimes Align may appear to give a mediocre fit. This is not due to any shortcoming of the algorithm or Pymol for that matter. This usually happens if one or more of the objects, that you are trying to align, have multiple states. For instance, certain PDB files may contain multiple structures/ensembles of the same protein. This is especially true for PDB files containing NMR structures. The workaround in such a situation is to use this workflow (provided by Warren - thanks!):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 set all_states, on&lt;br /&gt;
 intra_fit &amp;lt;your_structure_1&amp;gt;&lt;br /&gt;
 intra_fit &amp;lt;your_structure_2&amp;gt;&lt;br /&gt;
 align &amp;lt;your_structure_1&amp;gt;////CA, &amp;lt;your_structure_2&amp;gt;////CA&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[Cmd fit|fit]], [[Cmd rms|rms]], [[Cmd rms_cur|rms_cur]], [[Cmd intra_rms|intra_rms]], [[Cmd intra_rms_cur|intra_rms_cur]], [[Cmd pair_fit|pair_fit]], [[Cmd intra_fit|intra_fit]], [[Kabsch]], [[Cealign]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Align]]&lt;br /&gt;
[[Category:Structure_Alignment|Align]]&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Align&amp;diff=719</id>
		<title>Align</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Align&amp;diff=719"/>
		<updated>2009-09-11T13:26:58Z</updated>

		<summary type="html">&lt;p&gt;Folf: /* Algorithm Details */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===DESCRIPTION===&lt;br /&gt;
'''align''' performs a sequence alignment followed by a structural alignment, and then carrys out zero or more cycles of refinement in order to reject structural outliers found during the fit.  For comparing proteins with lower sequence identity, an alignment program like, [[Cealign]] might be a better choice.&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:before_alignment.png|Two unaligned proteins&lt;br /&gt;
Image:after_alignment.png|Two proteins after structure alignment&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Algorithm Details ====&lt;br /&gt;
'''align''' does a BLAST-like BLOSUM62-weighted dynamic programming sequence alignment followed by a series of refinement cycles intended to improve the fit by eliminating pairing with high relative variability (e.g. &amp;gt;2 standard deviations from the cycle's mean deviance).&lt;br /&gt;
&lt;br /&gt;
Your can write the final alignment to a file see [[save]]&lt;br /&gt;
&lt;br /&gt;
=== Super! ===&lt;br /&gt;
PyMOL now has another command -- '''[[super]]'''.  Super allows for much more robust alignments.  It's fast, and under testing, does MUCH better than the original '''align''' command.&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
align (source), (target) [,cutoff [,cycles [,gap [,extend \&lt;br /&gt;
      [,skip [,object [,matrix [, quiet ]]]]]]]]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===PYMOL API===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.align( string source, string target, float cutoff=2.0,&lt;br /&gt;
           int cycles=2, float gap=-10.0, float extend=-0.5,&lt;br /&gt;
           int skip=0, string object=None, string matrix=&amp;quot;BLOSUM62&amp;quot;,&lt;br /&gt;
           int quiet=1 )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
align  prot1////CA, prot2, object=alignment&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===NOTE===&lt;br /&gt;
* If object is not None, then align will create an object which indicates which atoms were paired between the two structures&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Important note: &amp;lt;/b&amp;gt; the molecules you want to align need to be in two different objects. Else, PyMol will answer with a rather cryptic error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
ExecutiveAlign: invalid selections for alignment.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
You can skirt this problem by making a temporary object and aligning your original to the copy.&lt;br /&gt;
&lt;br /&gt;
* Sometimes Align may appear to give a mediocre fit. This is not due to any shortcoming of the algorithm or Pymol for that matter. This usually happens if one or more of the objects, that you are trying to align, have multiple states. For instance, certain PDB files may contain multiple structures/ensembles of the same protein. This is especially true for PDB files containing NMR structures. The workaround in such a situation is to use this workflow (provided by Warren - thanks!):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 set all_states, on&lt;br /&gt;
 intra_fit &amp;lt;your_structure_1&amp;gt;&lt;br /&gt;
 intra_fit &amp;lt;your_structure_2&amp;gt;&lt;br /&gt;
 align &amp;lt;your_structure_1&amp;gt;////CA, &amp;lt;your_structure_2&amp;gt;////CA&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[Cmd fit|fit]], [[Cmd rms|rms]], [[Cmd rms_cur|rms_cur]], [[Cmd intra_rms|intra_rms]], [[Cmd intra_rms_cur|intra_rms_cur]], [[Cmd pair_fit|pair_fit]], [[Cmd intra_fit|intra_fit]], [[Kabsch]], [[Cealign]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Align]]&lt;br /&gt;
[[Category:Structure_Alignment|Align]]&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Save&amp;diff=9630</id>
		<title>Save</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Save&amp;diff=9630"/>
		<updated>2009-09-11T13:25:57Z</updated>

		<summary type="html">&lt;p&gt;Folf: /* DESCRIPTION */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===DESCRIPTION===&lt;br /&gt;
'''save''' writes selected atoms to a file.  The file format is&lt;br /&gt;
autodetected if the extesion is &amp;quot;.pdb&amp;quot;, &amp;quot;.pse&amp;quot;, &amp;quot;.mol&amp;quot;, &amp;quot;.mmod&amp;quot;, or&lt;br /&gt;
&amp;quot;.pkl&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
Note that if the file extension ends in &amp;quot;.pse&amp;quot; (PyMOL Session), the&lt;br /&gt;
complete PyMOL state is always saved to the file (the selection and&lt;br /&gt;
state parameters are thus ignored).&lt;br /&gt;
&lt;br /&gt;
If aligning two structures &lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 align proteinA, proteinB, object=A_on_B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
a clustal formatted alignment file can be written&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
save A_aligned_with_B.aln, A_on_B&lt;br /&gt;
&amp;lt;/source&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;
save file [,(selection) [,state [,format]] ]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===PYMOL API===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.save(file, selection, state, format)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===NOTES===&lt;br /&gt;
* When saving a session file, then &amp;quot;state&amp;quot; has no effect.&lt;br /&gt;
* When state = 0 (default), only the current state is written.&lt;br /&gt;
* When state = -1, then a multi-state output file is written (PDB only).&lt;br /&gt;
&lt;br /&gt;
* In versions 1.XX, a multi-state output file is written when state = 0 (which is not default)&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
   [[Load]], [[Get Model]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Save]]&lt;br /&gt;
[[Category:States|Save]]&lt;br /&gt;
[[Category:Input Output Module|Save]]&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Roving_delay&amp;diff=8690</id>
		<title>Roving delay</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Roving_delay&amp;diff=8690"/>
		<updated>2009-09-10T12:35:28Z</updated>

		<summary type="html">&lt;p&gt;Folf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
'''roving_delay''' determines the time before updating the scene.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# change roving_delay&lt;br /&gt;
set roving_delay, number # number &amp;gt; 0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
If you are on a slow computer it might prove useful to set this value to e.g. 2 (seconds). This prevents the scene from getting updated before you reach your place of interest.&lt;br /&gt;
&lt;br /&gt;
== Related settings ==&lt;br /&gt;
*[[roving_byres]]&lt;br /&gt;
*[[roving_cartoon]]&lt;br /&gt;
*[[roving_delay]]&lt;br /&gt;
*[[roving_detail]]&lt;br /&gt;
*[[roving_isomesh]]&lt;br /&gt;
*[[roving_isosurface]]&lt;br /&gt;
*[[roving_labels]]&lt;br /&gt;
*[[roving_lines]]&lt;br /&gt;
*[[roving_map1_level]]&lt;br /&gt;
*[[roving_map1_name]]&lt;br /&gt;
*[[roving_map2_level]]&lt;br /&gt;
*[[roving_map2_name]]&lt;br /&gt;
*[[roving_map3_level]]&lt;br /&gt;
*[[roving_map3_name]]&lt;br /&gt;
*[[roving_nb_spheres]]&lt;br /&gt;
*[[roving_nonbonded]]&lt;br /&gt;
*[[roving_origin]]&lt;br /&gt;
*[[roving_origin_z]]&lt;br /&gt;
*[[roving_origin_z_cushion]]&lt;br /&gt;
*[[roving_polar_contacts  ]]&lt;br /&gt;
*[[roving_polar_cutoff]]&lt;br /&gt;
*[[roving_ribbon]]&lt;br /&gt;
*[[roving_selection]]&lt;br /&gt;
*[[roving_spheres]]&lt;br /&gt;
*[[roving_sticks]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Settings|Settings]]&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Roving_delay&amp;diff=8689</id>
		<title>Roving delay</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Roving_delay&amp;diff=8689"/>
		<updated>2009-09-10T12:33:25Z</updated>

		<summary type="html">&lt;p&gt;Folf: Created page with '== Description ==  '''roving_delay''' determines the time before updating the scene.  == Syntax == &amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt; # change roving_delay set roving_delay, number # number …'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
'''roving_delay''' determines the time before updating the scene.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# change roving_delay&lt;br /&gt;
set roving_delay, number # number &amp;gt; 0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Related settings ==&lt;br /&gt;
*[[roving_byres]]&lt;br /&gt;
*[[roving_cartoon]]&lt;br /&gt;
*[[roving_delay]]&lt;br /&gt;
*[[roving_detail]]&lt;br /&gt;
*[[roving_isomesh]]&lt;br /&gt;
*[[roving_isosurface]]&lt;br /&gt;
*[[roving_labels]]&lt;br /&gt;
*[[roving_lines]]&lt;br /&gt;
*[[roving_map1_level]]&lt;br /&gt;
*[[roving_map1_name]]&lt;br /&gt;
*[[roving_map2_level]]&lt;br /&gt;
*[[roving_map2_name]]&lt;br /&gt;
*[[roving_map3_level]]&lt;br /&gt;
*[[roving_map3_name]]&lt;br /&gt;
*[[roving_nb_spheres]]&lt;br /&gt;
*[[roving_nonbonded]]&lt;br /&gt;
*[[roving_origin]]&lt;br /&gt;
*[[roving_origin_z]]&lt;br /&gt;
*[[roving_origin_z_cushion]]&lt;br /&gt;
*[[roving_polar_contacts  ]]&lt;br /&gt;
*[[roving_polar_cutoff]]&lt;br /&gt;
*[[roving_ribbon]]&lt;br /&gt;
*[[roving_selection]]&lt;br /&gt;
*[[roving_spheres]]&lt;br /&gt;
*[[roving_sticks]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Settings|Settings]]&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Roving_byres&amp;diff=9593</id>
		<title>Roving byres</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Roving_byres&amp;diff=9593"/>
		<updated>2009-09-10T12:24:05Z</updated>

		<summary type="html">&lt;p&gt;Folf: Created page with '== Description ==  '''roving_byres''' determines if roving_detail selection is by residue or not. == Syntax == &amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt; # to turn on roving_detail byres set rov…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
'''roving_byres''' determines if [[roving_detail]] selection is by residue or not.&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# to turn on roving_detail byres&lt;br /&gt;
set roving_byres, true&lt;br /&gt;
&lt;br /&gt;
# to turn off roving_detail byres&lt;br /&gt;
set roving_byres, false&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Related settings ==&lt;br /&gt;
*[[roving_byres]]&lt;br /&gt;
*[[roving_cartoon]]&lt;br /&gt;
*[[roving_delay]]&lt;br /&gt;
*[[roving_detail]]&lt;br /&gt;
*[[roving_isomesh]]&lt;br /&gt;
*[[roving_isosurface]]&lt;br /&gt;
*[[roving_labels]]&lt;br /&gt;
*[[roving_lines]]&lt;br /&gt;
*[[roving_map1_level]]&lt;br /&gt;
*[[roving_map1_name]]&lt;br /&gt;
*[[roving_map2_level]]&lt;br /&gt;
*[[roving_map2_name]]&lt;br /&gt;
*[[roving_map3_level]]&lt;br /&gt;
*[[roving_map3_name]]&lt;br /&gt;
*[[roving_nb_spheres]]&lt;br /&gt;
*[[roving_nonbonded]]&lt;br /&gt;
*[[roving_origin]]&lt;br /&gt;
*[[roving_origin_z]]&lt;br /&gt;
*[[roving_origin_z_cushion]]&lt;br /&gt;
*[[roving_polar_contacts  ]]&lt;br /&gt;
*[[roving_polar_cutoff]]&lt;br /&gt;
*[[roving_ribbon]]&lt;br /&gt;
*[[roving_selection]]&lt;br /&gt;
*[[roving_spheres]]&lt;br /&gt;
*[[roving_sticks]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Settings|Settings]]&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Roving_nb_spheres&amp;diff=9602</id>
		<title>Roving nb spheres</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Roving_nb_spheres&amp;diff=9602"/>
		<updated>2009-09-10T12:19:06Z</updated>

		<summary type="html">&lt;p&gt;Folf: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
'''roving_nb_spheres''' determines the radius within spheres are shown for non-bonded atoms (e.g. waters).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# set radius for non-bonded spheres while roving_detail is on&lt;br /&gt;
set roving_nb_spheres, typeNumber # typeNumber = [1...], 0 to disable&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related settings ==&lt;br /&gt;
*[[roving_byres]]&lt;br /&gt;
*[[roving_cartoon]]&lt;br /&gt;
*[[roving_delay]]&lt;br /&gt;
*[[roving_detail]]&lt;br /&gt;
*[[roving_isomesh]]&lt;br /&gt;
*[[roving_isosurface]]&lt;br /&gt;
*[[roving_labels]]&lt;br /&gt;
*[[roving_lines]]&lt;br /&gt;
*[[roving_map1_level]]&lt;br /&gt;
*[[roving_map1_name]]&lt;br /&gt;
*[[roving_map2_level]]&lt;br /&gt;
*[[roving_map2_name]]&lt;br /&gt;
*[[roving_map3_level]]&lt;br /&gt;
*[[roving_map3_name]]&lt;br /&gt;
*[[roving_nb_spheres]]&lt;br /&gt;
*[[roving_nonbonded]]&lt;br /&gt;
*[[roving_origin]]&lt;br /&gt;
*[[roving_origin_z]]&lt;br /&gt;
*[[roving_origin_z_cushion]]&lt;br /&gt;
*[[roving_polar_contacts  ]]&lt;br /&gt;
*[[roving_polar_cutoff]]&lt;br /&gt;
*[[roving_ribbon]]&lt;br /&gt;
*[[roving_selection]]&lt;br /&gt;
*[[roving_spheres]]&lt;br /&gt;
*[[roving_sticks]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Settings|Settings]]&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Roving_nb_spheres&amp;diff=9601</id>
		<title>Roving nb spheres</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Roving_nb_spheres&amp;diff=9601"/>
		<updated>2009-09-10T12:17:34Z</updated>

		<summary type="html">&lt;p&gt;Folf: Created page with '== Description ==  '''roving_nb_spheres''' determines the radius within spheres are shown for non-bonded atoms (e.g. waters).   == Syntax == &amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt; # set radius f…'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
'''roving_nb_spheres''' determines the radius within spheres are shown for non-bonded atoms (e.g. waters).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# set radius for non-bonded spheres while roving_detail is on&lt;br /&gt;
set roving_nb_spheres, typeNumber # typeNumber = [1...]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Related settings ==&lt;br /&gt;
*[[roving_byres]]&lt;br /&gt;
*[[roving_cartoon]]&lt;br /&gt;
*[[roving_delay]]&lt;br /&gt;
*[[roving_detail]]&lt;br /&gt;
*[[roving_isomesh]]&lt;br /&gt;
*[[roving_isosurface]]&lt;br /&gt;
*[[roving_labels]]&lt;br /&gt;
*[[roving_lines]]&lt;br /&gt;
*[[roving_map1_level]]&lt;br /&gt;
*[[roving_map1_name]]&lt;br /&gt;
*[[roving_map2_level]]&lt;br /&gt;
*[[roving_map2_name]]&lt;br /&gt;
*[[roving_map3_level]]&lt;br /&gt;
*[[roving_map3_name]]&lt;br /&gt;
*[[roving_nb_spheres]]&lt;br /&gt;
*[[roving_nonbonded]]&lt;br /&gt;
*[[roving_origin]]&lt;br /&gt;
*[[roving_origin_z]]&lt;br /&gt;
*[[roving_origin_z_cushion]]&lt;br /&gt;
*[[roving_polar_contacts  ]]&lt;br /&gt;
*[[roving_polar_cutoff]]&lt;br /&gt;
*[[roving_ribbon]]&lt;br /&gt;
*[[roving_selection]]&lt;br /&gt;
*[[roving_spheres]]&lt;br /&gt;
*[[roving_sticks]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Settings|Settings]]&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Roving_detail&amp;diff=9599</id>
		<title>Roving detail</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Roving_detail&amp;diff=9599"/>
		<updated>2009-09-10T12:05:22Z</updated>

		<summary type="html">&lt;p&gt;Folf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
'''Roving_detail''' shows details of the environment centered on the screen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# to turn on roving detail&lt;br /&gt;
set roving_detail, true&lt;br /&gt;
&lt;br /&gt;
# to turn off roving detail&lt;br /&gt;
set roving_detail, false&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Disclaimer ==&lt;br /&gt;
&lt;br /&gt;
When turning on roving_detail you immediately get the effect on your screen effectively changing all your representations.&lt;br /&gt;
&lt;br /&gt;
== Related settings ==&lt;br /&gt;
*[[roving_byres]]&lt;br /&gt;
*[[roving_cartoon]]&lt;br /&gt;
*[[roving_delay]]&lt;br /&gt;
*[[roving_detail]]&lt;br /&gt;
*[[roving_isomesh]]&lt;br /&gt;
*[[roving_isosurface]]&lt;br /&gt;
*[[roving_labels]]&lt;br /&gt;
*[[roving_lines]]&lt;br /&gt;
*[[roving_map1_level]]&lt;br /&gt;
*[[roving_map1_name]]&lt;br /&gt;
*[[roving_map2_level]]&lt;br /&gt;
*[[roving_map2_name]]&lt;br /&gt;
*[[roving_map3_level]]&lt;br /&gt;
*[[roving_map3_name]]&lt;br /&gt;
*[[roving_nb_spheres]]&lt;br /&gt;
*[[roving_nonbonded]]&lt;br /&gt;
*[[roving_origin]]&lt;br /&gt;
*[[roving_origin_z]]&lt;br /&gt;
*[[roving_origin_z_cushion]]&lt;br /&gt;
*[[roving_polar_contacts  ]]&lt;br /&gt;
*[[roving_polar_cutoff]]&lt;br /&gt;
*[[roving_ribbon]]&lt;br /&gt;
*[[roving_selection]]&lt;br /&gt;
*[[roving_spheres]]&lt;br /&gt;
*[[roving_sticks]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Settings|Settings]]&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Roving_detail&amp;diff=9598</id>
		<title>Roving detail</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Roving_detail&amp;diff=9598"/>
		<updated>2009-09-10T12:02:11Z</updated>

		<summary type="html">&lt;p&gt;Folf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
'''Roving_detail''' shows details of the environment centered on the screen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# to turn on roving detail&lt;br /&gt;
set roving_detail, true&lt;br /&gt;
&lt;br /&gt;
# to turn off roving detail&lt;br /&gt;
set roving_detail, false&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Disclaimer ==&lt;br /&gt;
&lt;br /&gt;
When turning on roving_detail you immediately get the effect on your screen effectively changing all your representations.&lt;br /&gt;
&lt;br /&gt;
== Related settings ==&lt;br /&gt;
*[[roving_byres]]&lt;br /&gt;
*[[roving_cartoon]]&lt;br /&gt;
*[[roving_delay]]&lt;br /&gt;
*[[roving_detail]]&lt;br /&gt;
*[[roving_isomesh]]&lt;br /&gt;
*[[roving_isosurface]]&lt;br /&gt;
*[[roving_labels]]&lt;br /&gt;
*[[roving_lines]]&lt;br /&gt;
*[[roving_map1_level]]&lt;br /&gt;
*[[roving_map1_name]]&lt;br /&gt;
*[[roving_map2_level]]&lt;br /&gt;
*[[roving_map2_name]]&lt;br /&gt;
*[[roving_map3_level]]&lt;br /&gt;
*[[roving_map3_name]]&lt;br /&gt;
*[[roving_nb_spheres]]&lt;br /&gt;
*[[roving_nonbonded]]&lt;br /&gt;
*[[roving_origin]]&lt;br /&gt;
*[[roving_origin_z]]&lt;br /&gt;
*[[roving_origin_z_cushion]]&lt;br /&gt;
*[[roving_polar_contacts  ]]&lt;br /&gt;
*[[roving_polar_cutoff]]&lt;br /&gt;
*[[roving_ribbon]]&lt;br /&gt;
*[[roving_selection]]&lt;br /&gt;
*[[roving_spheres]]&lt;br /&gt;
*[[roving_sticks]]&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Roving_detail&amp;diff=9597</id>
		<title>Roving detail</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Roving_detail&amp;diff=9597"/>
		<updated>2009-09-10T11:50:19Z</updated>

		<summary type="html">&lt;p&gt;Folf: moved Roving to Roving detail&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== DESCRIPTION ==&lt;br /&gt;
&lt;br /&gt;
Roving detail shows details of the environment centered on the screen&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Roving&amp;diff=9591</id>
		<title>Roving</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Roving&amp;diff=9591"/>
		<updated>2009-09-10T11:50:19Z</updated>

		<summary type="html">&lt;p&gt;Folf: moved Roving to Roving detail&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Roving detail]]&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Roving_detail&amp;diff=9596</id>
		<title>Roving detail</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Roving_detail&amp;diff=9596"/>
		<updated>2009-09-10T11:49:46Z</updated>

		<summary type="html">&lt;p&gt;Folf: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== DESCRIPTION ==&lt;br /&gt;
&lt;br /&gt;
Roving detail shows details of the environment centered on the screen&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Roving_detail&amp;diff=9595</id>
		<title>Roving detail</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Roving_detail&amp;diff=9595"/>
		<updated>2009-09-10T11:34:41Z</updated>

		<summary type="html">&lt;p&gt;Folf: Created page with '===Description=== Roving detail make you able to get complex views for the part of the structure you are currently looking at'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Description===&lt;br /&gt;
Roving detail make you able to get complex views for the part of the structure you are currently looking at&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Covers&amp;diff=5286</id>
		<title>Covers</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Covers&amp;diff=5286"/>
		<updated>2009-09-09T13:41:55Z</updated>

		<summary type="html">&lt;p&gt;Folf: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= PyMOL-created Journal Covers =&lt;br /&gt;
Part of PyMOL's popularity comes from the fact that it is very flexible and it offers arbitrarily high-resolution images as output; this make it a great tool for making journal covers or any press-related images.&lt;br /&gt;
&lt;br /&gt;
Here are some of the known PyMOL-created Journal Covers.  There are surely more out there.  If you have a cover you'd like to add, feel free.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery perrow=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
Image:Image_large.png |[http://pymolwiki.org/index.php/File:Image_large.png MD simulation of protein-protein binding  ]'''Pymol generated Movie is avialable inside pdf'''[[http://www.pymolwiki.org/index.php/File:SH3.pdf]] ''' or high quality AVI format'''[http://gepard.bioinformatik.uni-saarland.de/old_html/material/dl/SH3_large.avi]&lt;br /&gt;
Image:Science090410.jpg|[http://www.sciencemag.org/content/vol324/issue5924/index.dtl Protein Dynamics]&lt;br /&gt;
Image:080701_h.a.steinberg_biochemie.jpg|'''Targeting DNA''', [http://www.sciencedirect.com/science?_ob=PublicationURL&amp;amp;_tockey=%23TOC%236236%232008%23999099992%23693363%23FLA%23&amp;amp;_cdi=6236&amp;amp;_pubType=J&amp;amp;_auth=y&amp;amp;_acct=C000050221&amp;amp;_version=1&amp;amp;_urlVersion=0&amp;amp;_userid=10&amp;amp;md5=3e9cfd266720a7645cec65b2bfbd7645 BIOCHEMIE], July 1, 2008 Cover, Vol. 90.&lt;br /&gt;
Image:080602cnen.pdf.jpg|'''Harnessing Helices''', [http://pubs.acs.org/cen/coverstory/86/8622aboutcover.html Chemical &amp;amp; Engineering News], June 2, 2008 Cover, Vol. 86, Issue 22.&lt;br /&gt;
Image:080118_h.a.steinberg_JBC.jpg|''' Fusarium head blight (FHB)''', [http://www.jbc.org/content/vol283/issue3/cover.shtml JBC], January 18, 2008 Cover, Vol. 283, Issue 3.&lt;br /&gt;
Image:071213nature.pdf.jpg|'''Pumping Ions''', [http://www.nature.com/nature/journal/v450/n7172/index.html Nature], Dec. 13th, 2007.&lt;br /&gt;
Image:0712channels.jpg|[http://www.landesbioscience.com/journals/channels/toc/1/6], Dec 2007.&lt;br /&gt;
Image:071123science.pdf.jpg|[http://www.sciencemag.org/content/vol318/issue5854/index.dtl Science], Nov. 23rd, 2007.&lt;br /&gt;
Image:071120pnas.jpg|'''Sensing Calciums'''[http://www.pnas.org/content/104/47.toc], Nov 20th, 2007. &lt;br /&gt;
Image:071113Structure.png|'''Aminoacyl-tRNA synthetases from human mitochondria'''[http://www.cell.com/structure/issue?pii=S0969-2126(07)X0180-1], Nov. 13th, 2007.&lt;br /&gt;
Image:071009science.pdf.jpg|[http://www.sciencemag.org/content/vol318/issue5849/index.dtl Science], Oct. 19th, 2007.&lt;br /&gt;
Image:070920nature.pdf.jpg|'''Sensing Acid''', [http://www.nature.com/nature/journal/v449/n7160/index.html Nature], Sept. 20th, 2007.&lt;br /&gt;
Image:070816nature.pdf.jpg|'''Form Finds Function?''', [http://www.nature.com/nature/journal/v448/n7155/index.html Nature], Aug. 16thm 2007.&lt;br /&gt;
Image:Largecover.gif|[http://www.nature.com/neuro/journal/v10/n8/abs/nn1942.html Nature Neuroscience] Vol. 10 No. 8 Aug. 2007&lt;br /&gt;
Image:070803_h.a.steinberg_molec_cell.jpg|'''Paused transcription complexes''', [http://www.cell.com/molecular-cell/issue?pii=S1097-2765(07)X0175-8# Molecular Cell], August 3 2007 Cover, Vol. 27, Issue 3.&lt;br /&gt;
Image:070415.h.a.steinberg_ABB.jpg|'''Vitamin D''', [http://www.sciencedirect.com/science?_ob=PublicationURL&amp;amp;_cdi=6701&amp;amp;_pubType=J&amp;amp;_auth=y&amp;amp;_acct=C000050221&amp;amp;_version=1&amp;amp;_urlVersion=0&amp;amp;_userid=10&amp;amp;md5=b9733feacdee17300b6b31649737997b&amp;amp;jchunk=460#460 ABB], April 14 2007 Cover, Vol. 460, Issue 2.&lt;br /&gt;
Image:070405nature.pdf.jpg|'''Auxin Action Revealed''', [http://www.nature.com/nature/journal/v446/n7136/index.html Nature], April 5, 2007.&lt;br /&gt;
Image:070301_h.a.steinberg_protein_science.jpg|'''Glucose-1-phosphate uridylyltransferase''', [http://www.proteinscience.org/content/vol16/issue3/cover.shtml Protein Science], March 3, 2007 Cover, Volume 16 Issue 3.&lt;br /&gt;
Image:070219cnen.pdf.jpg|'''How Ribosomes Work''', [http://pubs.acs.org/cen/coverstory/85/8508aboutcover.html Chemical &amp;amp; Engineering News], Feb. 19th, 2007.&lt;br /&gt;
Image:070215nature.pdf.jpg|'''HIV's Hidden Weakness''', [http://www.nature.com/nature/journal/v445/n7129/index.html Nature], Feb. 15th, 2007.&lt;br /&gt;
Image:061208_h.a.steinberg_molec_cell.jpg|'''Sen1 Control of RNA Pol II Termination''', [http://www.molecule.org/content/issue?volume=24&amp;amp;issue=5 Molecular Cell], December 8, 2006 Cover, Volume 24 Issue 5.&lt;br /&gt;
Image:061201_h.a.steinberg_molec_micro.jpg|'''Transposon Loops''', [http://www.blackwell-synergy.com/toc/mmi/62/6 Molecular Microbiology], December 1, 2006 Cover, Volume 62 Issue 6.&lt;br /&gt;
Image:060904cnen.pdf.jpg|'''Glycosylation Engineering''', [http://pubs.acs.org/subscribe/journals/cen/84/i36/toc/toc_i36.html Chemical &amp;amp; Engineering News], Sept. 4th, 2006.&lt;br /&gt;
Image:060817nature.pdf.jpg|'''Chromatin Code Decoded''', [http://www.nature.com/nature/journal/v442/n7104/index.html Nature], Aug. 17th, 2006.&lt;br /&gt;
Image:060522cnen.pdf.jpg|'''Halogenases''', [http://pubs.acs.org/subscribe/journals/cen/84/i21/toc/toc_i21.html Chemical &amp;amp; Engineering News], May 22nd, 2006.&lt;br /&gt;
Image:060101_h.a.steinberg_protein_science.jpg|'''Poly (2S-proline)''', [http://www.proteinscience.org/content/vol15/issue1/cover.shtml Protein Science], January 1, 2006 Cover, Volume 15, Issue 1.&lt;br /&gt;
Image:050624_h.a.steinberg_JMB.jpg|'''Ribonuclease A''', [http://www.sciencedirect.com/science?_ob=PublicationURL&amp;amp;_tockey=%23TOC%236899%232005%23996459998%23609160%23FLA%23&amp;amp;_cdi=6899&amp;amp;_pubType=J&amp;amp;view=c&amp;amp;_auth=y&amp;amp;_acct=C000050221&amp;amp;_version=1&amp;amp;_urlVersion=0&amp;amp;_userid=10&amp;amp;md5=9623405850d13617453adb034fb10a81 JMB], November 18, 2005 Cover, Volume 354, Issue 1.&lt;br /&gt;
Image:051020nature.pdf.jpg|'''The B to Z of DNA''', [http://www.nature.com/nature/journal/v437/n7062/index.html Nature], Oct. 20th, 2005.&lt;br /&gt;
&lt;br /&gt;
Image:050923_h.a.steinberg_JBC.jpg|'''GalNAc kinase''', [http://www.jbc.org/content/vol280/issue38/cover.shtml JBC], September 23, 2005 Cover, Volume 280, Issue 38.&lt;br /&gt;
Image:050908nature.pdf.jpg|'''Neurotransmission''', [http://www.nature.com/nature/journal/v437/n7056/index.html Nature], Sept. 8th, 2005.&lt;br /&gt;
Image:050722science.pdf.jpg|[http://www.sciencemag.org/content/vol309/issue5734/index.dtl Science], July 22nd, 2005.&lt;br /&gt;
Image:050624_h.a.steinberg_jmb1.jpg|[http://www.sciencedirect.com/science?_ob=PublicationURL&amp;amp;_tockey=%23TOC%236899%232005%23996509994%23597371%23FLA%23&amp;amp;_cdi=6899&amp;amp;_pubType=J&amp;amp;_auth=y&amp;amp;_acct=C000050221&amp;amp;_version=1&amp;amp;_urlVersion=0&amp;amp;_userid=10&amp;amp;md5=0bc37bcef231976694d0fbe8920ef596 JMB], June 24, 2005 Cover, Volume 349, Issue 5.&lt;br /&gt;
Image:050609nature.pdf.jpg|'''Probing Prions''', [http://www.nature.com/nature/journal/v435/n7043/index.html Nature], June 9th, 2005.&lt;br /&gt;
Image:050429science.pdf.jpg|[http://www.sciencemag.org/content/vol308/issue5722/index.dtl Science], April 29th, 2005.&lt;br /&gt;
Image:040910science.pdf.jpg|[http://www.sciencemag.org/content/vol305/issue5690/index.dtl Science], Sept., 10th, 2004.&lt;br /&gt;
Image:040123science.pdf.jpg|[http://www.sciencemag.org/content/vol303/issue5657/index.dtl Science], Jan. 23rd, 2004.&lt;br /&gt;
Image:Ribbon_hh1.png|[http://www.chembiol.com/content/issue?volume=15&amp;amp;issue=4 Chem. Biol.]&lt;br /&gt;
Image:0903_1_1.jpg|[http://pubs.acs.org/journals/achre4/covers/36/articleWindow.achre4.091603.html Accounts of Chemical Research]&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Cartoon_flat_sheets&amp;diff=957</id>
		<title>Cartoon flat sheets</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Cartoon_flat_sheets&amp;diff=957"/>
		<updated>2009-07-15T17:19:16Z</updated>

		<summary type="html">&lt;p&gt;Folf: /* See Also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
'''cartoon_flat_sheets''' determines how smooth PyMol draws the beta sheets.  Flat sheets make for a nice artistic image, however sometime there are problems making sticks appear attached to the sheets.  If this problem happens, turn this option off.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Cfs_on.png|Cartoon Flat Sheets, ON&lt;br /&gt;
Image:Cfs_off.png|Cartoon Flat Sheets, OFF&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
[[Cartoon_smooth_loops]] &lt;br /&gt;
&lt;br /&gt;
Or maybe even better:&lt;br /&gt;
[[Cartoon_side_chain_helper]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Settings|Cartoon flat sheets]]&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Practical_Pymol_for_Beginners&amp;diff=8441</id>
		<title>Practical Pymol for Beginners</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Practical_Pymol_for_Beginners&amp;diff=8441"/>
		<updated>2009-07-10T10:27:51Z</updated>

		<summary type="html">&lt;p&gt;Folf: /* Introduction and Very Simple Scripting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Although PyMol has a powerful and flexible interface, it is complex, and can appear daunting to new users. This guide is intended to introduce the PyMol interface and basic tasks without leaving the mouse behind. &lt;br /&gt;
&lt;br /&gt;
==The PyMol Interface==&lt;br /&gt;
When PyMol is opened, two windows appear. The smaller window (called the &amp;quot;External GUI&amp;quot; in PyMol documentation) contains the menu bar ('''File''', '''Edit''', '''Help''', '''Display''', etc), shortcut buttons for common commands, and the command line.&lt;br /&gt;
&lt;br /&gt;
[[Image:Viewer_guide.png|right|thumb|The PyMol Viewer Window]]&lt;br /&gt;
The second window is the PyMOL Viewer, which is where all the magic happens. In the Viewer, 3D models are displayed, and the user interacts (eg rotates) and manipulates the model. &lt;br /&gt;
&lt;br /&gt;
The objects that PyMOL renders in 3D are loaded from coordinate files that describe (in great detail) locations of individual atoms in the molecule. PyMOL can display more than one object at a time, and provides an Object Control Panel to adjust viewing modes, colors, labels, hiding, and just about anything else relating to objects. After each object name is a set of command buttons which control the object. Here are the buttons and some of their options:&lt;br /&gt;
* '''A''' - ''Actions'': Rename, duplicate, remove, apply presets (like &amp;quot;ball-and-stick&amp;quot; or &amp;quot;publication&amp;quot;), perform computations&lt;br /&gt;
* '''S''' - ''Show'': Change the way things appear, eg change to stick or cartoon view. &lt;br /&gt;
* '''H''' - ''Hide'': Things that are shown using '''S''' accumulate, and don't automatically replace the last view. '''H''' is the opposite of '''S''' and hides unwanted representations. &lt;br /&gt;
* '''L''' - ''Label'': Label atoms, residues, etc.&lt;br /&gt;
* '''C''' - ''Color'': Change the color of atoms and groups. &lt;br /&gt;
&lt;br /&gt;
The lower-right corner of the Viewer contains a guide to using the mouse, as well as a powerful selection tool. There is also another command line at the bottom of the Viewer ('''PyMOL&amp;gt;''').&lt;br /&gt;
&lt;br /&gt;
===About the command line===&lt;br /&gt;
The PyMol command line is a great tool that lets the experienced user change all sorts of options that simply don't appear in the point-and-click graphical interface. It can also be a lot faster. Combined with scripting, it is a powerful option for automating tasks and making intricate sets of changes. But, it's complex, and page upon page of PyMol documentation cover these commands, so we're going to ignore them as much as possible.&lt;br /&gt;
&lt;br /&gt;
Although this guide may include some text commands and links to more advanced documentation, they're purely optional and meant to be informative. &lt;br /&gt;
&lt;br /&gt;
To run any text command, type it in at a '''PyMOL&amp;gt;''' command line and hit ''[Enter]''.&lt;br /&gt;
&lt;br /&gt;
==Getting started: explore a protein==&lt;br /&gt;
PyMol is great for casual visualization of biological molecules. In this example, a PDB file describing a protein is loaded and its style and color are tweaked.&lt;br /&gt;
&lt;br /&gt;
[[Image:Kchannel-rainbow.png|thumb|right|The end result will look something like this]]&lt;br /&gt;
[[Image:Mouse-3view.png|thumb|right|Default buttons for viewing with a 3-button mouse]]&lt;br /&gt;
# Obtain a PDB coordinates file for your favorite protein. (The [http://www.pdb.org/ RCSB Protein Data Bank] is a public structure repository containing over 40,000 protein structures in PDB format available for download, not a bad place to look.) For this example, we're using the potassium channel from ''Streptomyces Lividans'' ([http://www.pdb.org/pdb/files/1bl8.pdb 1BL8]).&lt;br /&gt;
#* or just type, &amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;fetch 1bl8&amp;lt;/source&amp;gt; and you can skip the next step (see [[Fetch]] command), as PyMOL will open the file for you.&lt;br /&gt;
# Open the PDB file using '''File''' =&amp;gt; '''Open...''' from the menu bar. The protein's structure will appear, probably rendered as simple bonding lines. &lt;br /&gt;
# The right side of the Viewer shows the loaded PDB as an object, as well as its command buttons. Each button contains a submenu with more options. Click '''S''', then '''cartoon''' to show the protein's secondary structure in popular cartoon form. &lt;br /&gt;
#* Notice that the lines view is still visible on top of the cartoon view. To hide the lines, click '''H''' then '''lines'''. &lt;br /&gt;
# To change the color of each protein chain (as defined in the coordinate file), click '''C''' then select '''chainbows''' from the '''by chain''' menu. &amp;quot;Chainbows&amp;quot; colors residues in each protein chain as a rainbow that begins with blue and ends with red.&lt;br /&gt;
#* Another common coloring method assigns a single color to each chain. Click '''C''' then select '''by chain''' from the '''by chain''' menu.&lt;br /&gt;
# Click and drag the protein to change the view. A list of mouse buttons is below the object control panel. &lt;br /&gt;
#*Rota: Rotate&lt;br /&gt;
#*Move: Translate object along an axis&lt;br /&gt;
#*MoveZ: aka Zoom&lt;br /&gt;
#*Sele: Select`&lt;br /&gt;
#*Slab:&lt;br /&gt;
#*Cent:&lt;br /&gt;
#*PkAt:&lt;br /&gt;
&lt;br /&gt;
=== Related Commands ===&lt;br /&gt;
[[Load]], [[Fetch]], [[Color]], [[Show]], [[Show_as]], [[Cartoon]], [[Lines]], [[Rotate]], [[Select]], [[Center]]&lt;br /&gt;
&lt;br /&gt;
==What else can this thing do?==&lt;br /&gt;
So, now what? Good question. PyMOL is a powerful program, and everyone uses it for something different. The remainder of this guide is devoted to common tasks that come in handy.&lt;br /&gt;
&lt;br /&gt;
===Saving an image===&lt;br /&gt;
You've found the perfect view, and you'd like to [[Save]] it?&lt;br /&gt;
&lt;br /&gt;
# Change the size of the viewer and zoom in/out to make the image the right size. Images are saved exactly as they appear in the viewer, and the size of the viewer determines the size of the image.&lt;br /&gt;
#* For example, images for printing and presenting should be larger than images for a posting on a website.&lt;br /&gt;
# Because PyMOL was designed to run on older computers, the maximum quality is not enabled by default. To change this, select '''Display''', '''Quality''', '''Maximum Quality'''. Notice that round things are rounder, curves are curvier, and color shading is smoother.&lt;br /&gt;
# Once you've found the appropriate view, save an image using '''File''', '''Save Image...''' An picture of the current view will be saved in PNG format.&lt;br /&gt;
&lt;br /&gt;
'''Tip:''' Using the ''[[ray]]'' command before saving an image will create a higher quality version with shadows, etc. This can take time, depending on the size of the image and speed of the computer, but the images created after ray tracing are usually spectacular. However, the ray tracing disappears if the view is changed in any way.&lt;br /&gt;
&lt;br /&gt;
===Selecting parts of an object===&lt;br /&gt;
Sometimes it might be useful to select part of an object and modify it directly; for example, selecting active-site residues in a protein to highlight them in another color. &lt;br /&gt;
&lt;br /&gt;
In the lower-right corner of the Viewer, next to the animation controls, is an '''S''' button (not to be confused with the '''S'''how button in the object control panel) that activates the selection tool. The selection tool can be changed to select atoms or residues by clicking ''Selecting Residues(or whatever)'' until the right mode appears.&lt;br /&gt;
&lt;br /&gt;
Once selecting is activated, a list of parts to select appears at the top of the Viewer. Select things clicking or dragging across a range.&lt;br /&gt;
&lt;br /&gt;
Selections can be controlled individually in the object control panel, just like any other object. To save a selection, select '''rename''' from the '''A''' menu.&lt;br /&gt;
&lt;br /&gt;
===Whoops: Getting unstuck===&lt;br /&gt;
PyMOL is a program meant to be explored and played with, and sometimes funny things happen in the process. A few common problems:&lt;br /&gt;
&lt;br /&gt;
* ''The model disappeared:'' Sometimes while rotating and moving a model, it can get lost. Right-click the background of the viewer, and select '''reset''' from the ''Main Pop-Up''. The model should return to view; if it doesn't, make sure the object is being drawn using the '''S''' menu.&lt;br /&gt;
* ''The model has funny colors, labels, etc and they won't go away:'' The '''H''' menu in the object control panel will remove unwanted details; however, sometimes it's difficult to know exactly what to remove. Select '''H''', then '''everything''' to hide all details and start fresh.&lt;br /&gt;
* ''Things are really messed up:'' Use '''File''', '''Reinitalize''' to reset PyMOL to its initial state, but all work will be lost.&lt;br /&gt;
&lt;br /&gt;
=== Related Commands ===&lt;br /&gt;
[[Save]], [[Viewport]], [[Zoom]], [[Save]], [[Ray]], [[Select]]&lt;br /&gt;
&lt;br /&gt;
===Saving work===&lt;br /&gt;
PyMOL supports saving your work in various formats.  You can save, images, molecules, sessions, movies, etc.&lt;br /&gt;
&lt;br /&gt;
====Sessions====&lt;br /&gt;
A PymOL sessions retains the state of your PyMOL instance.  You can save the session to disk and reload it later.  You can setup a complicated scene, with transitions and more, and simply save it as a PyMOL Session (.pse) file.  Use, '''File'''=&amp;gt;'''Save Session''' or '''Save Session As...'''.&lt;br /&gt;
&lt;br /&gt;
Loading sessions is just as easy: '''File'''=&amp;gt;'''Load''' and choose your session file.&lt;br /&gt;
&lt;br /&gt;
====Molecules====&lt;br /&gt;
You can save a molecule by selecting '''File'''=&amp;gt;'''Save Molecule'''.  A dialog box will appear from which you can select your molecule to save.  You can also save an object or selection using the [[Save]] command.  It's very easy:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
save  fileName, objSel&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
where fileName is something like &amp;quot;1abc.pdb&amp;quot;, and objSel can be any object or selection.  For example, to save just the waters to disk do:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
save wat.pdb, resn HOH&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Images ====&lt;br /&gt;
You can save images that you've rendered (with [[Ray]]) or drawn (with [[Draw]]) again using the [[Save]] command or by '''File'''=&amp;gt;'''Save Image'''.  You can save in [[Png]], VRML-2 and the POVRay formats.&lt;br /&gt;
&lt;br /&gt;
You can save images to disk, through the command line, by using the [[Png]] command.&lt;br /&gt;
&lt;br /&gt;
==== Movies ====&lt;br /&gt;
PyMOL allows you to save movies you've created, too.  You can automatically save the MPEG or save a series of PNG files--for stitching together later.  This is a new command, and I don't know too much about it.  Use '''File'''=&amp;gt;'''Save Movie'''.&lt;br /&gt;
&lt;br /&gt;
===Scripting===&lt;br /&gt;
====Introduction and Very Simple Scripting====&lt;br /&gt;
Scripting in PyMOL ranges from very simple to very intricate.  You can make a simple loop (say rotating a molecule one-degree at a time) or execute full featured scripts.  Once you've got the basics of PyMOL down, learning scripting will greatly enhance your productivity and capabilities.&lt;br /&gt;
&lt;br /&gt;
Because of the way PyMOL is built on top of the Python interpreter, any command that PyMOL doesn't recognize it passes on to Python to execute.  This is a '''very''' handy feature--you essentially have a live Python interpreter you can interact with, which makes your life much easier.  Take the following for example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
f = 10.&lt;br /&gt;
for x in range(0,100,10):&lt;br /&gt;
  cmd.set(&amp;quot;spec_direct_power&amp;quot;, float(float(x) / f))&lt;br /&gt;
  cmd.png(&amp;quot;spec_dir_power&amp;quot; + str(x) + &amp;quot;.png&amp;quot;, ray=1)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This simple script of 4 lines will create 10 images each one with the [[Spec_direct_power]] changed (see the [[Spec_direct_power]] for the output of this script; the animated GIF).  Did you notice that '''f''' on line 1 and '''for''' and '''x''' on line 2 are not PyMOL commands or symbols?  You can simply write Python code that interacts with PyMOL.  Brilliant!&lt;br /&gt;
&lt;br /&gt;
====The Python MiniShell ====&lt;br /&gt;
Taking this one level higher, you can write little code snippets, like 10-20+ lines of code that perform some specific task and wrap these in the '''python''' and '''python end''' commands.  (If your script ever makes a mistake, you can abort the endeavor with '''end''' instead of '''python end'''.  The power here is that none of your command are executed until you type '''python end'''.  Confused?  Here's the above example in using the wrapper:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
python&lt;br /&gt;
f = 10.&lt;br /&gt;
for x in range(0,100,10):&lt;br /&gt;
  cmd.set(&amp;quot;spec_direct_power&amp;quot;, float(float(x) / f))&lt;br /&gt;
  cmd.png(&amp;quot;spec_dir_power&amp;quot; + str(x) + &amp;quot;.png&amp;quot;, ray=1)&lt;br /&gt;
python end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
The [[python]] command gives you complete access to the Python shell &amp;amp; '''python end''' just brings you back into PyMOL's shell.  Also, note that PyMOL saves information across instantiations of the '''python''' command.  For example,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# enter mini python shell&lt;br /&gt;
python&lt;br /&gt;
ff = 10.&lt;br /&gt;
python end&lt;br /&gt;
&lt;br /&gt;
# no we're back in PyMOL; where PyMOL knows about the value&lt;br /&gt;
print ff&lt;br /&gt;
&lt;br /&gt;
# in the mini shell, Python still knows about ff.&lt;br /&gt;
python &lt;br /&gt;
print ff&lt;br /&gt;
python end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Learning More... ====&lt;br /&gt;
To learn more about scripting check out:&lt;br /&gt;
*[[Simple_Scripting]] introduction&lt;br /&gt;
*[[Advanced_Scripting]] pages&lt;br /&gt;
*[[:Category:Script_Library|Popular Script Library]].&lt;br /&gt;
&lt;br /&gt;
==Coming Soon==&lt;br /&gt;
&lt;br /&gt;
===Logging===&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:States]]&lt;br /&gt;
[[Category:Movies]]&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Practical_Pymol_for_Beginners&amp;diff=8440</id>
		<title>Practical Pymol for Beginners</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Practical_Pymol_for_Beginners&amp;diff=8440"/>
		<updated>2009-07-10T10:27:20Z</updated>

		<summary type="html">&lt;p&gt;Folf: /* Introduction and Very Simple Scripting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Although PyMol has a powerful and flexible interface, it is complex, and can appear daunting to new users. This guide is intended to introduce the PyMol interface and basic tasks without leaving the mouse behind. &lt;br /&gt;
&lt;br /&gt;
==The PyMol Interface==&lt;br /&gt;
When PyMol is opened, two windows appear. The smaller window (called the &amp;quot;External GUI&amp;quot; in PyMol documentation) contains the menu bar ('''File''', '''Edit''', '''Help''', '''Display''', etc), shortcut buttons for common commands, and the command line.&lt;br /&gt;
&lt;br /&gt;
[[Image:Viewer_guide.png|right|thumb|The PyMol Viewer Window]]&lt;br /&gt;
The second window is the PyMOL Viewer, which is where all the magic happens. In the Viewer, 3D models are displayed, and the user interacts (eg rotates) and manipulates the model. &lt;br /&gt;
&lt;br /&gt;
The objects that PyMOL renders in 3D are loaded from coordinate files that describe (in great detail) locations of individual atoms in the molecule. PyMOL can display more than one object at a time, and provides an Object Control Panel to adjust viewing modes, colors, labels, hiding, and just about anything else relating to objects. After each object name is a set of command buttons which control the object. Here are the buttons and some of their options:&lt;br /&gt;
* '''A''' - ''Actions'': Rename, duplicate, remove, apply presets (like &amp;quot;ball-and-stick&amp;quot; or &amp;quot;publication&amp;quot;), perform computations&lt;br /&gt;
* '''S''' - ''Show'': Change the way things appear, eg change to stick or cartoon view. &lt;br /&gt;
* '''H''' - ''Hide'': Things that are shown using '''S''' accumulate, and don't automatically replace the last view. '''H''' is the opposite of '''S''' and hides unwanted representations. &lt;br /&gt;
* '''L''' - ''Label'': Label atoms, residues, etc.&lt;br /&gt;
* '''C''' - ''Color'': Change the color of atoms and groups. &lt;br /&gt;
&lt;br /&gt;
The lower-right corner of the Viewer contains a guide to using the mouse, as well as a powerful selection tool. There is also another command line at the bottom of the Viewer ('''PyMOL&amp;gt;''').&lt;br /&gt;
&lt;br /&gt;
===About the command line===&lt;br /&gt;
The PyMol command line is a great tool that lets the experienced user change all sorts of options that simply don't appear in the point-and-click graphical interface. It can also be a lot faster. Combined with scripting, it is a powerful option for automating tasks and making intricate sets of changes. But, it's complex, and page upon page of PyMol documentation cover these commands, so we're going to ignore them as much as possible.&lt;br /&gt;
&lt;br /&gt;
Although this guide may include some text commands and links to more advanced documentation, they're purely optional and meant to be informative. &lt;br /&gt;
&lt;br /&gt;
To run any text command, type it in at a '''PyMOL&amp;gt;''' command line and hit ''[Enter]''.&lt;br /&gt;
&lt;br /&gt;
==Getting started: explore a protein==&lt;br /&gt;
PyMol is great for casual visualization of biological molecules. In this example, a PDB file describing a protein is loaded and its style and color are tweaked.&lt;br /&gt;
&lt;br /&gt;
[[Image:Kchannel-rainbow.png|thumb|right|The end result will look something like this]]&lt;br /&gt;
[[Image:Mouse-3view.png|thumb|right|Default buttons for viewing with a 3-button mouse]]&lt;br /&gt;
# Obtain a PDB coordinates file for your favorite protein. (The [http://www.pdb.org/ RCSB Protein Data Bank] is a public structure repository containing over 40,000 protein structures in PDB format available for download, not a bad place to look.) For this example, we're using the potassium channel from ''Streptomyces Lividans'' ([http://www.pdb.org/pdb/files/1bl8.pdb 1BL8]).&lt;br /&gt;
#* or just type, &amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;fetch 1bl8&amp;lt;/source&amp;gt; and you can skip the next step (see [[Fetch]] command), as PyMOL will open the file for you.&lt;br /&gt;
# Open the PDB file using '''File''' =&amp;gt; '''Open...''' from the menu bar. The protein's structure will appear, probably rendered as simple bonding lines. &lt;br /&gt;
# The right side of the Viewer shows the loaded PDB as an object, as well as its command buttons. Each button contains a submenu with more options. Click '''S''', then '''cartoon''' to show the protein's secondary structure in popular cartoon form. &lt;br /&gt;
#* Notice that the lines view is still visible on top of the cartoon view. To hide the lines, click '''H''' then '''lines'''. &lt;br /&gt;
# To change the color of each protein chain (as defined in the coordinate file), click '''C''' then select '''chainbows''' from the '''by chain''' menu. &amp;quot;Chainbows&amp;quot; colors residues in each protein chain as a rainbow that begins with blue and ends with red.&lt;br /&gt;
#* Another common coloring method assigns a single color to each chain. Click '''C''' then select '''by chain''' from the '''by chain''' menu.&lt;br /&gt;
# Click and drag the protein to change the view. A list of mouse buttons is below the object control panel. &lt;br /&gt;
#*Rota: Rotate&lt;br /&gt;
#*Move: Translate object along an axis&lt;br /&gt;
#*MoveZ: aka Zoom&lt;br /&gt;
#*Sele: Select`&lt;br /&gt;
#*Slab:&lt;br /&gt;
#*Cent:&lt;br /&gt;
#*PkAt:&lt;br /&gt;
&lt;br /&gt;
=== Related Commands ===&lt;br /&gt;
[[Load]], [[Fetch]], [[Color]], [[Show]], [[Show_as]], [[Cartoon]], [[Lines]], [[Rotate]], [[Select]], [[Center]]&lt;br /&gt;
&lt;br /&gt;
==What else can this thing do?==&lt;br /&gt;
So, now what? Good question. PyMOL is a powerful program, and everyone uses it for something different. The remainder of this guide is devoted to common tasks that come in handy.&lt;br /&gt;
&lt;br /&gt;
===Saving an image===&lt;br /&gt;
You've found the perfect view, and you'd like to [[Save]] it?&lt;br /&gt;
&lt;br /&gt;
# Change the size of the viewer and zoom in/out to make the image the right size. Images are saved exactly as they appear in the viewer, and the size of the viewer determines the size of the image.&lt;br /&gt;
#* For example, images for printing and presenting should be larger than images for a posting on a website.&lt;br /&gt;
# Because PyMOL was designed to run on older computers, the maximum quality is not enabled by default. To change this, select '''Display''', '''Quality''', '''Maximum Quality'''. Notice that round things are rounder, curves are curvier, and color shading is smoother.&lt;br /&gt;
# Once you've found the appropriate view, save an image using '''File''', '''Save Image...''' An picture of the current view will be saved in PNG format.&lt;br /&gt;
&lt;br /&gt;
'''Tip:''' Using the ''[[ray]]'' command before saving an image will create a higher quality version with shadows, etc. This can take time, depending on the size of the image and speed of the computer, but the images created after ray tracing are usually spectacular. However, the ray tracing disappears if the view is changed in any way.&lt;br /&gt;
&lt;br /&gt;
===Selecting parts of an object===&lt;br /&gt;
Sometimes it might be useful to select part of an object and modify it directly; for example, selecting active-site residues in a protein to highlight them in another color. &lt;br /&gt;
&lt;br /&gt;
In the lower-right corner of the Viewer, next to the animation controls, is an '''S''' button (not to be confused with the '''S'''how button in the object control panel) that activates the selection tool. The selection tool can be changed to select atoms or residues by clicking ''Selecting Residues(or whatever)'' until the right mode appears.&lt;br /&gt;
&lt;br /&gt;
Once selecting is activated, a list of parts to select appears at the top of the Viewer. Select things clicking or dragging across a range.&lt;br /&gt;
&lt;br /&gt;
Selections can be controlled individually in the object control panel, just like any other object. To save a selection, select '''rename''' from the '''A''' menu.&lt;br /&gt;
&lt;br /&gt;
===Whoops: Getting unstuck===&lt;br /&gt;
PyMOL is a program meant to be explored and played with, and sometimes funny things happen in the process. A few common problems:&lt;br /&gt;
&lt;br /&gt;
* ''The model disappeared:'' Sometimes while rotating and moving a model, it can get lost. Right-click the background of the viewer, and select '''reset''' from the ''Main Pop-Up''. The model should return to view; if it doesn't, make sure the object is being drawn using the '''S''' menu.&lt;br /&gt;
* ''The model has funny colors, labels, etc and they won't go away:'' The '''H''' menu in the object control panel will remove unwanted details; however, sometimes it's difficult to know exactly what to remove. Select '''H''', then '''everything''' to hide all details and start fresh.&lt;br /&gt;
* ''Things are really messed up:'' Use '''File''', '''Reinitalize''' to reset PyMOL to its initial state, but all work will be lost.&lt;br /&gt;
&lt;br /&gt;
=== Related Commands ===&lt;br /&gt;
[[Save]], [[Viewport]], [[Zoom]], [[Save]], [[Ray]], [[Select]]&lt;br /&gt;
&lt;br /&gt;
===Saving work===&lt;br /&gt;
PyMOL supports saving your work in various formats.  You can save, images, molecules, sessions, movies, etc.&lt;br /&gt;
&lt;br /&gt;
====Sessions====&lt;br /&gt;
A PymOL sessions retains the state of your PyMOL instance.  You can save the session to disk and reload it later.  You can setup a complicated scene, with transitions and more, and simply save it as a PyMOL Session (.pse) file.  Use, '''File'''=&amp;gt;'''Save Session''' or '''Save Session As...'''.&lt;br /&gt;
&lt;br /&gt;
Loading sessions is just as easy: '''File'''=&amp;gt;'''Load''' and choose your session file.&lt;br /&gt;
&lt;br /&gt;
====Molecules====&lt;br /&gt;
You can save a molecule by selecting '''File'''=&amp;gt;'''Save Molecule'''.  A dialog box will appear from which you can select your molecule to save.  You can also save an object or selection using the [[Save]] command.  It's very easy:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
save  fileName, objSel&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
where fileName is something like &amp;quot;1abc.pdb&amp;quot;, and objSel can be any object or selection.  For example, to save just the waters to disk do:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
save wat.pdb, resn HOH&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Images ====&lt;br /&gt;
You can save images that you've rendered (with [[Ray]]) or drawn (with [[Draw]]) again using the [[Save]] command or by '''File'''=&amp;gt;'''Save Image'''.  You can save in [[Png]], VRML-2 and the POVRay formats.&lt;br /&gt;
&lt;br /&gt;
You can save images to disk, through the command line, by using the [[Png]] command.&lt;br /&gt;
&lt;br /&gt;
==== Movies ====&lt;br /&gt;
PyMOL allows you to save movies you've created, too.  You can automatically save the MPEG or save a series of PNG files--for stitching together later.  This is a new command, and I don't know too much about it.  Use '''File'''=&amp;gt;'''Save Movie'''.&lt;br /&gt;
&lt;br /&gt;
===Scripting===&lt;br /&gt;
====Introduction and Very Simple Scripting====&lt;br /&gt;
Scripting in PyMOL ranges from very simple to very intricate.  You can make a simple loop (say rotating a molecule one-degree at a time) or execute full featured scripts.  Once you've got the basics of PyMOL down, learning scripting will greatly enhance your productivity and capabilities.&lt;br /&gt;
&lt;br /&gt;
Because of the way PyMOL is built on top of the Python interpreter, any command that PyMOL doesn't recognize it passes on to python to execute.  This is a '''very''' handy feature--you essentially have a live Python interpreter you can interact with, which makes your life much easier.  Take the following for example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
f = 10.&lt;br /&gt;
for x in range(0,100,10):&lt;br /&gt;
  cmd.set(&amp;quot;spec_direct_power&amp;quot;, float(float(x) / f))&lt;br /&gt;
  cmd.png(&amp;quot;spec_dir_power&amp;quot; + str(x) + &amp;quot;.png&amp;quot;, ray=1)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This simple script of 4 lines will create 10 images each one with the [[Spec_direct_power]] changed (see the [[Spec_direct_power]] for the output of this script; the animated GIF).  Did you notice that '''f''' on line 1 and '''for''' and '''x''' on line 2 are not PyMOL commands or symbols?  You can simply write Python code that interacts with PyMOL.  Brilliant!&lt;br /&gt;
&lt;br /&gt;
====The Python MiniShell ====&lt;br /&gt;
Taking this one level higher, you can write little code snippets, like 10-20+ lines of code that perform some specific task and wrap these in the '''python''' and '''python end''' commands.  (If your script ever makes a mistake, you can abort the endeavor with '''end''' instead of '''python end'''.  The power here is that none of your command are executed until you type '''python end'''.  Confused?  Here's the above example in using the wrapper:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
python&lt;br /&gt;
f = 10.&lt;br /&gt;
for x in range(0,100,10):&lt;br /&gt;
  cmd.set(&amp;quot;spec_direct_power&amp;quot;, float(float(x) / f))&lt;br /&gt;
  cmd.png(&amp;quot;spec_dir_power&amp;quot; + str(x) + &amp;quot;.png&amp;quot;, ray=1)&lt;br /&gt;
python end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
The [[python]] command gives you complete access to the Python shell &amp;amp; '''python end''' just brings you back into PyMOL's shell.  Also, note that PyMOL saves information across instantiations of the '''python''' command.  For example,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
# enter mini python shell&lt;br /&gt;
python&lt;br /&gt;
ff = 10.&lt;br /&gt;
python end&lt;br /&gt;
&lt;br /&gt;
# no we're back in PyMOL; where PyMOL knows about the value&lt;br /&gt;
print ff&lt;br /&gt;
&lt;br /&gt;
# in the mini shell, Python still knows about ff.&lt;br /&gt;
python &lt;br /&gt;
print ff&lt;br /&gt;
python end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Learning More... ====&lt;br /&gt;
To learn more about scripting check out:&lt;br /&gt;
*[[Simple_Scripting]] introduction&lt;br /&gt;
*[[Advanced_Scripting]] pages&lt;br /&gt;
*[[:Category:Script_Library|Popular Script Library]].&lt;br /&gt;
&lt;br /&gt;
==Coming Soon==&lt;br /&gt;
&lt;br /&gt;
===Logging===&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:States]]&lt;br /&gt;
[[Category:Movies]]&lt;/div&gt;</summary>
		<author><name>Folf</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Label&amp;diff=13844</id>
		<title>Label</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Label&amp;diff=13844"/>
		<updated>2009-07-10T09:44:42Z</updated>

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

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