<?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=Hongbo+zhu</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=Hongbo+zhu"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php/Special:Contributions/Hongbo_zhu"/>
	<updated>2026-07-25T04:39:40Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Windows_Install&amp;diff=14908</id>
		<title>Windows Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Windows_Install&amp;diff=14908"/>
		<updated>2021-04-23T10:50:11Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: reformulate a hyperlink&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how to install PyMOL on Microsoft Windows.&lt;br /&gt;
&lt;br /&gt;
== Incentive PyMOL ==&lt;br /&gt;
&lt;br /&gt;
[http://www.schrodinger.com Schrödinger] provides an installer to paying sponsors (EXE for PyMOL 2.0, MSI for previous version). The bundle also includes ready-to-use [[APBS]], [[morph|RigiMOL]], an MPEG encoder for movie export, and a small molecule energy minimization engine.&lt;br /&gt;
&lt;br /&gt;
Download: https://pymol.org/#download&lt;br /&gt;
&lt;br /&gt;
== Open-Source PyMOL ==&lt;br /&gt;
&lt;br /&gt;
Open-Source PyMOL is available [https://sourceforge.net/p/pymol/code/HEAD/tree/trunk/pymol/LICENSE free of charge]. It also allows sponsors to create highly customized PyMOL installations which might not be possible with the MSI installer.&lt;br /&gt;
&lt;br /&gt;
Pre-compiled Open-Source PyMOL is available free from [http://www.lfd.uci.edu/~gohlke/pythonlibs/#pymol Christoph Gohlke of the Laboratory for Fluorescence Dynamics, University of California, Irvine].&lt;br /&gt;
&lt;br /&gt;
# Install the latest version of Python 3 for Windows (e.g., by going to http://www.python.org/downloads/ and choosing the x64 EXE installer). Use the standard options, which should mean that the installation directory is most likely C:\Users\&amp;lt;Your Username&amp;gt;\AppData\Local\Programs\Python\Python38). Make sure the option to add environment variables is selected.&lt;br /&gt;
# Do install [https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads the current Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019]. Otherwise the installed PyMOL binary may fail to run (without any error message!).  &lt;br /&gt;
# Download the [http://www.lfd.uci.edu/~gohlke/pythonlibs/#pymol-open-source appropriate wheel files], along with all requirement wheel files (including [http://www.lfd.uci.edu/~gohlke/pythonlibs/#pip pip], [http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy Numpy] and [http://www.lfd.uci.edu/~gohlke/pythonlibs/#pmw PMW]) into a single file directory, e.g., &amp;lt;code&amp;gt;C:\Users\&amp;lt;Your Username&amp;gt;\Downloads\PyMOL_installation&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Navigate to the installation directory in a CMD window &amp;lt;source lang = python&amp;gt;cd C:\Users\&amp;lt;Your Username&amp;gt;\Downloads\PyMOL_installation&amp;lt;/source&amp;gt; (or where ever you put the files) and begin the installation using the command: &lt;br /&gt;
&amp;lt;source lang = python&amp;gt;python.exe pip-20.x.x-py2.py3-none-any.whl/pip install --no-index --find-links=&amp;quot;%CD%&amp;quot; pymol_launcher&amp;lt;/source&amp;gt; If your python install is part of your PATH variable, then running (where x refers to the version number of pip): &amp;lt;source lang = python&amp;gt;python pip-20.x.x-py2.py3-none-any.whl/pip install --no-index --find-links=&amp;quot;%CD%&amp;quot; pymol_launcher&amp;lt;/source&amp;gt;&lt;br /&gt;
should suffice. &lt;br /&gt;
&lt;br /&gt;
To update PyMOL update the files in the PyMOL install directory and run: &amp;lt;source lang = python&amp;gt;pip install --upgrade --no-deps pymol.whl&amp;lt;/source&amp;gt; where &amp;lt;code&amp;gt;pymol.whl&amp;lt;/code&amp;gt; is replaced by the PyMOL wheel file name (not the launcher, the launcher should not require updating). To use the newer single-window Qt interface, also install the optional PyQt5 dependency for your Python installation: &amp;lt;source lang=python&amp;gt; pip install pyqt5 &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Extend PyMOL with additional scripts ===&lt;br /&gt;
If you now want to extend the capabilities of PyMOL, and take advantage of all the available plugins+scripts &amp;quot;out there&amp;quot;, then do the following. &amp;lt;br&amp;gt;&lt;br /&gt;
# First install &amp;quot;numpy&amp;quot; as an available module to Python. [http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy Select appropriate installer from here]&lt;br /&gt;
# Download the script/plugin collection [[Git | Pymol-script-repo]] from [https://github.com/Pymol-Scripts/Pymol-script-repo/zipball/master a .zip file from here]&lt;br /&gt;
 git clone https://github.com/Pymol-Scripts/Pymol-script-repo&lt;br /&gt;
# Unpack it to here: '''C:\Python27\Lib\site-packages\pymol\pymol_path\Pymol-script-repo'''   Double check that the folder name is correct and the same.&lt;br /&gt;
Open &amp;quot;Notepad&amp;quot; and write.&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 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;
'''Then &amp;quot;File-&amp;gt;Save as-&amp;gt;All files-&amp;gt; C:\Python27\Lib\site-packages\pymol\pymol_path\run_on_startup.py'''&lt;br /&gt;
&lt;br /&gt;
Now start pymol, and enjoy all the plugins available from the menu.&lt;br /&gt;
&lt;br /&gt;
'''PyMOL''' shortcut&amp;lt;br&amp;gt;&lt;br /&gt;
Make a '''pymol''' directory in your homepath. '''mkdir %HOMEPATH%\pymol'''  Then make sure, PyMOL starts here, when you open the shortcut.&amp;lt;br&amp;gt;&lt;br /&gt;
Make a shortcut to the .cmd file, and modify it. &amp;lt;br&amp;gt;&lt;br /&gt;
Target: C:\python27\PyMOL\pymol.cmd &amp;lt;br&amp;gt;&lt;br /&gt;
Start in: %HOMEPATH%\pymol&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[pymolrc]]&lt;br /&gt;
* [[Linux Install]]&lt;br /&gt;
* [[MAC Install]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation|Windows]]&lt;br /&gt;
[[Category:Technical Issues|Windows Install]]&lt;br /&gt;
[[Category:Windows]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Windows_Install&amp;diff=14907</id>
		<title>Windows Install</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Windows_Install&amp;diff=14907"/>
		<updated>2021-04-23T10:46:57Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: add an important preparation step (VC++) before installation.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes how to install PyMOL on Microsoft Windows.&lt;br /&gt;
&lt;br /&gt;
== Incentive PyMOL ==&lt;br /&gt;
&lt;br /&gt;
[http://www.schrodinger.com Schrödinger] provides an installer to paying sponsors (EXE for PyMOL 2.0, MSI for previous version). The bundle also includes ready-to-use [[APBS]], [[morph|RigiMOL]], an MPEG encoder for movie export, and a small molecule energy minimization engine.&lt;br /&gt;
&lt;br /&gt;
Download: https://pymol.org/#download&lt;br /&gt;
&lt;br /&gt;
== Open-Source PyMOL ==&lt;br /&gt;
&lt;br /&gt;
Open-Source PyMOL is available [https://sourceforge.net/p/pymol/code/HEAD/tree/trunk/pymol/LICENSE free of charge]. It also allows sponsors to create highly customized PyMOL installations which might not be possible with the MSI installer.&lt;br /&gt;
&lt;br /&gt;
Pre-compiled Open-Source PyMOL is available free from [http://www.lfd.uci.edu/~gohlke/pythonlibs/#pymol Christoph Gohlke of the Laboratory for Fluorescence Dynamics, University of California, Irvine].&lt;br /&gt;
&lt;br /&gt;
# Install the latest version of Python 3 for Windows (e.g., by going to http://www.python.org/downloads/ and choosing the x64 EXE installer). Use the standard options, which should mean that the installation directory is most likely C:\Users\&amp;lt;Your Username&amp;gt;\AppData\Local\Programs\Python\Python38). Make sure the option to add environment variables is selected.&lt;br /&gt;
# Do install the current Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019 [https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads]. Otherwise the installed PyMOL binary may fail to run (without any error message!).  &lt;br /&gt;
# Download the [http://www.lfd.uci.edu/~gohlke/pythonlibs/#pymol-open-source appropriate wheel files], along with all requirement wheel files (including [http://www.lfd.uci.edu/~gohlke/pythonlibs/#pip pip], [http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy Numpy] and [http://www.lfd.uci.edu/~gohlke/pythonlibs/#pmw PMW]) into a single file directory, e.g., &amp;lt;code&amp;gt;C:\Users\&amp;lt;Your Username&amp;gt;\Downloads\PyMOL_installation&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Navigate to the installation directory in a CMD window &amp;lt;source lang = python&amp;gt;cd C:\Users\&amp;lt;Your Username&amp;gt;\Downloads\PyMOL_installation&amp;lt;/source&amp;gt; (or where ever you put the files) and begin the installation using the command: &lt;br /&gt;
&amp;lt;source lang = python&amp;gt;python.exe pip-20.x.x-py2.py3-none-any.whl/pip install --no-index --find-links=&amp;quot;%CD%&amp;quot; pymol_launcher&amp;lt;/source&amp;gt; If your python install is part of your PATH variable, then running (where x refers to the version number of pip): &amp;lt;source lang = python&amp;gt;python pip-20.x.x-py2.py3-none-any.whl/pip install --no-index --find-links=&amp;quot;%CD%&amp;quot; pymol_launcher&amp;lt;/source&amp;gt;&lt;br /&gt;
should suffice. &lt;br /&gt;
&lt;br /&gt;
To update PyMOL update the files in the PyMOL install directory and run: &amp;lt;source lang = python&amp;gt;pip install --upgrade --no-deps pymol.whl&amp;lt;/source&amp;gt; where &amp;lt;code&amp;gt;pymol.whl&amp;lt;/code&amp;gt; is replaced by the PyMOL wheel file name (not the launcher, the launcher should not require updating). To use the newer single-window Qt interface, also install the optional PyQt5 dependency for your Python installation: &amp;lt;source lang=python&amp;gt; pip install pyqt5 &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Extend PyMOL with additional scripts ===&lt;br /&gt;
If you now want to extend the capabilities of PyMOL, and take advantage of all the available plugins+scripts &amp;quot;out there&amp;quot;, then do the following. &amp;lt;br&amp;gt;&lt;br /&gt;
# First install &amp;quot;numpy&amp;quot; as an available module to Python. [http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy Select appropriate installer from here]&lt;br /&gt;
# Download the script/plugin collection [[Git | Pymol-script-repo]] from [https://github.com/Pymol-Scripts/Pymol-script-repo/zipball/master a .zip file from here]&lt;br /&gt;
 git clone https://github.com/Pymol-Scripts/Pymol-script-repo&lt;br /&gt;
# Unpack it to here: '''C:\Python27\Lib\site-packages\pymol\pymol_path\Pymol-script-repo'''   Double check that the folder name is correct and the same.&lt;br /&gt;
Open &amp;quot;Notepad&amp;quot; and write.&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 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;
'''Then &amp;quot;File-&amp;gt;Save as-&amp;gt;All files-&amp;gt; C:\Python27\Lib\site-packages\pymol\pymol_path\run_on_startup.py'''&lt;br /&gt;
&lt;br /&gt;
Now start pymol, and enjoy all the plugins available from the menu.&lt;br /&gt;
&lt;br /&gt;
'''PyMOL''' shortcut&amp;lt;br&amp;gt;&lt;br /&gt;
Make a '''pymol''' directory in your homepath. '''mkdir %HOMEPATH%\pymol'''  Then make sure, PyMOL starts here, when you open the shortcut.&amp;lt;br&amp;gt;&lt;br /&gt;
Make a shortcut to the .cmd file, and modify it. &amp;lt;br&amp;gt;&lt;br /&gt;
Target: C:\python27\PyMOL\pymol.cmd &amp;lt;br&amp;gt;&lt;br /&gt;
Start in: %HOMEPATH%\pymol&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[pymolrc]]&lt;br /&gt;
* [[Linux Install]]&lt;br /&gt;
* [[MAC Install]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation|Windows]]&lt;br /&gt;
[[Category:Technical Issues|Windows Install]]&lt;br /&gt;
[[Category:Windows]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Fit&amp;diff=14643</id>
		<title>Fit</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Fit&amp;diff=14643"/>
		<updated>2019-11-12T11:17:42Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: recommend Pair_Fit if atoms do not match&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Fit]] superimposes the model in the first selection on to the model in the second selection.  Only ''matching atoms'' in both selections will be used for the fit. &lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
&lt;br /&gt;
 fit mobile, target [, mobile_state [, target_state [, quiet [, matchmaker [, cutoff [, cycles [, object ]]]]]]]&lt;br /&gt;
&lt;br /&gt;
=== ARGUMENTS ===&lt;br /&gt;
&lt;br /&gt;
* '''mobile''' = string: atom selection&lt;br /&gt;
* '''target''' = string: atom selection&lt;br /&gt;
* '''mobile_state''' = integer: object state {default=0, all states)&lt;br /&gt;
* '''target_state''' = integer: object state {default=0, all states)&lt;br /&gt;
* '''matchmaker''' = integer: how to match atom pairs {default: 0}&lt;br /&gt;
** -1: assume that atoms are stored in the identical order&lt;br /&gt;
** 0/1: match based on all atom identifiers (segi,chain,resn,resi,name,alt)&lt;br /&gt;
** 2: match based on ID&lt;br /&gt;
** 3: match based on rank&lt;br /&gt;
** 4: match based on index (same as -1 ?)&lt;br /&gt;
* '''cutoff''' = float: outlier rejection cutoff (only if cycles&amp;gt;0) {default: 2.0}&lt;br /&gt;
* '''cycles''' = integer: number of cycles in outlier rejection refinement {default: 0}&lt;br /&gt;
* '''object''' = string: name of alignment object to create {default: None}&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fit ( mutant and name ca ), ( wildtype and name ca )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If atom identifiers (like segi, chain, ...) in mobile and target do not match, you need to alter them (or use [[Pair_Fit]] instead):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 1a00, async=0&lt;br /&gt;
extract hbaA, chain A&lt;br /&gt;
extract hbaC, chain C&lt;br /&gt;
# hbaA and hbaC are the same protein, but have different chain identifiers&lt;br /&gt;
alter hbaC, chain='A'&lt;br /&gt;
alter hbaC, segi='A'&lt;br /&gt;
# now both have identical atom identifiers&lt;br /&gt;
fit hbaC, hbaA&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[Rms]], [[Rms_Cur]], [[Intra_Fit]], [[Intra_Rms]], [[Intra_Rms_Cur]], [[Pair_Fit]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Fit]]&lt;br /&gt;
[[Category:Structure_Alignment|Fit]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Fit&amp;diff=14642</id>
		<title>Fit</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Fit&amp;diff=14642"/>
		<updated>2019-11-12T11:13:23Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: highlight usage caveat&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Fit]] superimposes the model in the first selection on to the model in the second selection.  Only ''matching atoms'' in both selections will be used for the fit.&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
&lt;br /&gt;
 fit mobile, target [, mobile_state [, target_state [, quiet [, matchmaker [, cutoff [, cycles [, object ]]]]]]]&lt;br /&gt;
&lt;br /&gt;
=== ARGUMENTS ===&lt;br /&gt;
&lt;br /&gt;
* '''mobile''' = string: atom selection&lt;br /&gt;
* '''target''' = string: atom selection&lt;br /&gt;
* '''mobile_state''' = integer: object state {default=0, all states)&lt;br /&gt;
* '''target_state''' = integer: object state {default=0, all states)&lt;br /&gt;
* '''matchmaker''' = integer: how to match atom pairs {default: 0}&lt;br /&gt;
** -1: assume that atoms are stored in the identical order&lt;br /&gt;
** 0/1: match based on all atom identifiers (segi,chain,resn,resi,name,alt)&lt;br /&gt;
** 2: match based on ID&lt;br /&gt;
** 3: match based on rank&lt;br /&gt;
** 4: match based on index (same as -1 ?)&lt;br /&gt;
* '''cutoff''' = float: outlier rejection cutoff (only if cycles&amp;gt;0) {default: 2.0}&lt;br /&gt;
* '''cycles''' = integer: number of cycles in outlier rejection refinement {default: 0}&lt;br /&gt;
* '''object''' = string: name of alignment object to create {default: None}&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fit ( mutant and name ca ), ( wildtype and name ca )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If atom identifiers (like segi, chain, ...) in mobile and target do not match, you need to alter them:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 1a00, async=0&lt;br /&gt;
extract hbaA, chain A&lt;br /&gt;
extract hbaC, chain C&lt;br /&gt;
# hbaA and hbaC are the same protein, but have different chain identifiers&lt;br /&gt;
alter hbaC, chain='A'&lt;br /&gt;
alter hbaC, segi='A'&lt;br /&gt;
# now both have identical atom identifiers&lt;br /&gt;
fit hbaC, hbaA&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[Rms]], [[Rms_Cur]], [[Intra_Fit]], [[Intra_Rms]], [[Intra_Rms_Cur]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Fit]]&lt;br /&gt;
[[Category:Structure_Alignment|Fit]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Molecular_Sculpting&amp;diff=14309</id>
		<title>Molecular Sculpting</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Molecular_Sculpting&amp;diff=14309"/>
		<updated>2018-05-17T11:25:07Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: put the source of the answer to the beginning.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==What the heck is molecular sculpting?==&lt;br /&gt;
&lt;br /&gt;
Warren DeLano's reply to the question &amp;quot;molecular sculpting&amp;quot; in PyMOL mailing list.[http://www.mail-archive.com/pymol-users@lists.sourceforge.net/msg00359.html ]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
Molecular sculpting works like a real-time energy minimizer, except that it isn't minimizing the energy. Instead, its just trying to return local atomic geometries (bonds, angles, chirality, planarity) to the configuration the molecules possess when they were first loaded into PyMOL.&lt;br /&gt;
&lt;br /&gt;
To actually use this feature:&lt;br /&gt;
&lt;br /&gt;
# Load a PDB file.&lt;br /&gt;
# Configure the mouse for editing (''Mouse'' menu) or click in the mouse/key matrix box.&lt;br /&gt;
# Select ''Sculpting'' from the ''Wizard'' menu. (or: Select ''auto-sculpting'' from the ''Sculpting'' menu.)&lt;br /&gt;
# ''Ctrl-middle-click'' on any atom in your protein to activate sculpting. The green part will be free to move. The cyan part will be a fixed cushion to provide context. The grey part will be excluded.&lt;br /&gt;
# Now perform any conformational editing operation in the green region such as:&lt;br /&gt;
#* ''ctrl-left-click-and-drag'' on an atom&lt;br /&gt;
#* ''ctrl-right-click'' on a bond, then ''ctrl-left-click-and-drag'' about that bond.&lt;br /&gt;
&lt;br /&gt;
You can adjust the radius and cushion using the blue pop-up menus.&lt;br /&gt;
&lt;br /&gt;
Right now I'm not sure the sculpting feature is more than entertainment, but my expectation is that it will become part of PyMOL's crystallographic model building system in the future.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
[[Optimize]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Modeling_and_Editing_Structures|Molecular Sculpting]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Get_Color_Indices&amp;diff=14295</id>
		<title>Get Color Indices</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Get_Color_Indices&amp;diff=14295"/>
		<updated>2018-05-16T14:21:35Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: fix a type&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''get_color_indices''' in combination with '''get_color_tuple''' will retrieve the RGB values for colors.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
print cmd.get_color_indices()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will retrieve the Pymol color names and corresponding internal color indices. The Pymol names can be used to designate color for objects, see [[Color]].  To retrieve a single index for a specific color name, use '''[[get_color_index]]''' instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;print cmd.get_color_tuple(index-number)&amp;lt;/source&amp;gt; will retrieve individual RGB components when ''index-number'' is replaced with one of the color indices from above.&lt;br /&gt;
&lt;br /&gt;
The color index, an integer, gets returned when color is returned while employing [[Iterate]]. You can thus use the  '''get_color_tuple''' command above to convert that to RGB color values if you need to use the colors outside Pymol.&lt;br /&gt;
&lt;br /&gt;
Tangentially related is the fact you can name additional colors,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set_color color-name, [r,b,g]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will create a new color that will appear in the GUI list.  From the&lt;br /&gt;
open-source GUI you can use the &amp;quot;add&amp;quot; button in the color list viewer.&lt;br /&gt;
In MacPyMOL, enter the new name into the MacPyMOL color editor window,&lt;br /&gt;
set the RGBs, and then click Apply.&lt;br /&gt;
See [[Set Color]] for more details and examples.&lt;br /&gt;
The colors created will be added to the end of the list of Pymol's color indices that you can view the '''get_color_indices()''' command.&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# rename a color &lt;br /&gt;
cmd.set_color('myfavoritecolor', cmd.get_color_tuple(cmd.get_color_index('red')))&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Get_color_index]]&lt;br /&gt;
* [[Get_Color_Tuples]]&lt;br /&gt;
* [[Iterate]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Get Color Indices]]&lt;br /&gt;
[[Category:Coloring|Get Color Indices]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Get_Color_Indices&amp;diff=14294</id>
		<title>Get Color Indices</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Get_Color_Indices&amp;diff=14294"/>
		<updated>2018-05-16T14:21:15Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: add an example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''get_color_indices''' in combination with '''get_color_tuple''' will retrieve the RGB values for colors.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
print cmd.get_color_indices()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will retrieve the Pymol color names and corresponding internal color indices. The Pymol names can be used to designate color for objects, see [[Color]].  To retrieve a single index for a specific color name, use '''[[get_color_index]]''' instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;print cmd.get_color_tuple(index-number)&amp;lt;/source&amp;gt; will retrieve individual RGB components when ''index-number'' is replaced with one of the color indices from above.&lt;br /&gt;
&lt;br /&gt;
The color index, an integer, gets returned when color is returned while employing [[Iterate]]. You can thus use the  '''get_color_tuple''' command above to convert that to RGB color values if you need to use the colors outside Pymol.&lt;br /&gt;
&lt;br /&gt;
Tangentially related is the fact you can name additional colors,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set_color color-name, [r,b,g]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will create a new color that will appear in the GUI list.  From the&lt;br /&gt;
open-source GUI you can use the &amp;quot;add&amp;quot; button in the color list viewer.&lt;br /&gt;
In MacPyMOL, enter the new name into the MacPyMOL color editor window,&lt;br /&gt;
set the RGBs, and then click Apply.&lt;br /&gt;
See [[Set Color]] for more details and examples.&lt;br /&gt;
The colors created will be added to the end of the list of Pymol's color indices that you can view the '''get_color_indices()''' command.&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# rename a color &lt;br /&gt;
cmd.set_color('myfavoritecolor', cmd.get_color_tuples(cmd.get_color_index('red')))&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Get_color_index]]&lt;br /&gt;
* [[Get_Color_Tuples]]&lt;br /&gt;
* [[Iterate]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Get Color Indices]]&lt;br /&gt;
[[Category:Coloring|Get Color Indices]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Load_Traj&amp;diff=14249</id>
		<title>Load Traj</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Load_Traj&amp;diff=14249"/>
		<updated>2018-02-22T15:50:21Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: /* Notes */ fix broken link to ptraj: it is now cpptraj!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''load_traj''' loads a trajectory as &amp;quot;states&amp;quot; into an already loaded molecular object.&lt;br /&gt;
&lt;br /&gt;
Since version 1.0, PyMOL uses the [http://www.ks.uiuc.edu/Research/vmd/plugins/molfile/ Molfile Plugin] backend, which supports a variety of trajectory file formats. Older versions only supported the ascii AMBER format (&amp;quot;.trj&amp;quot; file extension).&lt;br /&gt;
&lt;br /&gt;
Loading a large trajectory may take up a lot of RAM, unless the [[defer_builds_mode]] is set to 3.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
load_traj filename [,object [,state [,format [,interval [,average ]&lt;br /&gt;
                   [,start [,stop [,max [,selection [,image [,shift &lt;br /&gt;
                   [, plugin ]&lt;br /&gt;
                   ]]]]]]]]]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
&lt;br /&gt;
* '''filename''' = str: trajectory file path&lt;br /&gt;
* '''object''' = str: name of the molecular object where the trajectory should be appended as states {default: guess from filename}&lt;br /&gt;
* '''state''' = int: object state where to start appending states. To discard the currently loaded coordinates, use ''state=1''. To append new states, use ''state=0'' {default: 0}&lt;br /&gt;
* '''format''' = str: specify file type instead of guessing from file extension (only affects AMBER .trj format, use &amp;quot;plugin&amp;quot; argument for Molfile Plugin types) {default: }&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# topology from PDB file, trajectory from DCD file&lt;br /&gt;
load      sampletrajectory.pdb&lt;br /&gt;
load_traj sampletrajectory.dcd&lt;br /&gt;
&lt;br /&gt;
# gromacs trajectory, using &amp;quot;mytraj&amp;quot; as object name&lt;br /&gt;
load      sampletrajectory.gro, mytraj&lt;br /&gt;
load_traj sampletrajectory.xtc, mytraj&lt;br /&gt;
&lt;br /&gt;
# desmond trajectory&lt;br /&gt;
load      sample-out.cms, mytraj&lt;br /&gt;
load_traj sample_trj/clickme.dtr, mytraj&lt;br /&gt;
&lt;br /&gt;
# playing through states, memory optimized (but eventually slower)&lt;br /&gt;
set defer_builds_mode, 3&lt;br /&gt;
mplay&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
*PyMOL does not know how to wrap the truncated octahedron used by Amber You will need to use the [http://ambermd.org/tutorials/analysis/tutorial0/index.htm cpptraj] program first to do this.&lt;br /&gt;
*The average option is not a running average.  To perform this type of average, use the [[smooth]] command after loading the trajectory file.&lt;br /&gt;
*For quickly viewing Trajectories as a movie, use the [[mset]] command to map each state to a movie frame.&lt;br /&gt;
&lt;br /&gt;
useful notes from the email list:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
http://www.mail-archive.com/pymol-users@lists.sourceforge.net/msg04272.html&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
http://www.mail-archive.com/pymol-users@lists.sourceforge.net/msg10266.html&lt;br /&gt;
&lt;br /&gt;
in one line convert dcd and psf to pdb :&lt;br /&gt;
&lt;br /&gt;
catdcd -o all.pdb -otype pdb -s autopsf.psf -stype psf out.dcd&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[[Load]], [[defer_builds_mode]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Load Traj]]&lt;br /&gt;
[[Category:Performance|Load Traj]]&lt;br /&gt;
[[Category:States|Load Traj]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Mview&amp;diff=14122</id>
		<title>Mview</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Mview&amp;diff=14122"/>
		<updated>2017-10-10T06:51:27Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: /* 360° rotation of a single object */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The [[mview]] command can store and delete movie keyframes.&lt;br /&gt;
&lt;br /&gt;
Keyframes store a view (camera or object position) and optionally the object [[state]] and/or a [[scene]]. Between keyframes, PyMOL will interpolate views and states, allowing for smooth animations.&lt;br /&gt;
&lt;br /&gt;
Before using [[mview]], the movie timeline has to be set up with [[mset]].&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
 mview [ action [, first [, last [, power [, bias&lt;br /&gt;
     [, simple [, linear [, object [, wrap [, hand&lt;br /&gt;
     [, window [, cycles [, scene [, cut [, quiet&lt;br /&gt;
     [, auto [, state [, freeze ]]]]]]]]]]]]]]]]]]&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
&lt;br /&gt;
* '''action''' = str: one of store, clear, reset, purge, interpolate, uninterpolate, reinterpolate, toggle, toggle_interp, smooth {default: store}&lt;br /&gt;
* '''first''' = int: frame number or 0 for current frame {default: 0}&lt;br /&gt;
* '''power''' = float: slow down animation at keyframe (0.0) or not (1.0) {default: 0.0}&lt;br /&gt;
* '''object''' = str: name of object for object keyframes, or empty for global (camera) keyframes {default: }&lt;br /&gt;
* '''scene''' = str: name of scene to store scene with key frame {default: }&lt;br /&gt;
* '''cut''' = float 0.0-1.0: scene switch moment (0.0: beginning of transition, 1.0: end of transition) {default: 0.5}&lt;br /&gt;
* '''auto''' = -1/0/1: if freeze=0, then auto reinterpolate after store, clear, or toggle {default: -1 = use [[movie_auto_interpolate]]}&lt;br /&gt;
* '''state''' = int: if &amp;gt; 0, then store object state {default: 0}&lt;br /&gt;
* '''freeze''' = 0/1: never auto reinterpolate {default: 0}&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Ligand zoom ===&lt;br /&gt;
&lt;br /&gt;
 fetch 1rx1, async=0&lt;br /&gt;
 as cartoon&lt;br /&gt;
 as sticks, organic&lt;br /&gt;
 mset 1x70&lt;br /&gt;
 orient&lt;br /&gt;
 mview store, 1&lt;br /&gt;
 mview store, 70&lt;br /&gt;
 orient organic&lt;br /&gt;
 mview store, 30&lt;br /&gt;
 mview store, 40&lt;br /&gt;
 mplay&lt;br /&gt;
&lt;br /&gt;
=== 360° rotation ===&lt;br /&gt;
&lt;br /&gt;
 fragment ala&lt;br /&gt;
 mset 1x90&lt;br /&gt;
 mview store, 1&lt;br /&gt;
 mview store, 90&lt;br /&gt;
 turn y, 120&lt;br /&gt;
 mview store, 30, power=1.0&lt;br /&gt;
 turn y, 120&lt;br /&gt;
 mview store, 60, power=1.0&lt;br /&gt;
 mplay&lt;br /&gt;
&lt;br /&gt;
=== 360° rotation of a single object ===&lt;br /&gt;
&lt;br /&gt;
 set movie_auto_store, 0&lt;br /&gt;
 fragment ala&lt;br /&gt;
 fragment his&lt;br /&gt;
 translate [10, 0, 0], his&lt;br /&gt;
 zoom&lt;br /&gt;
 mset 1x90&lt;br /&gt;
 mview store, 1, object=his&lt;br /&gt;
 mview store, 90, object=his&lt;br /&gt;
 rotate y, 120, object=his  # keyword &amp;gt;&amp;gt;object&amp;lt;&amp;lt; is absolutely necessary! Otherwise movie will not work.&lt;br /&gt;
 mview store, 30, power=1.0, object=his&lt;br /&gt;
 rotate y, 120, object=his&lt;br /&gt;
 mview store, 60, power=1.0, object=his&lt;br /&gt;
 mplay&lt;br /&gt;
&lt;br /&gt;
=== Object-level state-sweep ===&lt;br /&gt;
&lt;br /&gt;
 load http://pymol.org/tmp/morph.pdb.gz&lt;br /&gt;
 dss&lt;br /&gt;
 as cartoon&lt;br /&gt;
 mset 1x80&lt;br /&gt;
 mview store, 1, object=m, state=1&lt;br /&gt;
 mview store, 30, object=m, state=30&lt;br /&gt;
 mview store, 50, object=m, state=30&lt;br /&gt;
 mview store, 80, object=m, state=1&lt;br /&gt;
 mplay&lt;br /&gt;
&lt;br /&gt;
=== Ligand binding ===&lt;br /&gt;
&lt;br /&gt;
 set movie_auto_store, 0&lt;br /&gt;
 fetch 1rx1, async=0&lt;br /&gt;
 extract ligand, organic&lt;br /&gt;
 as cartoon, 1rx1&lt;br /&gt;
 as sticks, ligand&lt;br /&gt;
 set_view (\&lt;br /&gt;
   0.527486444, -0.761115909, -0.377440333,\&lt;br /&gt;
   0.736519873, 0.631122172, -0.243357301,\&lt;br /&gt;
   0.423434794, -0.149625391, 0.893482506,\&lt;br /&gt;
   0.000059791, -0.000049331, -140.287048340,\&lt;br /&gt;
   34.670463562, 51.407436371, 17.568315506,\&lt;br /&gt;
   111.284034729, 169.290832520, -19.999998093 )&lt;br /&gt;
 mset 1x60&lt;br /&gt;
 mview store, 60, object=ligand&lt;br /&gt;
 translate [10, 0, 0], object=ligand&lt;br /&gt;
 mview store, 1, object=ligand&lt;br /&gt;
 mplay&lt;br /&gt;
&lt;br /&gt;
=== Scene based movie ===&lt;br /&gt;
&lt;br /&gt;
 fragment ala&lt;br /&gt;
 as sticks&lt;br /&gt;
 color blue&lt;br /&gt;
 scene bluesticks, store&lt;br /&gt;
 as spheres&lt;br /&gt;
 color red&lt;br /&gt;
 turn y, 180&lt;br /&gt;
 scene redspheres, store&lt;br /&gt;
 mset 1x60&lt;br /&gt;
 mview store, 1, scene=bluesticks&lt;br /&gt;
 mview store, 30, scene=redspheres&lt;br /&gt;
 mplay&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[mset]]&lt;br /&gt;
* [[frame]]&lt;br /&gt;
* [[mdo]]&lt;br /&gt;
* [[mpng]]&lt;br /&gt;
* [[movie_loop]] setting&lt;br /&gt;
* [[movie_auto_interpolate]] setting&lt;br /&gt;
* [[movie_auto_store]] setting&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands]]&lt;br /&gt;
[[Category:Movies]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Mview&amp;diff=14121</id>
		<title>Mview</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Mview&amp;diff=14121"/>
		<updated>2017-10-10T06:50:58Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: add comments to keyword object&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The [[mview]] command can store and delete movie keyframes.&lt;br /&gt;
&lt;br /&gt;
Keyframes store a view (camera or object position) and optionally the object [[state]] and/or a [[scene]]. Between keyframes, PyMOL will interpolate views and states, allowing for smooth animations.&lt;br /&gt;
&lt;br /&gt;
Before using [[mview]], the movie timeline has to be set up with [[mset]].&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
 mview [ action [, first [, last [, power [, bias&lt;br /&gt;
     [, simple [, linear [, object [, wrap [, hand&lt;br /&gt;
     [, window [, cycles [, scene [, cut [, quiet&lt;br /&gt;
     [, auto [, state [, freeze ]]]]]]]]]]]]]]]]]]&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
&lt;br /&gt;
* '''action''' = str: one of store, clear, reset, purge, interpolate, uninterpolate, reinterpolate, toggle, toggle_interp, smooth {default: store}&lt;br /&gt;
* '''first''' = int: frame number or 0 for current frame {default: 0}&lt;br /&gt;
* '''power''' = float: slow down animation at keyframe (0.0) or not (1.0) {default: 0.0}&lt;br /&gt;
* '''object''' = str: name of object for object keyframes, or empty for global (camera) keyframes {default: }&lt;br /&gt;
* '''scene''' = str: name of scene to store scene with key frame {default: }&lt;br /&gt;
* '''cut''' = float 0.0-1.0: scene switch moment (0.0: beginning of transition, 1.0: end of transition) {default: 0.5}&lt;br /&gt;
* '''auto''' = -1/0/1: if freeze=0, then auto reinterpolate after store, clear, or toggle {default: -1 = use [[movie_auto_interpolate]]}&lt;br /&gt;
* '''state''' = int: if &amp;gt; 0, then store object state {default: 0}&lt;br /&gt;
* '''freeze''' = 0/1: never auto reinterpolate {default: 0}&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Ligand zoom ===&lt;br /&gt;
&lt;br /&gt;
 fetch 1rx1, async=0&lt;br /&gt;
 as cartoon&lt;br /&gt;
 as sticks, organic&lt;br /&gt;
 mset 1x70&lt;br /&gt;
 orient&lt;br /&gt;
 mview store, 1&lt;br /&gt;
 mview store, 70&lt;br /&gt;
 orient organic&lt;br /&gt;
 mview store, 30&lt;br /&gt;
 mview store, 40&lt;br /&gt;
 mplay&lt;br /&gt;
&lt;br /&gt;
=== 360° rotation ===&lt;br /&gt;
&lt;br /&gt;
 fragment ala&lt;br /&gt;
 mset 1x90&lt;br /&gt;
 mview store, 1&lt;br /&gt;
 mview store, 90&lt;br /&gt;
 turn y, 120&lt;br /&gt;
 mview store, 30, power=1.0&lt;br /&gt;
 turn y, 120&lt;br /&gt;
 mview store, 60, power=1.0&lt;br /&gt;
 mplay&lt;br /&gt;
&lt;br /&gt;
=== 360° rotation of a single object ===&lt;br /&gt;
&lt;br /&gt;
 set movie_auto_store, 0&lt;br /&gt;
 fragment ala&lt;br /&gt;
 fragment his&lt;br /&gt;
 translate [10, 0, 0], his&lt;br /&gt;
 zoom&lt;br /&gt;
 mset 1x90&lt;br /&gt;
 mview store, 1, object=his&lt;br /&gt;
 mview store, 90, object=his&lt;br /&gt;
 rotate y, 120, object=his  # keyword &amp;gt;&amp;gt;object&amp;lt;&amp;lt; is absolute necessary! Otherwise his is taken as selection and movie will not work.&lt;br /&gt;
 mview store, 30, power=1.0, object=his&lt;br /&gt;
 rotate y, 120, object=his&lt;br /&gt;
 mview store, 60, power=1.0, object=his&lt;br /&gt;
 mplay&lt;br /&gt;
&lt;br /&gt;
=== Object-level state-sweep ===&lt;br /&gt;
&lt;br /&gt;
 load http://pymol.org/tmp/morph.pdb.gz&lt;br /&gt;
 dss&lt;br /&gt;
 as cartoon&lt;br /&gt;
 mset 1x80&lt;br /&gt;
 mview store, 1, object=m, state=1&lt;br /&gt;
 mview store, 30, object=m, state=30&lt;br /&gt;
 mview store, 50, object=m, state=30&lt;br /&gt;
 mview store, 80, object=m, state=1&lt;br /&gt;
 mplay&lt;br /&gt;
&lt;br /&gt;
=== Ligand binding ===&lt;br /&gt;
&lt;br /&gt;
 set movie_auto_store, 0&lt;br /&gt;
 fetch 1rx1, async=0&lt;br /&gt;
 extract ligand, organic&lt;br /&gt;
 as cartoon, 1rx1&lt;br /&gt;
 as sticks, ligand&lt;br /&gt;
 set_view (\&lt;br /&gt;
   0.527486444, -0.761115909, -0.377440333,\&lt;br /&gt;
   0.736519873, 0.631122172, -0.243357301,\&lt;br /&gt;
   0.423434794, -0.149625391, 0.893482506,\&lt;br /&gt;
   0.000059791, -0.000049331, -140.287048340,\&lt;br /&gt;
   34.670463562, 51.407436371, 17.568315506,\&lt;br /&gt;
   111.284034729, 169.290832520, -19.999998093 )&lt;br /&gt;
 mset 1x60&lt;br /&gt;
 mview store, 60, object=ligand&lt;br /&gt;
 translate [10, 0, 0], object=ligand&lt;br /&gt;
 mview store, 1, object=ligand&lt;br /&gt;
 mplay&lt;br /&gt;
&lt;br /&gt;
=== Scene based movie ===&lt;br /&gt;
&lt;br /&gt;
 fragment ala&lt;br /&gt;
 as sticks&lt;br /&gt;
 color blue&lt;br /&gt;
 scene bluesticks, store&lt;br /&gt;
 as spheres&lt;br /&gt;
 color red&lt;br /&gt;
 turn y, 180&lt;br /&gt;
 scene redspheres, store&lt;br /&gt;
 mset 1x60&lt;br /&gt;
 mview store, 1, scene=bluesticks&lt;br /&gt;
 mview store, 30, scene=redspheres&lt;br /&gt;
 mplay&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[mset]]&lt;br /&gt;
* [[frame]]&lt;br /&gt;
* [[mdo]]&lt;br /&gt;
* [[mpng]]&lt;br /&gt;
* [[movie_loop]] setting&lt;br /&gt;
* [[movie_auto_interpolate]] setting&lt;br /&gt;
* [[movie_auto_store]] setting&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands]]&lt;br /&gt;
[[Category:Movies]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Intra_fit&amp;diff=14042</id>
		<title>Intra fit</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Intra_fit&amp;diff=14042"/>
		<updated>2017-06-12T09:39:09Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
'''intra_fit''' fits all states of an object to an atom selection in the specified state.  It returns the rms values to python as an array.&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
intra_fit (selection),state&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.intra_fit( string selection, int state )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
==== Simple Selection====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
intra_fit ( name ca )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Fitting NMR Ensembles ====&lt;br /&gt;
Warren provided a great example on the PyMOL list.  If the NMR ensemble has all the structures loaded as multiple states (which is the default behavoir (see [[split_states]]) for multimodel PDBs) then we can simply call:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
print cmd.intra_fit(selection, state)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
which will fit all of the other states to the indicated states and return the RMS values as a list.&lt;br /&gt;
&lt;br /&gt;
A simple example is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 1i8e, async=0&lt;br /&gt;
print cmd.intra_fit(&amp;quot;1i8e////CA&amp;quot;, 1)&lt;br /&gt;
&lt;br /&gt;
# results:&lt;br /&gt;
[-1.0, 1.1934459209442139, 1.2950557470321655, 0.71329855918884277,&lt;br /&gt;
0.76704370975494385, 0.78973227739334106, 0.99323123693466187,&lt;br /&gt;
1.0165935754776001, 0.6535714864730835, 0.95591926574707031,&lt;br /&gt;
1.1299723386764526, 0.28637325763702393, 0.69836461544036865,&lt;br /&gt;
0.40816938877105713, 1.1637680530548096]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that a RMS value of -1.0 is returned for the target state.&lt;br /&gt;
&lt;br /&gt;
===PYTHON EXAMPLE===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from pymol import cmd&lt;br /&gt;
rms = cmd.intra_fit(&amp;quot;(name ca)&amp;quot;,1)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===USER EXAMPLES===&lt;br /&gt;
 &lt;br /&gt;
===USER COMMENTS===&lt;br /&gt;
See [[Rms]] for selection caveats for this group of commands.&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[Fit]], [[Rms]], [[Rms_Cur]], [[Intra_Rms]], [[Intra_Rms_Cur]], [[Pair_Fit]], [[Extra_fit]], [[Align]]&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
[[Category:Commands|Intra Fit]]&lt;br /&gt;
[[Category:States|Intra Fit]]&lt;br /&gt;
[[Category:Structure_Alignment|Intra Fit]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Intra_fit&amp;diff=14041</id>
		<title>Intra fit</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Intra_fit&amp;diff=14041"/>
		<updated>2017-06-12T09:38:24Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: add extra_fit to reference&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
'''intra_fit''' fits all states of an object to an atom selection in the specified state.  It returns the rms values to python as an array.&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
intra_fit (selection),state&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.intra_fit( string selection, int state )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
==== Simple Selection====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
intra_fit ( name ca )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Fitting NMR Ensembles ====&lt;br /&gt;
Warren provided a great example on the PyMOL list.  If the NMR ensemble has all the structures loaded as multiple states (which is the default behavoir (see [[split_states]]) for multimodel PDBs) then we can simply call:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
print cmd.intra_fit(selection, state)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
which will fit all of the other states to the indicated states and return the RMS values as a list.&lt;br /&gt;
&lt;br /&gt;
A simple example is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 1i8e, async=0&lt;br /&gt;
print cmd.intra_fit(&amp;quot;1i8e////CA&amp;quot;, 1)&lt;br /&gt;
&lt;br /&gt;
# results:&lt;br /&gt;
[-1.0, 1.1934459209442139, 1.2950557470321655, 0.71329855918884277,&lt;br /&gt;
0.76704370975494385, 0.78973227739334106, 0.99323123693466187,&lt;br /&gt;
1.0165935754776001, 0.6535714864730835, 0.95591926574707031,&lt;br /&gt;
1.1299723386764526, 0.28637325763702393, 0.69836461544036865,&lt;br /&gt;
0.40816938877105713, 1.1637680530548096]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that a RMS value of -1.0 is returned for the target state.&lt;br /&gt;
&lt;br /&gt;
===PYTHON EXAMPLE===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from pymol import cmd&lt;br /&gt;
rms = cmd.intra_fit(&amp;quot;(name ca)&amp;quot;,1)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===USER EXAMPLES===&lt;br /&gt;
 &lt;br /&gt;
===USER COMMENTS===&lt;br /&gt;
See [[Rms]] for selection caveats for this group of commands.&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[Fit]], [[Rms]], [[Rms_Cur]], [[Intra_Rms]], [[Intra_Rms_Cur]], [[Pair_Fit]], [[Extra_Fit]], [[Align]]&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
[[Category:Commands|Intra Fit]]&lt;br /&gt;
[[Category:States|Intra Fit]]&lt;br /&gt;
[[Category:Structure_Alignment|Intra Fit]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Group&amp;diff=13986</id>
		<title>Group</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Group&amp;diff=13986"/>
		<updated>2017-05-04T08:17:15Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: add operation instructions for editing group&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The [[Group]] command creates or updates a &amp;quot;group&amp;quot; object.  The grouped objects are collected underneath a '''+''' sign in the object tree (see images) in the Pymol Internal Gui.&lt;br /&gt;
&lt;br /&gt;
[[Group]] is tremendously helpful with multi-state or multi-structure sessions.  Wildcards work great, for example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# put all of objState into the group &amp;quot;ensemble&amp;quot;.&lt;br /&gt;
group ensemble, objState*&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:group_off.png|Three EF-Hand proteins loaded into PyMOL&lt;br /&gt;
Image:group_on1.png|Applied the group command to the proteins via: &amp;quot;group efHand, *&amp;quot;&lt;br /&gt;
Image:group_on2.png|The plus was clicked and expanded to show the hierarchy of objects.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
group name, members, action&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Creating, opening and closing ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
group efHand, 1cll 1ggz 1sra&lt;br /&gt;
&lt;br /&gt;
# allow addition and removal from the group&lt;br /&gt;
# If a group is open, objects can be added to or removed from &lt;br /&gt;
# it by right-click+drag from the control panel&lt;br /&gt;
group efHand, open&lt;br /&gt;
# disallow addition/removal from the group&lt;br /&gt;
group efHand, close&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== More advanced usage of groups and naming ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# names with dots are treated special&lt;br /&gt;
&lt;br /&gt;
set group_auto_mode, 2&lt;br /&gt;
&lt;br /&gt;
# load the example protein&lt;br /&gt;
&lt;br /&gt;
load $TUT/1hpv.pdb, 1hpv.other&lt;br /&gt;
&lt;br /&gt;
# create the new entry called &amp;quot;.protein&amp;quot; in group 1hpv&lt;br /&gt;
&lt;br /&gt;
extract 1hpv.protein, 1hpv.other and polymer&lt;br /&gt;
&lt;br /&gt;
# create &amp;quot;.ligand in the 1hpv group&lt;br /&gt;
&lt;br /&gt;
extract 1hpv.ligand, 1hpv.other and organic&lt;br /&gt;
&lt;br /&gt;
# supports wildcards&lt;br /&gt;
&lt;br /&gt;
show sticks, *.ligand&lt;br /&gt;
&lt;br /&gt;
hide lines, *.protein&lt;br /&gt;
&lt;br /&gt;
show surface, *.protein within 6 of *.ligand&lt;br /&gt;
&lt;br /&gt;
show lines, byres *.protein within 4 of *.ligand&lt;br /&gt;
&lt;br /&gt;
set two_sided_lighting&lt;br /&gt;
&lt;br /&gt;
set transparency, 0.5&lt;br /&gt;
&lt;br /&gt;
set surface_color, white&lt;br /&gt;
&lt;br /&gt;
# Also, to lexicographically sort the names in the control panel:&lt;br /&gt;
&lt;br /&gt;
order *, yes&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
Group objects can usually be used as arguments to commands.  It can be processed as a group or as a selection, in which case all the atoms from all objects in the group will be used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[[ungroup]] [[order]] [[select]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Group]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Surface_quality&amp;diff=13753</id>
		<title>Surface quality</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Surface_quality&amp;diff=13753"/>
		<updated>2016-10-24T13:56:04Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: link to huge surfaces&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
This controls how well PyMOL draws surfaces.  Lower values, like 0, are rough surface approximations.  These low values are good for speed--especially for larger surfaces.  For rendering of publication quality photos, and truer representations of the biological surface, set the value higher--to something like 2, 3 or 4.  In practice typical values are 1, 2 and 3.&lt;br /&gt;
&lt;br /&gt;
This value, I believe, changes how finely the polygons are sampled for surface representation.  Settings of 2 or 3 are far more computationally intensive to compute and show than are the default and low values.  For example, using a value of 3 took my computer about 2 minutes just to prepare the surface for showing in the PyMOL GUI (this does not include any ray-tracing or rendering).  Lastly, ray tracing surfaces with high quality settings takes much longer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Sqd.png|Surface_quality set to its default&lt;br /&gt;
Image:Sq0.png|Surface_quality turned down&lt;br /&gt;
Image:Sq2.png|Surface_quality turned up high (2).&lt;br /&gt;
&amp;lt;/gallery&amp;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 to some positive integer&lt;br /&gt;
set surface_quality, int&lt;br /&gt;
&lt;br /&gt;
# for example turn up the quality a bit&lt;br /&gt;
set surface_quality, 2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Settings]]&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[Huge surfaces]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Surface&amp;diff=13751</id>
		<title>Surface</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Surface&amp;diff=13751"/>
		<updated>2016-10-24T13:22:11Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: NOTE the coordinate system of saved coordinates&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;
*[[cavity_cull]]&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. Only surface representation can be saved as .obj.&lt;br /&gt;
# NOTE: the coordinates are saved in camera coordinate system.&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;
===Smooth surface quick (blob)===&lt;br /&gt;
To get a quick blob type surface (not as accurate):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set solvent_radius, 4   &lt;br /&gt;
alter all, vdw=4 &lt;br /&gt;
sort&lt;br /&gt;
set surface_quality, 1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Smooth surface accurate (blob)===&lt;br /&gt;
To get an accurate blob type surface:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set surface_quality, 1&lt;br /&gt;
alter all, b=50&lt;br /&gt;
alter all, q=1&lt;br /&gt;
set gaussian_resolution,5&lt;br /&gt;
map_new mapA, gaussian, 1, sele or pdb, 6&lt;br /&gt;
isosurface surfA, mapA&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
'''Notes:''' Set gaussian resolution is variable with a larger number causing a more smooth surface (4 is medium and 8 is very smooth).&lt;br /&gt;
The temperature factor field (b) has at least as much impact as the resolution setting, so increasing b factors is the more computationally efficient way of increasing the blur effect.&lt;br /&gt;
If you are displaying more then one surface in a .pse file you must create a new map for each one (if you have three you will create mapA for the first, mapB for the second and mapC for the third), then you apply an isosurface to each map (isosurface surfA, mapA - isosurface surfB, mapB - isosurface surfC, mapC).&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>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Surface&amp;diff=13750</id>
		<title>Surface</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Surface&amp;diff=13750"/>
		<updated>2016-10-21T14:36:52Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: only surface representation can be saved as .obj&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;
*[[cavity_cull]]&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. Only surface representation can be saved as .obj.&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;
===Smooth surface quick (blob)===&lt;br /&gt;
To get a quick blob type surface (not as accurate):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set solvent_radius, 4   &lt;br /&gt;
alter all, vdw=4 &lt;br /&gt;
sort&lt;br /&gt;
set surface_quality, 1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Smooth surface accurate (blob)===&lt;br /&gt;
To get an accurate blob type surface:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set surface_quality, 1&lt;br /&gt;
alter all, b=50&lt;br /&gt;
alter all, q=1&lt;br /&gt;
set gaussian_resolution,5&lt;br /&gt;
map_new mapA, gaussian, 1, sele or pdb, 6&lt;br /&gt;
isosurface surfA, mapA&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
'''Notes:''' Set gaussian resolution is variable with a larger number causing a more smooth surface (4 is medium and 8 is very smooth).&lt;br /&gt;
The temperature factor field (b) has at least as much impact as the resolution setting, so increasing b factors is the more computationally efficient way of increasing the blur effect.&lt;br /&gt;
If you are displaying more then one surface in a .pse file you must create a new map for each one (if you have three you will create mapA for the first, mapB for the second and mapC for the third), then you apply an isosurface to each map (isosurface surfA, mapA - isosurface surfB, mapB - isosurface surfC, mapC).&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>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=FetchLocal&amp;diff=13655</id>
		<title>FetchLocal</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=FetchLocal&amp;diff=13655"/>
		<updated>2016-10-06T07:27:26Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: add async to cmd.fetch. It was in the API of fetchlocal but not passed to fetch.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
Try fetching local copy of PDB files before going on internet to fetch a remote copy. &lt;br /&gt;
&lt;br /&gt;
Sometimes you have a local copy of the PDB structure files, or [http://www.rcsb.org/pdb/static.do?p=education_discussion/Looking-at-Structures/bioassembly_tutorial.html biological unit] files. They are, however, usually organized into sub-directories (for a good reason). Setting [[Fetch_Path]] to the top directory will not make PyMOL to use local files before go on internet to fetch a remote copy. This script extends the functionality of the PyMOL command [[Fetch]] by searching local sub-directories for target files first. &lt;br /&gt;
&lt;br /&gt;
The search order of the script: 1. local copy of PDB; 2. [[Fetch_Path]]; 3. remote repository ([[Fetch_Host]]).&lt;br /&gt;
&lt;br /&gt;
== Note ==&lt;br /&gt;
The script only copes with &amp;lt;tt&amp;gt;.pdb&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;.pdb1&amp;lt;/tt&amp;gt; (or &amp;lt;tt&amp;gt;.pdb2&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;.pdb3&amp;lt;/tt&amp;gt;, ...) file types.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
See [[Fetch]]&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;
&lt;br /&gt;
&amp;quot;&amp;quot;&amp;quot; 2012_09_18, Hongbo Zhu &amp;lt;hongbo.zhu.cn gmail&amp;gt;&lt;br /&gt;
    DESCRIPTION: Look for pdb* on local disk before fetching remotely.&lt;br /&gt;
&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
import os&lt;br /&gt;
import cmd&lt;br /&gt;
&lt;br /&gt;
#####################&lt;br /&gt;
# user configuration&lt;br /&gt;
localpdbdir = '/your/dir/to/PDB/divided'&lt;br /&gt;
localbudir  = '/your/dir/to/PDB_BU/divided' # set to '' (empty string) if N/A&lt;br /&gt;
&lt;br /&gt;
def fetchlocal(code, name='', state=0, finish=1, discrete=-1,&lt;br /&gt;
               multiplex=-2, zoom=-1, type='pdb', async=-1, path=None,&lt;br /&gt;
               file=None, quiet=1):  &lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot; Default parameters are the same as in function definition for fetch() &lt;br /&gt;
        in file ./modules/pymol/importing.py&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    if type.startswith('pdb'): # pdb files, or biological unit files .pdb1 .pdb2 etc.&lt;br /&gt;
        if type == 'pdb': # pdb files&lt;br /&gt;
            localdir = localpdbdir&lt;br /&gt;
        else:&lt;br /&gt;
            localdir = localbudir&lt;br /&gt;
        for c in string.split(str(code)):&lt;br /&gt;
            subdir = c.lower()[1:3]&lt;br /&gt;
            if type == 'pdb': &lt;br /&gt;
                if os.path.isfile('%s/%s/pdb%s.ent.gz' % (localdir,subdir,c.lower())):&lt;br /&gt;
                    localfn = '%s/%s/pdb%s.ent.gz' % (localdir,subdir,c.lower())&lt;br /&gt;
                elif os.path.isfile('%s/%s/pdb%s.ent' % (localdir,subdir,c.lower())):&lt;br /&gt;
                    localfn = '%s/%s/pdb%s.ent.gz' % (localdir,subdir,c.lower())&lt;br /&gt;
                else:&lt;br /&gt;
                    localfn = None&lt;br /&gt;
            else:             &lt;br /&gt;
                if os.path.isfile('%s/%s/%s.%s.gz' % (localdir,subdir,c.lower(),type)):&lt;br /&gt;
                    localfn =  '%s/%s/%s.%s.gz' % (localdir,subdir,c.lower(),type)&lt;br /&gt;
                elif os.path.isfile('%s/%s/%s.%s' % (localdir,subdir,c.lower(),type)):&lt;br /&gt;
                    localfn = '%s/%s/%s.%s' % (localdir,subdir,c.lower(),type)&lt;br /&gt;
                else:&lt;br /&gt;
                    localfn = None&lt;br /&gt;
&lt;br /&gt;
            if localfn is not None:&lt;br /&gt;
                print 'Load local file instead of fetching from internet: ', localfn &lt;br /&gt;
                cmd.load(filename=localfn, object=name, format='pdb', state=state, &lt;br /&gt;
                         finish=finish, discrete=discrete, multiplex=multiplex, &lt;br /&gt;
                         zoom=zoom, quiet=quiet)&lt;br /&gt;
            else:  # otherwise hand it over to pymol fetch function&lt;br /&gt;
                cmd.fetch(c,name,state,finish,discrete,multiplex,zoom,type,async,path,file,quiet)&lt;br /&gt;
    else:&lt;br /&gt;
        cmd.fetch(code,name,state,finish,discrete,multiplex,zoom,type,async,path,file,quiet)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
cmd.extend('fetchlocal', fetchlocal)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
[[Fetch]], [[Fetch_Path]], [[Fetch_Host]], [[Psico]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:System_Scripts]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=MSMS&amp;diff=12623</id>
		<title>MSMS</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=MSMS&amp;diff=12623"/>
		<updated>2015-03-18T23:02:29Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = plugin&lt;br /&gt;
|filename  = plugins/msms.py&lt;br /&gt;
|author    = [[User:Hongbo_zhu|Hongbo Zhu]]&lt;br /&gt;
|license   = -&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
[http://mgltools.scripps.edu/packages/MSMS/ MSMS] is an excellent tool for computing protein solvent excluded surface (SES). MSMS Plugin for PyMOL provides a graphical user interface for running MSMS and displaying its results in PyMOL. See the original site (not updated anymore) for more details: [http://www.biotec.tu-dresden.de/~hongboz/msms_pymol/msms_pymol.html MSMS Plugin for PyMOL]&lt;br /&gt;
&lt;br /&gt;
Most recent MSMS Plugin code can be obtained from [https://github.com/hongbo-zhu-cn/Pymol-script-repo/blob/master/plugins/msms.py this link].&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
[[File:Example.png|400px|thumb|right|Demonstration of MSMS plugin.]]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Molecular_surface Molecular Surfaces]&lt;br /&gt;
* Most recent code on github: [https://github.com/hongbo-zhu-cn/Pymol-script-repo/blob/master/plugins/msms.py MSMS Plugin for PyMOL @ GitHub]&lt;br /&gt;
* Original site (not updated anymore): [http://www.biotec.tu-dresden.de/~hongboz/msms_pymol/msms_pymol.html MSMS Plugin for PyMOL]&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;br /&gt;
[[Category:Pymol-script-repo]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=MSMS&amp;diff=12622</id>
		<title>MSMS</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=MSMS&amp;diff=12622"/>
		<updated>2015-03-18T23:01:30Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: /* External links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = plugin&lt;br /&gt;
|filename  = plugins/msms.py&lt;br /&gt;
|author    = [[User:Hongbo_zhu|Hongbo Zhu]]&lt;br /&gt;
|license   = -&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
[http://mgltools.scripps.edu/packages/MSMS/ MSMS] is an excellent tool for computing protein solvent excluded surface (SES). MSMS Plugin for PyMOL provides a graphical user interface for running MSMS and displaying its results in PyMOL. &lt;br /&gt;
&lt;br /&gt;
Most recent MSMS Plugin code can be obtained from [https://github.com/hongbo-zhu-cn/Pymol-script-repo/blob/master/plugins/msms.py this link].&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
[[File:Example.png|400px|thumb|right|Demonstration of MSMS plugin.]]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Molecular_surface Molecular Surfaces]&lt;br /&gt;
* Most recent code on github: [https://github.com/hongbo-zhu-cn/Pymol-script-repo/blob/master/plugins/msms.py MSMS Plugin for PyMOL @ GitHub]&lt;br /&gt;
* Original site (not updated anymore): [http://www.biotec.tu-dresden.de/~hongboz/msms_pymol/msms_pymol.html MSMS Plugin for PyMOL]&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;br /&gt;
[[Category:Pymol-script-repo]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=MSMS&amp;diff=12621</id>
		<title>MSMS</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=MSMS&amp;diff=12621"/>
		<updated>2015-03-18T23:00:06Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = plugin&lt;br /&gt;
|filename  = plugins/msms.py&lt;br /&gt;
|author    = [[User:Hongbo_zhu|Hongbo Zhu]]&lt;br /&gt;
|license   = -&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
[http://mgltools.scripps.edu/packages/MSMS/ MSMS] is an excellent tool for computing protein solvent excluded surface (SES). MSMS Plugin for PyMOL provides a graphical user interface for running MSMS and displaying its results in PyMOL. &lt;br /&gt;
&lt;br /&gt;
Most recent MSMS Plugin code can be obtained from [https://github.com/hongbo-zhu-cn/Pymol-script-repo/blob/master/plugins/msms.py this link].&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
[[File:Example.png|400px|thumb|right|Demonstration of MSMS plugin.]]&lt;br /&gt;
* [http://www.netsci.org/Science/Compchem/feature14e.html Molecular Surfaces]&lt;br /&gt;
* Most recent code on github: [https://github.com/hongbo-zhu-cn/Pymol-script-repo/blob/master/plugins/msms.py MSMS Plugin for PyMOL @ GitHub]&lt;br /&gt;
* Original site (not updated anymore): [http://www.biotec.tu-dresden.de/~hongboz/msms_pymol/msms_pymol.html MSMS Plugin for PyMOL]&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;br /&gt;
[[Category:Pymol-script-repo]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=MSMS&amp;diff=12620</id>
		<title>MSMS</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=MSMS&amp;diff=12620"/>
		<updated>2015-03-18T22:59:02Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = plugin&lt;br /&gt;
|filename  = plugins/msms.py&lt;br /&gt;
|author    = [[User:Hongbo_zhu|Hongbo Zhu]]&lt;br /&gt;
|license   = -&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
[http://mgltools.scripps.edu/packages/MSMS/ MSMS] is an excellent tool for computing protein solvent excluded surface (SES). MSMS Plugin for PyMOL provides a graphical user interface for running MSMS and displaying its results in PyMOL. Most recent MSMS Plugin code can be obtained from [https://github.com/hongbo-zhu-cn/Pymol-script-repo/blob/master/plugins/msms.py this link].&lt;br /&gt;
&lt;br /&gt;
The most recent code is maintained by the original author on github: [https://github.com/hongbo-zhu-cn/Pymol-script-repo/blob/master/plugins/msms.py MSMS Plugin for PyMOL @ GitHub]&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
[[File:Example.png|400px|thumb|right|Demonstration of MSMS plugin.]]&lt;br /&gt;
* [http://www.netsci.org/Science/Compchem/feature14e.html Molecular Surfaces]&lt;br /&gt;
* Most recent code on github: [https://github.com/hongbo-zhu-cn/Pymol-script-repo/blob/master/plugins/msms.py MSMS Plugin for PyMOL @ GitHub]&lt;br /&gt;
* Original site (not updated anymore): [http://www.biotec.tu-dresden.de/~hongboz/msms_pymol/msms_pymol.html MSMS Plugin for PyMOL]&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;br /&gt;
[[Category:Pymol-script-repo]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=MSMS&amp;diff=12619</id>
		<title>MSMS</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=MSMS&amp;diff=12619"/>
		<updated>2015-03-18T22:58:42Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = plugin&lt;br /&gt;
|filename  = plugins/msms.py&lt;br /&gt;
|author    = [[User:Hongbo_zhu|Hongbo Zhu]]&lt;br /&gt;
|license   = -&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
[http://mgltools.scripps.edu/packages/MSMS/ MSMS] is an excellent tool for computing protein solvent excluded surface (SES). MSMS Plugin for PyMOL provides a graphical user interface for running MSMS and displaying its results in PyMOL. Most recent MSMS Plugin code can be obtained from [https://github.com/hongbo-zhu-cn/Pymol-script-repo/blob/master/plugins/msms.py this link].&lt;br /&gt;
&lt;br /&gt;
The most recent code is maintained by original author on github: [https://github.com/hongbo-zhu-cn/Pymol-script-repo/blob/master/plugins/msms.py MSMS Plugin for PyMOL @ GitHub]&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
[[File:Example.png|400px|thumb|right|Demonstration of MSMS plugin.]]&lt;br /&gt;
* [http://www.netsci.org/Science/Compchem/feature14e.html Molecular Surfaces]&lt;br /&gt;
* Most recent code on github: [https://github.com/hongbo-zhu-cn/Pymol-script-repo/blob/master/plugins/msms.py MSMS Plugin for PyMOL @ GitHub]&lt;br /&gt;
* Original site (not updated anymore): [http://www.biotec.tu-dresden.de/~hongboz/msms_pymol/msms_pymol.html MSMS Plugin for PyMOL]&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;br /&gt;
[[Category:Pymol-script-repo]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=MSMS&amp;diff=12618</id>
		<title>MSMS</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=MSMS&amp;diff=12618"/>
		<updated>2015-03-18T22:56:52Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = plugin&lt;br /&gt;
|filename  = plugins/msms.py&lt;br /&gt;
|author    = [[User:Hongbo_zhu|Hongbo Zhu]]&lt;br /&gt;
|license   = -&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
[http://mgltools.scripps.edu/packages/MSMS/ MSMS] is an excellent tool for computing protein solvent excluded surface (SES). MSMS Plugin for PyMOL provides a graphical user interface for running MSMS and displaying its results in PyMOL. Most recent MSMS Plugin code can be obtained from [https://github.com/hongbo-zhu-cn/Pymol-script-repo/blob/master/plugins/msms.py this link].&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
[[File:Example.png|400px|thumb|right|Demonstration of MSMS plugin.]]&lt;br /&gt;
* [http://www.netsci.org/Science/Compchem/feature14e.html Molecular Surfaces]&lt;br /&gt;
* Most recent code on github: [https://github.com/hongbo-zhu-cn/Pymol-script-repo/blob/master/plugins/msms.py MSMS Plugin for PyMOL @ GitHub]&lt;br /&gt;
* Original site (not updated anymore): [http://www.biotec.tu-dresden.de/~hongboz/msms_pymol/msms_pymol.html MSMS Plugin for PyMOL]&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;br /&gt;
[[Category:Pymol-script-repo]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Ideas&amp;diff=12024</id>
		<title>Ideas</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Ideas&amp;diff=12024"/>
		<updated>2014-08-21T08:16:38Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: /* More Ideas (Please add your own!) */ add &amp;quot;update selection&amp;quot; feature request.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Ideas for PyMOL Development ===&lt;br /&gt;
&lt;br /&gt;
This page was originally developed for the 2008 Google Summer of Code competition, but seeing as PyMOL wasn't selected, this page can instead serve as a resource for ongoing PyMOL development efforts.&lt;br /&gt;
&lt;br /&gt;
== Where to Start ==&lt;br /&gt;
&lt;br /&gt;
Always start with Python and only delve down into the C code when absolutely necessary.  Although PyMOL is mostly a C-based application, much of the that code is opaque, fragile, and unforgiving. Although C code refactoring is an important project goal, such work may not be ideal since once mistake could potentially to destabilize the entire platform. &lt;br /&gt;
&lt;br /&gt;
Fortunately, the Python interpreter and the PyMOL command and selection languages make it possible to extend PyMOL safely and quickly.  Even when performance is critical, Python should be the interface between external C, C++, and Java code and PyMOL's internal C data structures.&lt;br /&gt;
&lt;br /&gt;
== Choosing a Topic ==&lt;br /&gt;
&lt;br /&gt;
The best open-source code is usually written by an end-users attempting to meet their own pressing needs.  So if you have already have a specific need which relates to PyMOL, then we strongly encourage you to follow up on that first!&lt;br /&gt;
&lt;br /&gt;
If you are looking for ideas,  then try to seek out enhancements and/or integrations that will impact the largest potential user base.  For example, imagine what new things might be useful to virtually all medicinal chemists, all structural biologists, all movie-makers, all paper-writers, and so forth.&lt;br /&gt;
&lt;br /&gt;
The ideas below are organized by category.  Right now, integration with other open-source projects seems like the approach most likely to yield significant benefit, so those ideas are first.&lt;br /&gt;
&lt;br /&gt;
== Integration Ideas (Linking Out to Useful Open-Source Tools) ==&lt;br /&gt;
&lt;br /&gt;
In most cases, depending on the need, integration can be accomplished through standalone Python scripts, through new PyMOL commands, through PyMOL Wizards, or via Tkinter plugins.&lt;br /&gt;
&lt;br /&gt;
* APBS (electrostatics calculations):  Improve the existing plugin. Michael Lerner is currently leading this effort.  See [[APBS]]&lt;br /&gt;
:: yea ([[User:Inchoate|Tree]] [[User:Jedgold|Jedgold]] [[User:Vcpmartin|Vcpmartin]] [[User:Siderator|Siderator]] [[User:Tstout|tstout]]) / nay (0)&lt;br /&gt;
:: Feel free to mention specific plugin enhancements you'd like! [[User:Mglerner|Michael Lerner]]&lt;br /&gt;
* RDKit (cheminformatics, depiction, UFF cleanup, etc.):  Lots of potential here, however C++ coding may be necessary for more advanced integration tasks. [http://www.rdkit.org RDKit home]&lt;br /&gt;
:: yea ([[User:Markvanraaij|Markvanraaij]]) / nay (0)&lt;br /&gt;
* GIMP (image manipulation):  Streamline &amp;amp; document the process of exporting images from PyMOL into GIMP and preparing them for submission to scientific Journals.&lt;br /&gt;
:: yea (0) / nay (0)&lt;br /&gt;
* Jmol (publishing visualizations inside of web pages): Liason between PyMOL &amp;amp; Jmol projects to develop a shared molecular visualization data model compatible with both applications (meaning, being able to import/export sessions from one to the other).&lt;br /&gt;
:: yea ([[User:Tstout|tstout]] [[User:Slaw|slaw]]) / nay ([[User:Cowsandmilk|Cowsandmilk]])&lt;br /&gt;
* Firefox (plugin): Develop an PyMOL plugin compatible with Firefox.&lt;br /&gt;
:: yea ([[User:Vvostri|Vvostri]] [[User:assaff|assaff]] [[User:Slaw|slaw]]) / nay ([[User:Tstout|tstout]])&lt;br /&gt;
* MMTK (molecular mechanics -- Python/flexible):  Develop the ability to round-trip molecular systems from PyMOL, into MMTK, and back.&lt;br /&gt;
:: yea (0) / nay (0)&lt;br /&gt;
* GROMACS (molecular mechanics -- C/fast) - Maybe some ideas can be shared with this guy. [http://www.kde-apps.org/content/show.php/Gromacs+GUI+?content=47665 Gromacs GUI]&lt;br /&gt;
:: yea ([[User:Jedgold|Jedgold]] [[User:Mglerner|Michael Lerner]]) / nay (0)&lt;br /&gt;
* OpenOffice (escape Microsoft hegemony): Develop an PyMOL plugin.&lt;br /&gt;
:: yea (0) / nay (0)&lt;br /&gt;
* IPython integration (interactive shell): a robust alternative to the PyMOL command line?&lt;br /&gt;
:: yea ([[User:Cowsandmilk|Cowsandmilk]] [[User:assaff|assaff]]) / nay (0)&lt;br /&gt;
* R (statistics): PyMOL a 3D viewer environment for visualizating &amp;amp; manipulating large statistical data sets?&lt;br /&gt;
:: yea (0) / nay (0)&lt;br /&gt;
&lt;br /&gt;
Are there other key open-source packages we might specifically target for integration with PyMOL, either through GSoC or beyond?&lt;br /&gt;
&lt;br /&gt;
== High-Level Enhancement Ideas (Mostly Python-oriented) ==&lt;br /&gt;
&lt;br /&gt;
* Work on [[#More Ideas (Please add your own!)| MolViz]]&lt;br /&gt;
:: yea (0) / nay (0)&lt;br /&gt;
* Develop new plugins which automate routine tasks.&lt;br /&gt;
:: yea ([[User:Vvostri|Vvostri]]) / nay (0)&lt;br /&gt;
* Improve the Python API documentation.&lt;br /&gt;
:: yea ([[User:Cowsandmilk|Cowsandmilk]] [[User:Slaw|slaw]]) / nay (0)&lt;br /&gt;
* Flesh out the new &amp;quot;from pymol2 import PyMOL&amp;quot; instance-based PyMOL API.&lt;br /&gt;
:: yea (0) / nay (0)&lt;br /&gt;
* Develop alternate Tkinter &amp;quot;skins&amp;quot; (for custom OEM-like applications).&lt;br /&gt;
:: yea (0) / nay (0)&lt;br /&gt;
* Develop a Tkinter/TOGL widget which holds a PyMOL viewer instance.&lt;br /&gt;
:: yea (0) / nay (0)&lt;br /&gt;
* Develop a PyQt widget which holds a PyMOL viewer instance.&lt;br /&gt;
:: yea ([[User:Cowsandmilk|Cowsandmilk]]) / nay (0)&lt;br /&gt;
* Create a plugin-manager GUI in the style of Firefox, Rythmbox, Gedit, Eclipse. A GUI where it is easy to turn off/on plugins, configure them and see help-contents for them. Maybe also some way to paste a url to install a new Plugin.&lt;br /&gt;
:: yea ([[User:Vvostri|Vvostri]], [[User:Tstout|tstout]]) / nay (0)&lt;br /&gt;
* Add a plugin for a GUI window with the same functionality as the &amp;quot;Control Panel&amp;quot; window in SwissPDB Viewer.&lt;br /&gt;
:: yea ([[User:Vvostri|Vvostri]]) / nay (0)&lt;br /&gt;
* Extend and modify the PyMOL command language so as to be compatible with existing RasMol and/or Jmol scripts.&lt;br /&gt;
:: yea ([[User:Tstout|tstout]]) / nay ([[User:Cowsandmilk|Cowsandmilk]] [[User:Slaw|slaw]])&lt;br /&gt;
* Enhance the Mutagenesis Wizard in order to support Nucleic acids and/or Sugars.&lt;br /&gt;
:: yea ([[User:Lucajovine|Luca Jovine]] [[User:Slaw|slaw]]) / nay (0)&lt;br /&gt;
* Better tab completion for commands&lt;br /&gt;
:: yea ([[User:Cowsandmilk|Cowsandmilk]] [[User:Tstout|tstout]] [[User:Slaw|slaw]]) /nay(0)&lt;br /&gt;
&lt;br /&gt;
== Low-Level Enhancement Ideas (Mostly C-oriented) ==&lt;br /&gt;
&lt;br /&gt;
* Enable editing of displayed sequence alignments.&lt;br /&gt;
:: yea ([[User:Jedgold|Jedgold]], [[User:Aschreyer|Aschreyer]], [[User:Lucajovine|Luca Jovine]], [[User:Slaw|slaw]], [[User:Speleo3|Speleo3]]) / nay (0)&lt;br /&gt;
::: Would this then feed back to the structural alignment? [[User:Jedgold|Jedgold]]&lt;br /&gt;
::: A search function in the sequence would also be nice. [[User:Siderator|Carsten Schubert]]&lt;br /&gt;
* Add multi-line textual annotations&lt;br /&gt;
:: yea (0) / nay (0)&lt;br /&gt;
* Support additional annotation object including: arrow, lines, and blobs.&lt;br /&gt;
:: yea ([[User:Aschreyer|Aschreyer]], [[User:Vvostri|Vvostri]]) / nay (0)&lt;br /&gt;
* Add display of secondary structure into the sequence viewer.&lt;br /&gt;
:: yea ([[User:Lucajovine|Luca Jovine]], [[User:Tstout|tstout]]) / nay (0)&lt;br /&gt;
* Enable per-object Z clipping (especially in the ray tracer)&lt;br /&gt;
:: yea ([[User:Gregori|Gregori]], [[User:Xevi|Xevi]], [[User:Johnm|Johnm]], [[User:Siderator|Carsten Schubert]], [[User:Tstout|tstout]]) / nay (0)&lt;br /&gt;
::: I would go a step further with fully customizable selection-based clipping planes (XYZ, color and transparency) ([[User:Gregori|Gregori]])&lt;br /&gt;
* Highlight H-bonds, salt bridges, Pi-stacking, Pi-cations, etc.&lt;br /&gt;
:: yea ([[User:Lucajovine|Luca Jovine]], [[User:Siderator|Carsten Schubert]], [[User:Jaredsampson|Jared Sampson]]) / nay (0)&lt;br /&gt;
* Build in a simple forcefield and energy minimizer suitable for use with Mutagenesis. [[optimize|optimize]]&lt;br /&gt;
:: yea ([[User:Lucajovine|Luca Jovine]]) / nay (0)&lt;br /&gt;
* Incorporate a suite of standard NMR visualizations (restraint violations, per-residue RMS, etc.)&lt;br /&gt;
:: yea ([[User:Vvostri|Vvostri]], [[User:Vcpmartin|Vcpmartin]], [[User:Rpetrenko|rpetrenko]], [[User:SteffenG|SteffenG]]) / nay (0)&lt;br /&gt;
* Enumeration and display of low-energy conformers. see [[optimize|optimize]]&lt;br /&gt;
:: yea ([[User:Jedgold|Jedgold]]) / nay (0)&lt;br /&gt;
::: This could be done by integrating RDKit, I think. [[User:Aschreyer|Aschreyer]]&lt;br /&gt;
* Automated structure grafting (poor-man's homology modeling).&lt;br /&gt;
:: yea ([[User:Tstout|tstout]]) / nay ([[User:Jedgold|Jedgold]], [[User:Cowsandmilk|Cowsandmilk]]])&lt;br /&gt;
::: Perhaps a plugin to Modeller instead? ([[User:Jedgold|Jedgold]], [[User:Lucajovine|Luca Jovine]])&lt;br /&gt;
* Import of alignment files.&lt;br /&gt;
:: yea ([[User:Jedgold|Jedgold]], [[User:Lucajovine|Luca Jovine]]) / nay (0)&lt;br /&gt;
* Implement IMD (Interactive Molecular Dynamics) Interface, see http://www.ks.uiuc.edu/Research/vmd/imd/&lt;br /&gt;
:: yea ( [[User:Slaw|slaw]]) / nay (0)&lt;br /&gt;
* Add buttons for '''Set ChainID''' and '''Renumber Residues From...''' to Edit menu or Actions (wrapper around Alter command)&lt;br /&gt;
:: yea ([[User:Sheehanj|Sheehanj]], [[User:Tstout|tstout]]) / nay (0)&lt;br /&gt;
&lt;br /&gt;
== Difficult C-level Code Refactoring Ideas ==&lt;br /&gt;
&lt;br /&gt;
* Assemble a test suite which thoroughly exercises the existing code (a prerequisite to major refactoring).&lt;br /&gt;
:: yea ([[User:Cowsandmilk|Cowsandmilk]],[[User:Karo|Karo]]) / nay (0)&lt;br /&gt;
* Catch &amp;amp; handle memory-allocation failures gracefully (instead of crashing).&lt;br /&gt;
:: yea ([[User:Cowsandmilk|Cowsandmilk]]) / nay (0)&lt;br /&gt;
* Replace PyMOL's memory management &amp;amp; custom containers with a simple runtime object model.&lt;br /&gt;
:: yea (0) / nay (0)&lt;br /&gt;
* Separate the View and the Controllers from the Model so that they can all run asynchronously (on multiple cores).&lt;br /&gt;
:: yea ([[User:Vvostri|Vvostri]]) / nay (0)&lt;br /&gt;
* Enable generalized undo of changes made to the Model.&lt;br /&gt;
:: yea ([[User:Vvostri|Vvostri]]&amp;quot;[[User:Vcpmartin|Vcpmartin]], [[User:Lucajovine|Luca Jovine]]&amp;quot;, [[User:Cowsandmilk|Cowsandmilk]]) / nay (0)&lt;br /&gt;
* Clean up the internal matrix handling code.&lt;br /&gt;
:: yea ([[User:Cowsandmilk|Cowsandmilk]],[[User:Karo|Karo]]) / nay (0)&lt;br /&gt;
&lt;br /&gt;
== Ideas Involving Proprietary APIs ==&lt;br /&gt;
&lt;br /&gt;
Since these involve closed-source APIs and infrastructure, they aren't suitable for open-source development efforts.  However, such requests are noted here for the sake of complete coverage.&lt;br /&gt;
&lt;br /&gt;
* Create a Windows port with &amp;quot;native&amp;quot; look &amp;amp; feel. &amp;lt;- Could this be done in PyQT or PyGTK?. Then it would look &amp;quot;native&amp;quot;, but be cross-platform and not proprietary.&lt;br /&gt;
:: yea (0) / nay ( [[User:Slaw|slaw]])&lt;br /&gt;
* Integrate directly via Mathematica via MathLink.&lt;br /&gt;
:: yea (0) / nay ([[User:Aschreyer|Aschreyer]])&lt;br /&gt;
* Further enhance JyMOL (Java-JNI/wrapped PyMOL)&lt;br /&gt;
:: yea ([[User:Inchoate|Tree]], [[User:Cowsandmilk|Cowsandmilk]]  [[User:Slaw|slaw]]) / nay (0)&lt;br /&gt;
* Integrate with Matlab.&lt;br /&gt;
:: yea (0) / nay ([[User:Aschreyer|Aschreyer]])&lt;br /&gt;
* Quicklook Plugin on the Mac&lt;br /&gt;
:: yea ([[User:Cowsandmilk|Cowsandmilk]]) / nay (0)&lt;br /&gt;
&lt;br /&gt;
== Ideas for Plugin Developers ==&lt;br /&gt;
&lt;br /&gt;
The range of things that PyMOL plugins can do has grown by leaps and bounds over the last several years. It may be time for some new infrastructure to facilitate plugin development.&lt;br /&gt;
&lt;br /&gt;
* Plugins that span multiple files. This means 1. the ability to have them 2. the ability for users to easily install them.&lt;br /&gt;
:: yea (1) / nay (0) ([[User:Mglerner|Michael Lerner]])&lt;br /&gt;
* Config files that persist between sessions. This would be useful for things like remembering the locations of external programs, etc., without requiring the user to modify their .pymolrc.&lt;br /&gt;
:: yea (1) / nay (0) ([[User:Mglerner|Michael Lerner]])&lt;br /&gt;
* Restart PyMOL. After installing a plugin, PyMOL needs to be restarted to use the plugin. This is tedious when testing plugins under development. &lt;br /&gt;
:: yea (1) /nay (0) ([[User:Hongbo zhu|Hongbo Zhu]])&lt;br /&gt;
&lt;br /&gt;
== More Ideas (Please add your own!) ==&lt;br /&gt;
* I often need to &amp;quot;replicate&amp;quot; previously PyMOL-made figures using newer coordinates/structures.  It would be a big help (to me), if PyMOL could produce an exported text file from the old PyMOL .pse file of graphical settings that I could then modify and apply as a pymol script to the new structure -- I'm thinking of something like an old-style MOLSCRIPT.INP file...&lt;br /&gt;
:: yea ([[User:Tstout|tstout]]) / nay (0)&lt;br /&gt;
 &lt;br /&gt;
* [http://molviz.cs.toronto.edu/molviz MolViz] is a project to incorporate head tracking input into [http://pymol.sourceforge.net/ PyMol]. This is accomplished through a [[ImmersiveViz]] script written in Python to control the molecule's position using the existing [http://www.pymolwiki.org/index.php/Category:Commands PyMol API]. Related projects would include:&lt;br /&gt;
** Improving the existing [[ImmersiveViz]] PyMol plugin for more precise control of the environment.&lt;br /&gt;
** Developing new input drivers for the Wiimote form of control. This would require some bluetooth hacking.&lt;br /&gt;
** Implementing some other forms of input for head tracking, such as fisheye head tracking, IR webcam tracking, etc (refer to the end of this [[http://www.youtube.com/watch?v=ncShaY4VSac video]] for a better description).&lt;br /&gt;
:: yea (0) / nay (0)&lt;br /&gt;
* Provide a 2D chemical depiction of the current 3D view.&lt;br /&gt;
:: yea ([[User:Aschreyer|Aschreyer]], [[User:Cowsandmilk|Cowsandmilk]]) / nay ([[User:Tstout|tstout]])&lt;br /&gt;
::: RDKit?&lt;br /&gt;
* Spreadsheet view with additional information (e.g. IC50's).&lt;br /&gt;
:: yea ([[User:Aschreyer|Aschreyer]]) / nay ([[User:Cowsandmilk|Cowsandmilk]])&lt;br /&gt;
* Create additional documentation, screen casts, &amp;amp; tutorials.&lt;br /&gt;
:: yea ([[User:Markvanraaij|Markvanraaij]] [[User:Tstout|tstout]] [[User:Slaw|slaw]]) / nay (0)&lt;br /&gt;
* Export 3D PDF images.&lt;br /&gt;
:: yea ([[User:Vvostri|Vvostri]], [[User:Lucajovine|Luca Jovine]], [[User:Tstout|tstout]]  [[User:Slaw|slaw]]) / nay ([[User:Cowsandmilk|Cowsandmilk]])&lt;br /&gt;
* Add extra &amp;quot;Single Word Selectors&amp;quot; like &amp;quot;nucleic&amp;quot;, &amp;quot;protein&amp;quot;, &amp;quot;water&amp;quot;, &amp;quot;ions&amp;quot;, &amp;quot;backbone&amp;quot; (for nucleic acids or proteins), &amp;quot;mainchain&amp;quot;, &amp;quot;sidechain&amp;quot;&lt;br /&gt;
:: yea ( [[User:Slaw|slaw]]) / nay (0)&lt;br /&gt;
* Add functionality that allows you to select atoms based on their location (i.e. select (x_coordinate &amp;lt; 10) and (z_coordinate &amp;gt; 0))&lt;br /&gt;
:: yea (0) / nay (0)&lt;br /&gt;
* Implemented: &amp;lt;strike&amp;gt;set pdb_mirror option to use PDB mirrors other than RCSB for fetching structures (PDBe, PDBj); the EBI mirror is much faster from Europe for example.&amp;lt;/strike&amp;gt;&lt;br /&gt;
:: yea ([[User:Aschreyer|Aschreyer]], [[User:Tstout|tstout]]) / nay (0)&lt;br /&gt;
:: There is already a [[Fetch_Host|fetch_host]] setting --[[User:Speleo3|Speleo3]] 17:05, 29 October 2010 (UTC)&lt;br /&gt;
* have the ability to link the TK console to the viewer so that users don't have to constantly alt+tab between what they want&lt;br /&gt;
:: yea (0) / nay (0)&lt;br /&gt;
* have the ability to disable typing in the viewer and automatically type in the TK console (I like being able to cut/paste/home/end)&lt;br /&gt;
:: yea ([[User:Lucajovine|Luca Jovine]]) / nay (0)&lt;br /&gt;
* I see a lot of &amp;quot;can pymol do this&amp;quot; threads - any ideas of a good UI for a page of &amp;quot;things PyMOL can do?&amp;quot;&lt;br /&gt;
:: yea (0) / nay (0)&lt;br /&gt;
* make an option where I can turn on a coordinate grid - perhaps an object that is a cuboid grid around any object in the view so I can still alter how it's rendered?&lt;br /&gt;
:: yea (0) / nay (0)&lt;br /&gt;
* iPhone / Nexus One app(s)&lt;br /&gt;
:: yea (0) / nay ( [[User:Slaw|slaw]])&lt;br /&gt;
* single-color bonds between nonidentical or any spherical atoms colored specifically&lt;br /&gt;
:: yea (0) / nay (0)&lt;br /&gt;
* double bonds as two parallel cylinders&lt;br /&gt;
:: yea ([[User:Vvostri|Vvostri]]) / nay (0)&lt;br /&gt;
* export scenes as [http://www.khronos.org/webgl/ WebGL] / Could make mobile apps, presentation plugins obsolete&lt;br /&gt;
:: yea ([[User:Aschreyer|Aschreyer]], [[User:Cowsandmilk|Cowsandmilk]], [[User:Tstout|tstout]]) / nay (0)&lt;br /&gt;
* export images in vector format&lt;br /&gt;
:: yea ([[User:Vvostri|Vvostri]], [[User:Lucajovine|Luca Jovine]], [[User:Aschreyer|Aschreyer]], [[User:Tstout|tstout]] [[User:Slaw|slaw]] ) / nay (0)&lt;br /&gt;
* Keynote plugin&lt;br /&gt;
:: yea ([[User:Lucajovine|Luca Jovine]]) / nay (0)&lt;br /&gt;
* Electron density contour sliders (plugin: [[isoslider]])&lt;br /&gt;
:: yea ([[User:Lucajovine|Luca Jovine]], [[User:Tstout|tstout]], [[User:Siderator|Carsten Schubert]]) / nay (0)&lt;br /&gt;
::: May be even map the contouring level onto the wheel [[User:Siderator|Carsten Schubert]]&lt;br /&gt;
* Implemented: &amp;lt;strike&amp;gt;Internal support for FFT, i.e. reading of map coefficients&amp;lt;/strike&amp;gt;&lt;br /&gt;
:: yea ([[User:Siderator|Carsten Schubert]], [[User:Tstout|tstout]], [[User:Lucajovine|Luca Jovine]]) / nay (0)&lt;br /&gt;
* Implemented: &amp;lt;strike&amp;gt;Automatic electron density map generation from PDB mmcif files or user-supplied MTZ files&amp;lt;/strike&amp;gt;&lt;br /&gt;
:: yea ([[User:Lucajovine|Luca Jovine]], [[User:Aschreyer|Aschreyer]], [[User:Johnm|Johnm]],[[User:Siderator|Carsten Schubert]], [[User:Tstout|tstout]]) / nay (0)&lt;br /&gt;
* Display of crystallographic symmetry and NCS axes, with possibility of showing symbols indicating what kind of axes they are&lt;br /&gt;
:: yea ([[User:Lucajovine|Luca Jovine]], [[User:Tstout|tstout]], [[User:Siderator|Carsten Schubert]]) / nay (0)&lt;br /&gt;
::: Support for labeling cell axes and origin, etc... [[User:Siderator|Carsten Schubert]], [[User:Lucajovine|Luca Jovine]]&lt;br /&gt;
* Automatic symmetry expansion to show overall crystal packing; automatic generation of scenes showing crystal packing interface details&lt;br /&gt;
:: yea ([[User:Lucajovine|Luca Jovine]], [[User:Tstout|tstout]], [[User:Siderator|Carsten Schubert]]) / nay (0)&lt;br /&gt;
* Update selections automatically: add a new option to selection action drop-down menu called &amp;quot;update&amp;quot;. It will re-evaluate the selection expression and update the content of the selection automatically.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Displaying_Biochemical_Properties&amp;diff=12022</id>
		<title>Displaying Biochemical Properties</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Displaying_Biochemical_Properties&amp;diff=12022"/>
		<updated>2014-08-21T07:57:14Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: /* Hydrogen bonds where find-&amp;gt;polar contacts doesn't do what you need */  remove broken links to Gareth Stockwell's page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Selecting secondary structures==&lt;br /&gt;
A few examples:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
select helix, (ss h)&lt;br /&gt;
select sheet, (ss s)&lt;br /&gt;
select loop, (ss l+'')&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Manually Assigning Secondary Structure===&lt;br /&gt;
You can manually assign secondary stuctures to your protein by&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
alter 96-103/, ss='S'&lt;br /&gt;
alter 96-103/, ss='H'&lt;br /&gt;
alter 96-103/, ss='L'&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to set residues 96-103 to beta Strand, alpha Helix, and Loop respectively.&lt;br /&gt;
&lt;br /&gt;
===See Also===&lt;br /&gt;
[[DSSP]] [[Dss]] [[Caver]]&lt;br /&gt;
&lt;br /&gt;
[[:Category:FAQ|FAQ]] [[:Category:Objects_and_Selections|Displaying Biochemical Properties]]&lt;br /&gt;
&lt;br /&gt;
==Coloring ==&lt;br /&gt;
See also [[:Category:Coloring]].  &lt;br /&gt;
&lt;br /&gt;
===Color by atom type from a script===&lt;br /&gt;
See [[Color]] for this.&lt;br /&gt;
&lt;br /&gt;
===Assign color by B-factor===&lt;br /&gt;
See section [[Color]] for this.&lt;br /&gt;
&lt;br /&gt;
===Representation-independent color control===&lt;br /&gt;
See section [[Surface#Representation-independent Color Control]].&lt;br /&gt;
&lt;br /&gt;
== Bonds ==&lt;br /&gt;
PyMOL can deduce bonds from the PDB structure file, even if the '''CONECT''' records are missing.  In fact, PyMOL guesses bonding connectivity based on proximity, based on the empirical observation that two atoms of a given radius will not be generally closer than a certain distance unless they are bonded.&lt;br /&gt;
&lt;br /&gt;
===Displaying double bonds===&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;300px&amp;quot; heights=&amp;quot;300px&amp;quot;&amp;gt;&lt;br /&gt;
Image:DoubleBonds.png|Image showing double bonds in PyMOL.  Double bonds are supported in [[lines]] and [[sticks]].&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can go into the [[lines]] mode and turning on the valence display:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
hide&lt;br /&gt;
as lines&lt;br /&gt;
set valence, 0.1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A higher value for valence spreads things out more. See the [[Valence]] page for more information on options for changing the appearance of the valence lines.&lt;br /&gt;
&lt;br /&gt;
===Hydrogen bonds and Polar Contacts===&lt;br /&gt;
&lt;br /&gt;
[[Image:Polar_contacts_small.png|thumb|Polar Contacts in PyMol|center|300px]]&lt;br /&gt;
Using the actions [A] button for an object or selection you can display Hydrogen bonds and Polar Contacts.&lt;br /&gt;
[A]-&amp;gt;find-&amp;gt;polar contacts-&amp;gt;&amp;lt;select from menu&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The command behind the menus is the &amp;lt;b&amp;gt;dist&amp;lt;/b&amp;gt;ance command called with the additional argument mode=2.&lt;br /&gt;
&lt;br /&gt;
Parameters that control the the identification of H-bonds are defined as&lt;br /&gt;
 set h_bond_cutoff_center, 3.6&lt;br /&gt;
with ideal geometry and&lt;br /&gt;
 set h_bond_cutoff_edge, 3.2&lt;br /&gt;
with minimally acceptable geometry.&lt;br /&gt;
&lt;br /&gt;
These settings can be changed *before* running the detection process (dist&lt;br /&gt;
command mode=2 or via the menus).&lt;br /&gt;
&lt;br /&gt;
Note that the hydrogen bond geometric criteria used in PyMOL was designed to&lt;br /&gt;
emulate that used by [http://swift.cmbi.kun.nl/gv/dssp/ DSSP].&lt;br /&gt;
&lt;br /&gt;
==== Hydrogen bonds between specific atoms ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
dist name, sele1, sele2, mode=2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Hydrogen bonds where find-&amp;gt;polar contacts doesn't do what you need ====&lt;br /&gt;
You can show H-bonds between two objects using atom selections so long as hydrogens are present in both molecules. If you don't have hydrogens, you can use [[h_add]] on the proteins, or provide ligands with valence information and then use h_add.&lt;br /&gt;
&lt;br /&gt;
Two examples are below. For clarity, they draw dashes between the heavy atoms and hide the hydrogens.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# EXAMPLE 1: Show hydrogen bonds between protein &lt;br /&gt;
# and docked ligands (which must have hydrogens)&lt;br /&gt;
&lt;br /&gt;
load target.pdb,prot&lt;br /&gt;
load docked_ligs.sdf,lig&lt;br /&gt;
&lt;br /&gt;
# add hydrogens to protein&lt;br /&gt;
&lt;br /&gt;
h_add prot&lt;br /&gt;
&lt;br /&gt;
select don, (elem n,o and (neighbor hydro))&lt;br /&gt;
select acc, (elem o or (elem n and not (neighbor hydro)))&lt;br /&gt;
dist HBA, (lig and acc),(prot and don), 3.2&lt;br /&gt;
dist HBD, (lig and don),(prot and acc), 3.2&lt;br /&gt;
delete don&lt;br /&gt;
delete acc&lt;br /&gt;
hide (hydro)&lt;br /&gt;
&lt;br /&gt;
hide labels,HBA&lt;br /&gt;
hide labels,HBD&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# EXAMPLE 2&lt;br /&gt;
# Show hydrogen bonds between two proteins&lt;br /&gt;
&lt;br /&gt;
load prot1.pdb&lt;br /&gt;
load prot2.pdb&lt;br /&gt;
&lt;br /&gt;
h_add prot1&lt;br /&gt;
h_add prot2&lt;br /&gt;
&lt;br /&gt;
select don, (elem n,o and (neighbor hydro))&lt;br /&gt;
select acc, (elem o or (elem n and not (neighbor hydro)))&lt;br /&gt;
dist HBA, (prot1 and acc),(prot2 and don), 3.2&lt;br /&gt;
dist HBD, (prot1 and don),(prot2 and acc), 3.2&lt;br /&gt;
delete don&lt;br /&gt;
delete acc&lt;br /&gt;
hide (hydro)&lt;br /&gt;
&lt;br /&gt;
hide labels,HBA&lt;br /&gt;
hide labels,HBD&lt;br /&gt;
&lt;br /&gt;
# NOTE: that you could also use this approach between two&lt;br /&gt;
# non-overlapping selections within a single object.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;polar contacts&amp;quot; mentioned above are probably better at finding hydrogen bonds than these scripts. &amp;quot;Polar contacts&amp;quot; check geometry as well as distance.&lt;br /&gt;
&lt;br /&gt;
==== Details ====&lt;br /&gt;
Generally speaking, PyMOL does not have sufficient information to  rigorously determine hydrogen bonds, since typical PDB file are ambiguous with respect to charge states, bonds, bond valences, and tautomers. As it stands, all of those things are guessed heuristically. Rigorously determining the location of lone pair electrons and proton  coordinates from raw PDB files is a nontrival problem especially when arbitrary small molecule structures are present.  In addition, PyMOL would also need to consider the implied coordinate error due to overall structure resolution and local temperature factors before rigorously asserting than any specific hydrogen bond does or does not exist.&lt;br /&gt;
&lt;br /&gt;
Furthermore, our hydrogen bond detection machinery was originally developed for purposes of mimicking Kabsch and Sander's DSSP secondary  structure assignment algorithm (Biopolymers 22, 2577, 1983) which is based on a rather generous notion of hydrogen bonding (see Kabsch Figure 1).&lt;br /&gt;
&lt;br /&gt;
Although this approximate capability can be accessed via the distance command using mode=2, the criteria applied by our implementation may be based on heavy-atom coordinates (only) and does not necessarily correspond to anything rigorous or published.  So the bottom line is that PyMOL merely offers up putative polar contacts and leaves it to the user to determine whether or not the interactions present are in fact hydrogen bonds, salt bridges, polar interactions, or merely artifacts of incorrect assignments (i.e. two carbonyls hydrogen bonding because they're being treated like hydroxyls).&lt;br /&gt;
&lt;br /&gt;
With respect to the h_bond_* settings, the angle in question for h_bond_cutoff_* and h_bond_max_angle is ADH, assuming H exists.  If H does not exist, then PyMOL will guess a hypothetical coordinate which may not actually be valid (in plane, etc.).  Tthe hydrogen must also lie within a cone of space with its origin on A (along B-&amp;gt;A) and angular width h_bond_cone.  Since h_bond_cone in 180 by default, the present behavior is to simply reject any hydrogen bond where the hydrogen would lie behind the plane defined by the acceptor atom (A) in relation to its bonded atom(s) B (if any).  In other words, if B is only one atom (e.g.  C=O vs. C-O-C), then by default, HAB cannot be less then 90 degrees.&lt;br /&gt;
&lt;br /&gt;
The two h_bond_power_* settings are merely fitting parameters which enable PyMOL to reproduce a curve shape reflecting Kabsch Figure 1.  The endpoints of the effective cutoff curve is a function of the two h_bond_cutoff_*  setting.&lt;br /&gt;
&lt;br /&gt;
==Calculating dihedral angles==&lt;br /&gt;
The get_dihedral function requires four single-atom selections to work:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
get_dihedral prot1///9/C, prot1///10/N, prot1///10/CA, prot1///10/C&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
== Cavities ==&lt;br /&gt;
See [[Surfaces_and_Voids]].  Also [[Caver]] and [[CASTp]].&lt;br /&gt;
&lt;br /&gt;
==Surface-Related==&lt;br /&gt;
&lt;br /&gt;
===Surface Area===&lt;br /&gt;
To calculate the surface area of a selection, see [[Get_Area]].&lt;br /&gt;
&lt;br /&gt;
===Polar surface area===&lt;br /&gt;
For a solvent accessible PSA approximation:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set dot_density, 3&lt;br /&gt;
remove hydro&lt;br /&gt;
remove solvent&lt;br /&gt;
show dots&lt;br /&gt;
set dot_solvent, on&lt;br /&gt;
get_area elem N+O&lt;br /&gt;
get_area elem C+S&lt;br /&gt;
get_area all&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For molecular PSA approximation&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set dot_density, 3&lt;br /&gt;
remove hydro&lt;br /&gt;
remove solvent&lt;br /&gt;
set dot_solvent, off&lt;br /&gt;
get_area elem N+O&lt;br /&gt;
get_area elem C+S&lt;br /&gt;
get_area all&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Showing dots isn't mandatory, but it's a good idea to confirm that you're getting the value for the atom dot surface you think you're using.&lt;br /&gt;
Please realize that the resulting numbers are only approximate, reflecting the sum of partial surface areas for all the dots you see. To increase accuracy, set dot_density to 4, but be prepared to wait...&lt;br /&gt;
 &lt;br /&gt;
===Display solvent accessible surface===&lt;br /&gt;
Using the surface display mode, PyMOL doesn't show the solvent accessible surface, rather it shows the solvent/protein contact surface. The solvent accessible surface area is usually defined as the surface traced out by the center of a water sphere, having a radius of about 1.4 angstroms, rolled over the protein atoms. The contact surface is the surface traced out by the vdw surfaces of the water atoms when in contact with the protein.&lt;br /&gt;
&lt;br /&gt;
PyMOL can show solvent accessible surfaces using the dot or sphere representations:&lt;br /&gt;
&lt;br /&gt;
for dots:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
show dots&lt;br /&gt;
set dot_mode,1&lt;br /&gt;
set dot_density,3&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for spheres:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
alter all,vdw=vdw+1.4&lt;br /&gt;
show spheres&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the Van der Waals radii for the selection have been altered, the surface representation will also be &amp;quot;probe-inflated&amp;quot; to show a pseudo solvent accessible surface, as detailed above.&lt;br /&gt;
&lt;br /&gt;
for surfaces:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
alter all,vdw=vdw+1.4&lt;br /&gt;
show surface&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:solvent-accessible_surface.jpg|thumb|Solvent-Accessible Surface Example|left]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that to display both the molecular surface and the solvent-accessible surface, the object must be duplicated, as is done for [[Surface#Representation-independent Color Control]]. This also applies if the spheres representation is to be used to display &amp;quot;real&amp;quot; atoms.&lt;br /&gt;
&lt;br /&gt;
===Contact Potential===&lt;br /&gt;
See [[Protein_contact_potential]] and [[APBS]].&lt;br /&gt;
[[Image:Prot_contact_pot.png|thumb|right|125px]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Electric Field Lines ===&lt;br /&gt;
[[Image:Elines.png|center|250px|thumb|PyMOL and APBS used to show electronic field lines.]]&lt;br /&gt;
&lt;br /&gt;
To produce an image with electric field lines, first run APBS.  Then, input the following:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
gradient my_grad, pymol-generated&lt;br /&gt;
ramp_new my_grad_ramp, pymol-generated&lt;br /&gt;
color my_grad_ramp, my_grad&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Residues with functional groups===&lt;br /&gt;
[[Image:1igt_cys_lys_asp_glu_colored.png|thumb|200px|Whole residues colored (Cys: yellow, Lys: blue, Asp and Glu: red)]]&lt;br /&gt;
Poor man's solution: Display protein as surface, colorize all Lys (-NH2), Asp and Glu (-COOH) and Cys (-SH):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
remove resn hoh    # remove water&lt;br /&gt;
h_add              # add hydrogens&lt;br /&gt;
&lt;br /&gt;
as surface&lt;br /&gt;
color grey90&lt;br /&gt;
&lt;br /&gt;
color slate, resn lys       # lysines in light blue&lt;br /&gt;
color paleyellow, resn cys  # cysteines in light yellow&lt;br /&gt;
color tv_red, (resn asp or(resn glu))  # aspartic and glutamic acid in light red&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:1igt_functional_groups_colored.png|thumb|200px|Only central atoms of functional groups colored (Cys: S, Lys: NH2, Asp and Glu: CO2)]]&lt;br /&gt;
Not-''so''-poor-man's solution: In order to have the functional groups better localized, only the central atoms can be colored: &lt;br /&gt;
* the S atom of cystein, &lt;br /&gt;
* the N and H atoms of the free amine of lysine (may be displayed with three H atoms at all three possible positions)&lt;br /&gt;
* the C and two O atoms of free carboxylic groups in aspartic and glutamic acid &lt;br /&gt;
In this way, they are better visible through the surface compared to only one colored atom, both amines and carboxylic groups consist of three colored atoms each.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
remove resn hoh    # remove water&lt;br /&gt;
h_add              # add hydrogens&lt;br /&gt;
&lt;br /&gt;
as surface&lt;br /&gt;
color grey90&lt;br /&gt;
&lt;br /&gt;
select sulf_cys, (resn cys and (elem S))      # get the sulfur atom of cystein residues&lt;br /&gt;
color yellow, sulf_cys&lt;br /&gt;
&lt;br /&gt;
select nitro_lys, (resn lys and name NZ)              # get the nitrogens of free amines (&amp;quot;NZ&amp;quot; in PDB file)&lt;br /&gt;
select hydro_lys, (elem H and (neighbor nitro_lys))   # get the neighboring H atoms &lt;br /&gt;
select amine_lys, (nitro_lys or hydro_lys)&lt;br /&gt;
color tv_blue, amine_lys&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
select oxy_asp, (resn asp and (name OD1 or name OD2))             # get the two oxygens of -COOH  (&amp;quot;OD1&amp;quot;, &amp;quot;OD2&amp;quot;)&lt;br /&gt;
select carb_asp, (resn asp and (elem C and (neighbor oxy_asp)))   # get the connecting C atom&lt;br /&gt;
select oxy_glu, (resn glu and (name OE1 or name OE2))             # oxygens &amp;quot;OE1&amp;quot; and &amp;quot;OE2&amp;quot; in PDB file&lt;br /&gt;
select carb_glu, (resn glu and (elem c and (neighbor oxy_glu)))&lt;br /&gt;
select carboxy, (carb_asp or oxy_asp or carb_glu or oxy_glu)&lt;br /&gt;
color tv_red, carboxy&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By displaying the protein as non-transparent surface, only the functional groups (colored atoms) at the surface are visible. The visualization of those groups can be pronounced by displaying the corresponding atoms as spheres, e.g. &amp;quot;as spheres, carboxy + amine_lys + sulf_cys&amp;quot;, in this way it might become more clear how accessible they are.&lt;br /&gt;
&lt;br /&gt;
When displaying the protein as cartoon, the functional groups can be shown as spheres, and the whole residues cys, lys, asp and glu as sticks connected to the backbone, with the atoms of the functional groups again as spheres. However, then also the not accessible residues inside the protein are visible.&lt;br /&gt;
&lt;br /&gt;
== Backbones ==&lt;br /&gt;
===Displaying the C-Alpha trace of proteins===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
hide&lt;br /&gt;
show ribbon&lt;br /&gt;
set ribbon_sampling,1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And if your model only contains CA atoms, you'll also need to issue:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set ribbon_trace,1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Displaying the Amino Acid Backbone===&lt;br /&gt;
The easiest way to see the backbone of the protein is to do&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
hide all&lt;br /&gt;
show ribbon&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don't like the ribbon representation, you can also do something like&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
hide all&lt;br /&gt;
show sticks, name C+O+N+CA&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
You can replace '''sticks''' in the above by other representations like '''spheres''' or '''lines'''.&lt;br /&gt;
&lt;br /&gt;
===Displaying the Phosphate backbone of nucleic acids===&lt;br /&gt;
====Native Nucleic Acid Rendering in PyMol====&lt;br /&gt;
PyMol now better supports viewing nucleic acid structure. [[Nuccyl]] still seems to be the reigning champ for image quality, but see PyMol's native [[Cartoon]] command.  For more information on representing nucleic acids, please see the [[:Category:Nucleic_Acids|Nucleic Acids]] Category.&lt;br /&gt;
[[Image:Cnam_0.png|right|thumb|130px]] &amp;lt;div style=&amp;quot;clear:right;&amp;quot;&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Should you ever want to show the phosphate trace of a nucleic acid molecule:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
def p_trace(selection=&amp;quot;(all)&amp;quot;):&lt;br /&gt;
    s = str(selection)&lt;br /&gt;
    cmd.hide('lines',&amp;quot;(&amp;quot;+s+&amp;quot;)&amp;quot;)&lt;br /&gt;
    cmd.hide('spheres',&amp;quot;(&amp;quot;+s+&amp;quot;)&amp;quot;)&lt;br /&gt;
    cmd.hide('sticks',&amp;quot;(&amp;quot;+s+&amp;quot;)&amp;quot;)&lt;br /&gt;
    cmd.hide('ribbon',&amp;quot;(&amp;quot;+s+&amp;quot;)&amp;quot;)&lt;br /&gt;
    cmd.show('cartoon',&amp;quot;(&amp;quot;+s+&amp;quot;)&amp;quot;)&lt;br /&gt;
    cmd.set('cartoon_sampling',1,&amp;quot;(&amp;quot;+s+&amp;quot;)&amp;quot;)&lt;br /&gt;
    cmd.set('cartoon_tube_radius',0.5,&amp;quot;(&amp;quot;+s+&amp;quot;)&amp;quot;)&lt;br /&gt;
cmd.extend('p_trace',p_trace)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
p_trace (selection)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Align proteins with CA fit==&lt;br /&gt;
If two proteins have significant homology, you can use the [[Align]] command:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
align prot1////ca,prot2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which will perform a sequence alignment of prot1 against prot2, and then an optimizing fit using the CA positions. I'm not sure if the help text for align got into 0.82, but the next version will definitely have it.&lt;br /&gt;
&lt;br /&gt;
[[Category:Objects_and_Selections|Displaying Biochemical Properties]]&lt;br /&gt;
[[Category:Nucleic_Acids|Displaying Biochemical Properties]]&lt;br /&gt;
[[Category:Biochemical_Properties]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Pdb_conect_nodup&amp;diff=12083</id>
		<title>Pdb conect nodup</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Pdb_conect_nodup&amp;diff=12083"/>
		<updated>2014-08-20T09:40:00Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: /* Notes */ add spcification of aromatic bonds&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
The '''pdb_conect_nodup''' setting in pymol controls if duplicated connectivity record ([http://www.wwpdb.org/documentation/format23/sect10.html CONECT]) in saved PDB is used to stored [http://en.wikipedia.org/wiki/Bond_order bond order]. &lt;br /&gt;
&lt;br /&gt;
This is an unofficial PDB feature to store bond order and is supported by several applications that read PDB files, but may break PDB file loading in other applications which don't support it. PyMOL always wrote duplicated connect records (&amp;lt;tt&amp;gt;pdb_conect_nodup=0&amp;lt;/tt&amp;gt;) and the setting allows you to switch that off (&amp;lt;tt&amp;gt;pdb_conect_nodup=1&amp;lt;/tt&amp;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;
get pdb_conect_nodup     # get current value &lt;br /&gt;
set pdb_conect_nodup, 1  # no CONECT duplication is used to store bond order&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* PyMOL user mailing list discussion on &amp;lt;tt&amp;gt;pdb_conect_nodup&amp;lt;/tt&amp;gt;: http://sourceforge.net/p/pymol/mailman/message/32735483/ &lt;br /&gt;
* Jmol support for bond order: http://wiki.jmol.org/index.php/Support_for_bond_orders&lt;br /&gt;
* Aromatic bonds are stored using four duplication of the same CONECT records, as specified in, for example, MOL format. See http://wiki.jmol.org/index.php/Support_for_bond_orders&lt;br /&gt;
[[Category:Settings|pdb_conect_nodup]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Pdb_conect_nodup&amp;diff=12082</id>
		<title>Pdb conect nodup</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Pdb_conect_nodup&amp;diff=12082"/>
		<updated>2014-08-20T08:29:14Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: /* Notes */ add link to jmol support for bond order&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
The '''pdb_conect_nodup''' setting in pymol controls if duplicated connectivity record ([http://www.wwpdb.org/documentation/format23/sect10.html CONECT]) in saved PDB is used to stored [http://en.wikipedia.org/wiki/Bond_order bond order]. &lt;br /&gt;
&lt;br /&gt;
This is an unofficial PDB feature to store bond order and is supported by several applications that read PDB files, but may break PDB file loading in other applications which don't support it. PyMOL always wrote duplicated connect records (&amp;lt;tt&amp;gt;pdb_conect_nodup=0&amp;lt;/tt&amp;gt;) and the setting allows you to switch that off (&amp;lt;tt&amp;gt;pdb_conect_nodup=1&amp;lt;/tt&amp;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;
get pdb_conect_nodup     # get current value &lt;br /&gt;
set pdb_conect_nodup, 1  # no CONECT duplication is used to store bond order&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* PyMOL user mailing list discussion on &amp;lt;tt&amp;gt;pdb_conect_nodup&amp;lt;/tt&amp;gt;: http://sourceforge.net/p/pymol/mailman/message/32735483/ &lt;br /&gt;
* Jmol support for bond order: http://wiki.jmol.org/index.php/Support_for_bond_orders&lt;br /&gt;
&lt;br /&gt;
[[Category:Settings|pdb_conect_nodup]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Pdb_conect_nodup&amp;diff=12081</id>
		<title>Pdb conect nodup</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Pdb_conect_nodup&amp;diff=12081"/>
		<updated>2014-08-20T08:27:24Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
The '''pdb_conect_nodup''' setting in pymol controls if duplicated connectivity record ([http://www.wwpdb.org/documentation/format23/sect10.html CONECT]) in saved PDB is used to stored [http://en.wikipedia.org/wiki/Bond_order bond order]. &lt;br /&gt;
&lt;br /&gt;
This is an unofficial PDB feature to store bond order and is supported by several applications that read PDB files, but may break PDB file loading in other applications which don't support it. PyMOL always wrote duplicated connect records (&amp;lt;tt&amp;gt;pdb_conect_nodup=0&amp;lt;/tt&amp;gt;) and the setting allows you to switch that off (&amp;lt;tt&amp;gt;pdb_conect_nodup=1&amp;lt;/tt&amp;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;
get pdb_conect_nodup     # get current value &lt;br /&gt;
set pdb_conect_nodup, 1  # no CONECT duplication is used to store bond order&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
[http://sourceforge.net/p/pymol/mailman/message/32735483/ PyMOL user mailing list discussion on &amp;lt;tt&amp;gt;pdb_conect_nodup&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
[[Category:Settings|pdb_conect_nodup]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Pdb_conect_nodup&amp;diff=12080</id>
		<title>Pdb conect nodup</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Pdb_conect_nodup&amp;diff=12080"/>
		<updated>2014-08-20T08:26:43Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
The '''pdb_conect_nodup''' setting in pymol controls if duplicated connectivity record ([http://www.wwpdb.org/documentation/format23/sect10.html CONECT]) in saved PDB is used to stored [http://en.wikipedia.org/wiki/Bond_order bond order]. &lt;br /&gt;
&lt;br /&gt;
This is an unofficial PDB feature to store bond order and is supported by several applications that read PDB files, but may break PDB file loading in other applications which don't support it. PyMOL always wrote duplicated connect records (&amp;lt;tt&amp;gt;pdb_conect_nodup=on&amp;lt;/tt&amp;gt;) and the setting allows you to switch that off (&amp;lt;tt&amp;gt;pdb_conect_nodup=on&amp;lt;/tt&amp;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;
get pdb_conect_nodup     # get current value &lt;br /&gt;
set pdb_conect_nodup, 1  # no CONECT duplication is used to store bond order&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
[http://sourceforge.net/p/pymol/mailman/message/32735483/ PyMOL user mailing list discussion on &amp;lt;tt&amp;gt;pdb_conect_nodup&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
[[Category:Settings|pdb_conect_nodup]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Pdb_conect_nodup&amp;diff=12079</id>
		<title>Pdb conect nodup</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Pdb_conect_nodup&amp;diff=12079"/>
		<updated>2014-08-20T08:26:29Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
The '''pdb_conect_nodup''' setting in pymol controls if duplicated connectivity record ([http://www.wwpdb.org/documentation/format23/sect10.html CONECT]) in saved PDB is used to stored [http://en.wikipedia.org/wiki/Bond_order bond order]. &lt;br /&gt;
&lt;br /&gt;
This is an unofficial PDB feature to store bond order and is supported by several applications that read PDB files, but may break PDB file loading in other applications which don't support it. PyMOL always wrote duplicated connect records (&amp;lt;tt&amp;gt;pdb_conect_nodup=on&amp;lt;/tt&amp;gt;) and the setting allows you to switch that off (&amp;lt;tt&amp;gt;pdb_conect_nodup=on&amp;lt;/tt&amp;gt;). &amp;lt;ref&amp;gt;&amp;lt;/ref&amp;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;
get pdb_conect_nodup     # get current value &lt;br /&gt;
set pdb_conect_nodup, 1  # no CONECT duplication is used to store bond order&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
[http://sourceforge.net/p/pymol/mailman/message/32735483/ PyMOL user mailing list discussion on &amp;lt;tt&amp;gt;pdb_conect_nodup&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
[[Category:Settings|pdb_conect_nodup]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Pdb_conect_nodup&amp;diff=12078</id>
		<title>Pdb conect nodup</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Pdb_conect_nodup&amp;diff=12078"/>
		<updated>2014-08-20T08:13:10Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: new page about setting  pdb_conect_nodup and tricks to store bond order in PDB files.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
The '''pdb_conect_nodup''' setting in pymol controls if duplicated connectivity record ([http://www.wwpdb.org/documentation/format23/sect10.html CONECT]) in saved PDB is used to stored [http://en.wikipedia.org/wiki/Bond_order bond order]. &lt;br /&gt;
&lt;br /&gt;
This is an unofficial PDB feature to store bond order and is supported by several applications that read PDB files, but may break PDB file loading in other applications which don't support it. PyMOL always wrote duplicated connect records (&amp;lt;tt&amp;gt;pdb_conect_nodup=on&amp;lt;/tt&amp;gt;) and the setting allows you to switch that off (&amp;lt;tt&amp;gt;pdb_conect_nodup=on&amp;lt;/tt&amp;gt;){{cite mailing list |title=PyMOL user mailing list discussion |url=http://sourceforge.net/p/pymol/mailman/message/32735483/}}.&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 pdb_conect_nodup, 1  # no CONECT duplication is used to store bond order&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Settings|pdb_conect_nodup]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=DSSP_Stride&amp;diff=3535</id>
		<title>DSSP Stride</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=DSSP_Stride&amp;diff=3535"/>
		<updated>2014-01-27T08:34:51Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
{{Infobox script-repo&lt;br /&gt;
|type      = plugin&lt;br /&gt;
|filename  = plugins/dssp_stride.py&lt;br /&gt;
|author    = [[User:Hongbo_zhu|Hongbo Zhu]]&lt;br /&gt;
|license   = -&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[http://swift.cmbi.ru.nl/gv/dssp/ DSSP] and [http://webclu.bio.wzw.tum.de/stride/ Stride] are popular tools for assigning secondary structures for proteins. DSSP &amp;amp; Stride Plugin for PyMOL provides a graphical user interface for coloring proteins according to their secondary structures assigned by DSSP or Stride. Most recent DSSP &amp;amp; Stride Plugin code can be obtained from [https://github.com/hongbo-zhu-cn/Pymol-script-repo/blob/master/plugins/dssp_stride.py this link].&lt;br /&gt;
&lt;br /&gt;
= News =&lt;br /&gt;
* 2014_01_24_Update: The plugin is able to cope with empty chain name now.&lt;br /&gt;
&lt;br /&gt;
* 2012_10_22_Update: The most recent version of DSSP (v2.0.4) does not consider residues after the first [http://www.wwpdb.org/documentation/format33/sect9.html#TER &amp;lt;tt&amp;gt;TER&amp;lt;/tt&amp;gt; record] from the same chain. The plugin has been updated to cope with this new feature.&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
[[File:demo_DSSP_plugin_1pyg.png|400px|thumb|right|Demonstration of DSSP plugin (pdb:1pyg).]]&lt;br /&gt;
* Most recent code on github: [https://github.com/hongbo-zhu-cn/Pymol-script-repo/blob/master/plugins/dssp_stride.py DSSP &amp;amp; Stride Plugin for PyMOL @ GitHub]&lt;br /&gt;
&lt;br /&gt;
* Original site (not updated anymore): [http://www.biotec.tu-dresden.de/~hongboz/dssp_pymol/dssp_pymol.html DSSP &amp;amp; Stride Plugin for PyMOL]&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;br /&gt;
[[Category:Pymol-script-repo]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=DSSP_Stride&amp;diff=3534</id>
		<title>DSSP Stride</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=DSSP_Stride&amp;diff=3534"/>
		<updated>2014-01-27T08:33:59Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
{{Infobox script-repo&lt;br /&gt;
|type      = plugin&lt;br /&gt;
|filename  = plugins/dssp_stride.py&lt;br /&gt;
|author    = [[User:Hongbo_zhu|Hongbo Zhu]]&lt;br /&gt;
|license   = -&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[http://swift.cmbi.ru.nl/gv/dssp/ DSSP] and [http://webclu.bio.wzw.tum.de/stride/ Stride] are popular tools for assigning secondary structures for proteins. DSSP &amp;amp; Stride Plugin for PyMOL provides a graphical user interface for coloring proteins according to their secondary structures assigned by DSSP or Stride. Most recent DSSP &amp;amp; Stride Plugin code can be obtained from [https://github.com/hongbo-zhu-cn/Pymol-script-repo/blob/master/plugins/dssp_stride.py this link].&lt;br /&gt;
&lt;br /&gt;
= News =&lt;br /&gt;
2014_01_24_Update: The plugin is able to cope with empty chain name now.&lt;br /&gt;
2012_10_22_Update: The most recent version of DSSP (v2.0.4) does not consider residues after the first [http://www.wwpdb.org/documentation/format33/sect9.html#TER &amp;lt;tt&amp;gt;TER&amp;lt;/tt&amp;gt; record] from the same chain. The plugin has been updated to cope with this new feature.&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
[[File:demo_DSSP_plugin_1pyg.png|400px|thumb|right|Demonstration of DSSP plugin (pdb:1pyg).]]&lt;br /&gt;
* Most recent code on github: [https://github.com/hongbo-zhu-cn/Pymol-script-repo/blob/master/plugins/dssp_stride.py DSSP &amp;amp; Stride Plugin for PyMOL @ GitHub]&lt;br /&gt;
&lt;br /&gt;
* Original site (not updated anymore): [http://www.biotec.tu-dresden.de/~hongboz/dssp_pymol/dssp_pymol.html DSSP &amp;amp; Stride Plugin for PyMOL]&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;br /&gt;
[[Category:Pymol-script-repo]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Iterate&amp;diff=8040</id>
		<title>Iterate</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Iterate&amp;diff=8040"/>
		<updated>2013-11-20T10:21:16Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''iterate''' iterates over an expression with a separate name space for each atom.  However, unlike the &amp;quot;alter&amp;quot; command, atomic properties can not be altered.  Thus, '''iterate''' is more efficient than '''alter'''.&lt;br /&gt;
&lt;br /&gt;
= Details = &lt;br /&gt;
Iterate is a powerful tool that can be used to perform operations and aggregations using atomic selections, and store the results in any global object, such as the predefined '''stored''' object (see [[#PYMOL API]] below for usage of local objects).  For example, one could iterate over all of the alpha carbons and record their B Factors, or print out all of the secondary structure classifications of all the residues.&lt;br /&gt;
&lt;br /&gt;
The '''iterate''' command only has access to certain properties.  Those properties are:&lt;br /&gt;
*'''model''': the pymol object label (appearing in the selection panel on the right)&lt;br /&gt;
*'''name''': the atom name&lt;br /&gt;
*'''resn''': the residue name&lt;br /&gt;
*'''resi''': the residue identifier (residue number)&lt;br /&gt;
*'''chain''': the chain name&lt;br /&gt;
*'''alt'''&lt;br /&gt;
*'''elem''': the chemical element&lt;br /&gt;
*'''q'''&lt;br /&gt;
*'''b''': the B Factor&lt;br /&gt;
*'''segi'''&lt;br /&gt;
*'''type''' (ATOM,HETATM): the atom type&lt;br /&gt;
*'''formal_charge''': the formal charge of the atom&lt;br /&gt;
*'''partial_charge''': the partial charge of the atom&lt;br /&gt;
*'''numeric_type'''&lt;br /&gt;
*'''text_type '''&lt;br /&gt;
*'''ID'''&lt;br /&gt;
*'''vdw'''&lt;br /&gt;
&lt;br /&gt;
All strings in the expression must be explicitly quoted.  This operation typically takes a second per thousand atoms.&lt;br /&gt;
&lt;br /&gt;
===Note about Atom Coordinates===&lt;br /&gt;
&lt;br /&gt;
The coordinates of the atom are not accessible via '''iterate'''. To inspect the coordinates of the atoms, see [[Iterate_State]].&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
 iterate (selection),expression&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
====Example====&lt;br /&gt;
*The following example calculates the net charge on an object.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# create the global variable between Python and PyMOL&lt;br /&gt;
stored.net_charge = 0&lt;br /&gt;
# sum up the stored charges of all the atoms&lt;br /&gt;
iterate (all),stored.net_charge = stored.net_charge + partial_charge&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
*The following example fills an array, '''stored.names''' with the names of all the atoms.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# create the global variable between Python and PyMOL&lt;br /&gt;
stored.names = []&lt;br /&gt;
# get all of the names&lt;br /&gt;
iterate (all),stored.names.append(name)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
*The following prints the b-factors for all atoms around residue #1.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
iterate resi 1, print round(b,2)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
====Example - b and resi ====&lt;br /&gt;
Just copy and paste this directly into command line&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
show_as cartoon ;&lt;br /&gt;
cmd.spectrum(&amp;quot;b&amp;quot;, &amp;quot;blue_white_red&amp;quot;, &amp;quot;n. CA&amp;quot;) ;&lt;br /&gt;
m1 = [] ;&lt;br /&gt;
iterate (all and n. CA),m1.append((b,resi,chain)) ;&lt;br /&gt;
zero = [] ;&lt;br /&gt;
[zero.append(i) for i,val in enumerate(m1) if val[0]==0] ;&lt;br /&gt;
m2 = [i for j,i in enumerate(m1) if j not in zero] ;&lt;br /&gt;
for j,i,k in m2: print j,i,k&lt;br /&gt;
bmax,resimax,chainmax =  max(m2, key=lambda p: p[0]) ;&lt;br /&gt;
bmin,resimin,chainmin =  min(m2, key=lambda p: p[0]) ;&lt;br /&gt;
cmd.ramp_new(&amp;quot;R2&amp;quot;, &amp;quot;* n. CA&amp;quot;, range=[0, bmin, bmax], color=&amp;quot;[blue, white, red ]&amp;quot;) ;&lt;br /&gt;
for b,resi,chain in m2: cmd.label(&amp;quot;chain %s and resi %s and n. CA&amp;quot;%(chain,resi), &amp;quot;b=%3.2f&amp;quot;%b)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
*The following example shows a common task in PyMOL, changing the B-factor column to display some other property.  Let's assume you have a file with a list of numbers, one per line, for each alpha carbon in the protein.  Furthermore, assume you want to map these values to the alpha carbons in the protein.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# set ALL b-factors to 0.&lt;br /&gt;
alter protName, b=0&lt;br /&gt;
&lt;br /&gt;
# read the new bfactors from disk&lt;br /&gt;
f = open('fileName','r').readlines()&lt;br /&gt;
&lt;br /&gt;
# set the alpha carbon bfactors.&lt;br /&gt;
alter protName and n. CA, b=f.pop(0)&lt;br /&gt;
&lt;br /&gt;
# Spectrum color bfactors by alpha carbons.&lt;br /&gt;
spectrum b, selection=(protName and n. CA)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PYMOL API ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.iterate(string selection, string expression, int quiet=1, dict space=None)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When calling iterate, iterate_state, alter or alter_state from a python script, you can use the 'space' argument to pass local objects into the expression namespace.&lt;br /&gt;
&lt;br /&gt;
The second example from above but without the global pymol.stored variable:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
myspace = {'names': []}&lt;br /&gt;
cmd.iterate('(all)', 'names.append(name)', space=myspace)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
User defined functions can also be included in the namespace:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
def myfunc(resi,resn,name):&lt;br /&gt;
    print '%s`%s/%s' % (resn ,resi, name)&lt;br /&gt;
&lt;br /&gt;
myspace = {'myfunc': myfunc}&lt;br /&gt;
cmd.iterate('(all)', 'myfunc(resi,resn,name)', space=myspace)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[Iterate_State]], [[Alter]], [[Alter_State]], [[Color]], [[Color#Color_by_Spectrum_Example|Coloring with different color sprectrums]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Iterate]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Pair_fit&amp;diff=7159</id>
		<title>Pair fit</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Pair_fit&amp;diff=7159"/>
		<updated>2013-11-20T09:52:54Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: /* USER EXAMPLES/COMMENTS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Pair_Fit]] fits a set of atom pairs between two models.  Each atom in each pair must be specified individually, which can be tedious to enter manually.  Script files are recommended when using this 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;
pair_fit (selection), (selection), [ (selection), (selection) [ ...] ]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# superimpose protA residues 10-25 and 33-46 to protB residues 22-37 and 41-54:&lt;br /&gt;
pair_fit protA///10-25+33-46/CA, protB///22-37+41-54/CA&lt;br /&gt;
# superimpose ligA atoms C1, C2, and C4 to ligB atoms C8, C4, and C10, respectively:&lt;br /&gt;
pair_fit ligA////C1, ligB////C8, ligA////C2, ligB////C4, ligA////C3, ligB////C10&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===NOTES===&lt;br /&gt;
So long as the atoms are stored in PyMOL with the same order internally, you can provide just two selections.  Otherwise, you may need to specify each pair of atoms separately, two by two, as additional arguments to pair_fit.&lt;br /&gt;
	&lt;br /&gt;
Script files are usually recommended when using this command.&lt;br /&gt;
&lt;br /&gt;
===USER EXAMPLES/COMMENTS===&lt;br /&gt;
An description of selection caveats for these commands may be found at [[Rms]].&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[Fit]], [[Rms]], [[Rms_Cur]], [[Intra_Fit]], [[Intra_Rms]], [[Intra_Rms_Cur]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Pair Fit]]&lt;br /&gt;
[[Category:Structure_Alignment|Pair Fit]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Intra_rms_cur&amp;diff=7808</id>
		<title>Intra rms cur</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Intra_rms_cur&amp;diff=7808"/>
		<updated>2013-11-20T09:52:39Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: /* USER EXAMPLES/COMMENTS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
'''intra_rms_cur''' calculates rms values for all states of an object over an atom selection relative to the indicated state without performing any fitting.  The rms values are returned as a python array.&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.intra_rms_cur( string selection, int state)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===PYTHON EXAMPLE===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from pymol import cmd&lt;br /&gt;
rms = cmd.intra_rms_cur(&amp;quot;(name ca)&amp;quot;,1)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===USER EXAMPLES/COMMENTS===&lt;br /&gt;
See [[Rms]] for selection caveats for this group of commands.&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[Fit]], [[Rms]], [[Rms_Cur]], [[Intra_Fit]], [[Intra_Rms]], [[Pair_Fit]] &lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Intra Rms Cur]]&lt;br /&gt;
[[Category:States|Intra Rms Cur]]&lt;br /&gt;
[[Category:Structure_Alignment|Intra Rms Cur]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Intra_rms&amp;diff=6193</id>
		<title>Intra rms</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Intra_rms&amp;diff=6193"/>
		<updated>2013-11-20T09:52:00Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: user comments had been removed for its irrelevance. They are copied to rms page given its importance and add a link to the page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''intra_rms''' calculates rms fit values for all states of an object over an atom selection relative to the indicated state.  Coordinates are left unchanged.  The rms values are returned as a python array.&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.intra_rms( string selection, int state)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===PYTHON EXAMPLE===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from pymol import cmd&lt;br /&gt;
rms = cmd.intra_rms(&amp;quot;(name ca)&amp;quot;,1)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===USER COMMENTS===&lt;br /&gt;
See [[Rms]] for selection caveats for this group of commands.&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[Fit]], [[Rms]], [[Rms_Cur]], [[Intra_Fit]], [[Intra_Rms_Cur]], [[Pair_Fit]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Intra Rms]]&lt;br /&gt;
[[Category:States|Intra Rms]]&lt;br /&gt;
[[Category:Structure_Alignment|Intra Rms]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Intra_fit&amp;diff=8034</id>
		<title>Intra fit</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Intra_fit&amp;diff=8034"/>
		<updated>2013-11-20T09:50:28Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: /* USER COMMENTS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
'''intra_fit''' fits all states of an object to an atom selection in the specified state.  It returns the rms values to python as an array.&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
intra_fit (selection),state&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.intra_fit( string selection, int state )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
==== Simple Selection====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
intra_fit ( name ca )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Fitting NMR Ensembles ====&lt;br /&gt;
Warren provided a great example on the PyMOL list.  If the NMR ensemble has all the structures loaded as multiple states (which is the default behavoir (see [[split_states]]) for multimodel PDBs) then we can simply call:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
print cmd.intra_fit(selection, state)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
which will fit all of the other states to the indicated states and return the RMS values as a list.&lt;br /&gt;
&lt;br /&gt;
A simple example is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 1i8e, async=0&lt;br /&gt;
print cmd.intra_fit(&amp;quot;1i8e////CA&amp;quot;, 1)&lt;br /&gt;
&lt;br /&gt;
# results:&lt;br /&gt;
[-1.0, 1.1934459209442139, 1.2950557470321655, 0.71329855918884277,&lt;br /&gt;
0.76704370975494385, 0.78973227739334106, 0.99323123693466187,&lt;br /&gt;
1.0165935754776001, 0.6535714864730835, 0.95591926574707031,&lt;br /&gt;
1.1299723386764526, 0.28637325763702393, 0.69836461544036865,&lt;br /&gt;
0.40816938877105713, 1.1637680530548096]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that a RMS value of -1.0 is returned for the target state.&lt;br /&gt;
&lt;br /&gt;
===PYTHON EXAMPLE===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from pymol import cmd&lt;br /&gt;
rms = cmd.intra_fit(&amp;quot;(name ca)&amp;quot;,1)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===USER EXAMPLES===&lt;br /&gt;
 &lt;br /&gt;
===USER COMMENTS===&lt;br /&gt;
See [[Rms]] for selection caveats for this group of commands.&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[Fit]], [[Rms]], [[Rms_Cur]], [[Intra_Rms]], [[Intra_Rms_Cur]], [[Pair_Fit]], [[Align]]&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
[[Category:Commands|Intra Fit]]&lt;br /&gt;
[[Category:States|Intra Fit]]&lt;br /&gt;
[[Category:Structure_Alignment|Intra Fit]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Rms_cur&amp;diff=9523</id>
		<title>Rms cur</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Rms_cur&amp;diff=9523"/>
		<updated>2013-11-20T09:49:56Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: /* USER COMMENTS */  update link showing command caveats&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Rms_Cur]] computes the RMS difference between two atom selections without performing any fitting.&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rms_cur (selection), (selection)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===USER EXAMPLES===&lt;br /&gt;
&lt;br /&gt;
===USER COMMENTS===&lt;br /&gt;
See [[Rms]] for selection caveats for this group of commands.&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[Fit]], [[Rms]], [[Intra_Fit]], [[Intra_Rms]], [[Intra_Rms_Cur]], [[Pair_Fit]]  &lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Rms Cur]]&lt;br /&gt;
[[Category:Structure_Alignment|Rms Cur]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Rms&amp;diff=8637</id>
		<title>Rms</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Rms&amp;diff=8637"/>
		<updated>2013-11-20T09:48:31Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: the user comments section in page intra_rms referred by this page had been removed for irrelevance. Based on its importance the section is copied here.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Rms]] computes a RMS fit between two atom selections, but does not tranform the models after performing the fit.&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rms (selection), (target-selection)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fit ( mutant and name ca ), ( wildtype and name ca )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===USER COMMENTS===&lt;br /&gt;
&lt;br /&gt;
To determine the RMS without any fitting, see [[Rms_Cur]]&lt;br /&gt;
&lt;br /&gt;
[[Fit]], [[Rms]], [[Rms_Cur]] are finicky and only work when all atom identifiers match: segi, chain, resn, name, alt.  If they don't then you'll need to use the alter command to change the identifiers to that they do -- typically that means clearing out the SEGI field, renaming chains, and sometimes renumbering.&lt;br /&gt;
 &lt;br /&gt;
I tried made two selections A, and D as&lt;br /&gt;
 &lt;br /&gt;
 PyMOL&amp;gt;sel A, 1gh2 and n. CA and i. 65-99&lt;br /&gt;
 Selector: selection &amp;quot;A&amp;quot; defined with 35 atoms.&lt;br /&gt;
 PyMOL&amp;gt;sel D, 1kao and n. CA and i. 64-98&lt;br /&gt;
 Selector: selection &amp;quot;D&amp;quot; defined with 35 atoms&lt;br /&gt;
which as you can see both yield 35 atoms.  Now,&lt;br /&gt;
 &lt;br /&gt;
 rms_cur A, D&lt;br /&gt;
won't work, due to the aforementioned reason.  To fix this, one needs to do,&lt;br /&gt;
 &lt;br /&gt;
 alter all,segi=&amp;quot;&amp;quot;&lt;br /&gt;
 alter all,chain=&amp;quot;&amp;quot;&lt;br /&gt;
 alter D, resi=str(int(resi)+1)  # I don't actually use this line&lt;br /&gt;
and now&lt;br /&gt;
 &lt;br /&gt;
 rms_cur A, D&lt;br /&gt;
&lt;br /&gt;
should work.&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[Fit]], [[Rms_Cur]], [[Intra_Fit]], [[Intra_Rms]], [[Intra_Rms_Cur]], [[Pair_Fit]]&lt;br /&gt;
&lt;br /&gt;
[http://www.mail-archive.com/pymol-users@lists.sourceforge.net/msg00001.html Warren DeLano's comment on rms_* and commands.]&lt;br /&gt;
[[Category:Commands|Rms]]&lt;br /&gt;
[[Category:Structure_Alignment|Rms]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Molecular_Sculpting&amp;diff=14308</id>
		<title>Molecular Sculpting</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Molecular_Sculpting&amp;diff=14308"/>
		<updated>2013-10-10T11:45:28Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: add reference to this entry&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==What the heck is molecular sculpting?==&lt;br /&gt;
&lt;br /&gt;
Molecular sculpting works like a real-time energy minimizer, except that it isn't minimizing the energy. Instead, its just trying to return local atomic geometries (bonds, angles, chirality, planarity) to the configuration the molecules possess when they were first loaded into PyMOL.&lt;br /&gt;
&lt;br /&gt;
To actually use this feature:&lt;br /&gt;
&lt;br /&gt;
# Load a PDB file.&lt;br /&gt;
# Configure the mouse for editing (''Mouse'' menu) or click in the mouse/key matrix box.&lt;br /&gt;
# Select ''Sculpting'' from the ''Wizard'' menu. (or: Select ''auto-sculpting'' from the ''Sculpting'' menu.)&lt;br /&gt;
# ''Ctrl-middle-click'' on any atom in your protein to activate sculpting. The green part will be free to move. The cyan part will be a fixed cushion to provide context. The grey part will be excluded.&lt;br /&gt;
# Now perform any conformational editing operation in the green region such as:&lt;br /&gt;
#* ''ctrl-left-click-and-drag'' on an atom&lt;br /&gt;
#* ''ctrl-right-click'' on a bond, then ''ctrl-left-click-and-drag'' about that bond.&lt;br /&gt;
&lt;br /&gt;
You can adjust the radius and cushion using the blue pop-up menus.&lt;br /&gt;
&lt;br /&gt;
Right now I'm not sure the sculpting feature is more than entertainment, but my expectation is that it will become part of PyMOL's crystallographic model building system in the future.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
Warren DeLano's reply to the question &amp;quot;molecular sculpting&amp;quot; in PyMOL mailing list.[http://www.mail-archive.com/pymol-users@lists.sourceforge.net/msg00359.html ]&lt;br /&gt;
&lt;br /&gt;
[[Category:Modeling_and_Editing_Structures|Molecular Sculpting]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Hide&amp;diff=8018</id>
		<title>Hide</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Hide&amp;diff=8018"/>
		<updated>2013-10-07T08:31:48Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: add one example of hiding hydrogen atoms and waters&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''hide''' conceals atom and bond representations for a certain selection or other graphical objects like distances.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:Show1.png|Some normal scene, notice the waters shown as spheres&lt;br /&gt;
Image:Show2.png|''hide spheres'' issues and the spheres are now hidden.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The available representations are:&lt;br /&gt;
*lines&lt;br /&gt;
*spheres&lt;br /&gt;
*mesh&lt;br /&gt;
*ribbon&lt;br /&gt;
*cartoon&lt;br /&gt;
*sticks&lt;br /&gt;
*dots&lt;br /&gt;
*surface&lt;br /&gt;
*labels&lt;br /&gt;
*nonbonded&lt;br /&gt;
*nb_spheres&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
hide representation [,object]&lt;br /&gt;
hide representation [,(selection)]&lt;br /&gt;
hide (selection)&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.hide( string representation=&amp;quot;&amp;quot;, string selection=&amp;quot;&amp;quot;)&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;
# hides all lines&lt;br /&gt;
hide lines,all&lt;br /&gt;
&lt;br /&gt;
# hides all ribbons&lt;br /&gt;
hide ribbon&lt;br /&gt;
&lt;br /&gt;
# hides all distances&lt;br /&gt;
hide dashes&lt;br /&gt;
&lt;br /&gt;
# hides sticks in protA and all residues that aren't in the range of 40-65&lt;br /&gt;
hide sticks, protA and not i. 40-65&lt;br /&gt;
&lt;br /&gt;
# hide hydrogen atoms&lt;br /&gt;
hide (hydro)  # or hide (h.)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[Show]], [[Enable]], [[Disable]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Hide]]&lt;br /&gt;
[[Category:View Module|Hide]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Pair_fit&amp;diff=7158</id>
		<title>Pair fit</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Pair_fit&amp;diff=7158"/>
		<updated>2013-05-27T11:33:37Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: correct selection macro in the 1st example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Pair_Fit]] fits a set of atom pairs between two models.  Each atom in each pair must be specified individually, which can be tedious to enter manually.  Script files are recommended when using this 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;
pair_fit (selection), (selection), [ (selection), (selection) [ ...] ]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# superimpose protA residues 10-25 and 33-46 to protB residues 22-37 and 41-54:&lt;br /&gt;
pair_fit protA///10-25+33-46/CA, protB///22-37+41-54/CA&lt;br /&gt;
# superimpose ligA atoms C1, C2, and C4 to ligB atoms C8, C4, and C10, respectively:&lt;br /&gt;
pair_fit ligA////C1, ligB////C8, ligA////C2, ligB////C4, ligA////C3, ligB////C10&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===NOTES===&lt;br /&gt;
So long as the atoms are stored in PyMOL with the same order internally, you can provide just two selections.  Otherwise, you may need to specify each pair of atoms separately, two by two, as additional arguments to pair_fit.&lt;br /&gt;
	&lt;br /&gt;
Script files are usually recommended when using this command.&lt;br /&gt;
&lt;br /&gt;
===USER EXAMPLES/COMMENTS===&lt;br /&gt;
An description of selection caveats for these commands may be found at [[Intra_Rms]].&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[Fit]], [[Rms]], [[Rms_Cur]], [[Intra_Fit]], [[Intra_Rms]], [[Intra_Rms_Cur]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Pair Fit]]&lt;br /&gt;
[[Category:Structure_Alignment|Pair Fit]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Color&amp;diff=5194</id>
		<title>Color</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Color&amp;diff=5194"/>
		<updated>2013-02-27T14:29:36Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: /* Getting Atom Colors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''color''' sets the color of an object or an atom selection to a predefined, named color. For an overview of predifined colors, see [[Color Values]]. For a script that enumerates all the colors see, [[List_Colors]]. If you want to define your own colors, see [[Set_Color]].&lt;br /&gt;
===USAGE===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
color color-name&lt;br /&gt;
color color-name, object-name&lt;br /&gt;
color color-name, (selection)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===PYMOL API===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;cmd.color( string color, string selection )&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==EXAMPLES==&lt;br /&gt;
===Color all carbons yellow===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;color yellow, (name C*)&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Color by Spectrum Example===&lt;br /&gt;
Color by spectrum is in the GUI menu but did you realize that the spectrum is not limited to a simple rainbow?&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
spectrum count, palette, object_name&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For available palettes and more details see: [[spectrum]]&lt;br /&gt;
&lt;br /&gt;
===B-Factors===&lt;br /&gt;
The command to color a molecule by B-Factors (B Factors) is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
spectrum b, selection=SEL&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
where '''SEL''' is a valid selection, for example, &amp;quot;protA and n. CA&amp;quot;, for protein A's alpha carbons.&lt;br /&gt;
&lt;br /&gt;
For more details see: [[spectrum]]&lt;br /&gt;
&lt;br /&gt;
====Reassigning B-Factors and Coloring====&lt;br /&gt;
It is commonplace to replace the B-Factor column of a protein with some other  biochemical property at that residue, observed from some calculation or experiment.  PyMOL can easily reassign the B-Factors and color them, too.  The following example will load a protein, set ALL it's B Factors to &amp;quot;0&amp;quot;, read in a list of properties for each alpha carbon in the proteins, assign those new values as the B-Factor values and color by the new values.  This example is possible because commands PyMOL  does not recognize are passed to the Python interpreter --- a very powerful tool.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# load the protein&lt;br /&gt;
cmd.load(&amp;quot;protA.pdb&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# open the file of new values (just 1 column of numbers, one for each alpha carbon)&lt;br /&gt;
inFile = open(&amp;quot;newBFactors&amp;quot;, 'r')&lt;br /&gt;
&lt;br /&gt;
# create the global, stored array&lt;br /&gt;
stored.newB = []&lt;br /&gt;
&lt;br /&gt;
# read the new B factors from file&lt;br /&gt;
for line in inFile.readlines(): stored.newB.append( float(line) )&lt;br /&gt;
&lt;br /&gt;
# close the input file&lt;br /&gt;
inFile.close()&lt;br /&gt;
&lt;br /&gt;
# clear out the old B Factors&lt;br /&gt;
alter protA, b=0.0&lt;br /&gt;
&lt;br /&gt;
# update the B Factors with new properties&lt;br /&gt;
alter protA and n. CA, b=stored.newB.pop(0)&lt;br /&gt;
&lt;br /&gt;
# color the protein based on the new B Factors of the alpha carbons&lt;br /&gt;
cmd.spectrum(&amp;quot;b&amp;quot;, &amp;quot;protA and n. CA&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to save the file with the new B Factor values for each alpha carbon,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.save(&amp;quot;protA_newBFactors.pdb&amp;quot;, &amp;quot;protA&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or similar is all you need.&lt;br /&gt;
&lt;br /&gt;
A script (data2bfactor.py) that loads data into the B-factor (b) or occupancy (q) columns from an external file can be found in Robert Campbell's PyMOL script repository (http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/)&lt;br /&gt;
&lt;br /&gt;
=== Expanding to Surface ===&lt;br /&gt;
See [[Expand_To_Surface]].&lt;br /&gt;
&lt;br /&gt;
If you have run the above code and would like the colors to be shown in the [[Surface]] representation, too, then you need to do the following:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Assumes alpha carbons colored from above.&lt;br /&gt;
create ca_obj, your-object-name and name ca &lt;br /&gt;
ramp_new ramp_obj, ca_obj, [0, 10], [-1, -1, 0]&lt;br /&gt;
set surface_color, ramp_obj, your-object-name&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thanks to Warren, for this one.&lt;br /&gt;
&lt;br /&gt;
=== Getting Atom Colors ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
stored.list = []&lt;br /&gt;
iterate all, stored.list.append(color) # use cmd.get_color_tuple(color) to convert color index to RGB values&lt;br /&gt;
print stored.list&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, you can [[label]] each atom by it's color code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
label all, color&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Color States Individually ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 1nmr&lt;br /&gt;
set all_states&lt;br /&gt;
&lt;br /&gt;
# the object has 20 states, so we can set separate line colors&lt;br /&gt;
# for each state as follows:&lt;br /&gt;
for a in range(1,21): cmd.set(&amp;quot;line_color&amp;quot;,&amp;quot;auto&amp;quot;,&amp;quot;1nmr&amp;quot;,a)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Or, we can do it differently,&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# start over,&lt;br /&gt;
fetch 1nmr&lt;br /&gt;
&lt;br /&gt;
# break apart the object by state&lt;br /&gt;
split_states 1nmr&lt;br /&gt;
&lt;br /&gt;
# delete the original&lt;br /&gt;
dele 1nmr&lt;br /&gt;
&lt;br /&gt;
# and color by object (carbons only)&lt;br /&gt;
util.color_objs(&amp;quot;elem c&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# (all atoms)&lt;br /&gt;
util.color_objs(&amp;quot;all&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== SEE ALSO ==&lt;br /&gt;
&lt;br /&gt;
* [[Advanced Coloring]]&lt;br /&gt;
* [[spectrum]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Objects_and_Selections|Color]]&lt;br /&gt;
[[Category:Commands|Color]]&lt;br /&gt;
[[Category:States|Coloring states individually]]&lt;br /&gt;
[[Category:Coloring|Color]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Pair_fit&amp;diff=7157</id>
		<title>Pair fit</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Pair_fit&amp;diff=7157"/>
		<updated>2013-02-27T09:59:23Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: add examples and notes copied from PyMOL fitting.py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Pair_Fit]] fits a set of atom pairs between two models.  Each atom in each pair must be specified individually, which can be tedious to enter manually.  Script files are recommended when using this 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;
pair_fit (selection), (selection), [ (selection), (selection) [ ...] ]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# superimpose protA residues 10-25 and 33-46 to protB residues 22-37 and 41-54:&lt;br /&gt;
pair_fit protA/10-25+33-46/CA, protB/22-37+41-54/CA&lt;br /&gt;
# superimpose ligA atoms C1, C2, and C4 to ligB atoms C8, C4, and C10, respectively:&lt;br /&gt;
pair_fit ligA////C1, ligB////C8, ligA////C2, ligB////C4, ligA////C3, ligB////C10&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===NOTES===&lt;br /&gt;
So long as the atoms are stored in PyMOL with the same order internally, you can provide just two selections.  Otherwise, you may need to specify each pair of atoms separately, two by two, as additional arguments to pair_fit.&lt;br /&gt;
	&lt;br /&gt;
Script files are usually recommended when using this command.&lt;br /&gt;
&lt;br /&gt;
===USER EXAMPLES/COMMENTS===&lt;br /&gt;
An description of selection caveats for these commands may be found at [[Intra_Rms]].&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[Fit]], [[Rms]], [[Rms_Cur]], [[Intra_Fit]], [[Intra_Rms]], [[Intra_Rms_Cur]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Pair Fit]]&lt;br /&gt;
[[Category:Structure_Alignment|Pair Fit]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Findseq&amp;diff=7960</id>
		<title>Findseq</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Findseq&amp;diff=7960"/>
		<updated>2013-01-03T15:19:07Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: add reference to Psico function select_pepseq&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = script&lt;br /&gt;
|filename  = findseq.py&lt;br /&gt;
|author    = [[User:Inchoate|Jason Vertrees]]&lt;br /&gt;
|license   = BSD&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Overview &amp;amp; Motivation =&lt;br /&gt;
Anyone ever give you a protein and then say, find the sequence &amp;quot;FLVEW&amp;quot;?  Well, this script will find any string or regular expression in a given object and return that selection for you.  Here's an example,&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
reinitialize&lt;br /&gt;
import findseq&lt;br /&gt;
# fetch two sugar-binding PDB&lt;br /&gt;
fetch 1tvn, async=0&lt;br /&gt;
# Now, find FATEW in 1tvn, similarly&lt;br /&gt;
findseq FATEW, 1tvn&lt;br /&gt;
# lower-case works, too&lt;br /&gt;
findseq fatew, 1tvn&lt;br /&gt;
# how about a regular expression?&lt;br /&gt;
findseq F.*W, 1tvn&lt;br /&gt;
 &lt;br /&gt;
# Find the regular expression:&lt;br /&gt;
#  ..H[TA]LVWH&lt;br /&gt;
# in the few proteins loaded.&lt;br /&gt;
# I then showed them as sticks and colored them to highlight matched AAs&lt;br /&gt;
for x in cmd.get_names(): findseq.findseq(&amp;quot;..H[TA]LVWH&amp;quot;, x, &amp;quot;sele_&amp;quot;+x, firstOnly=1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:SeqFinder.png|center|thumb|400px|Red residues were those matching the regular expression '..H[TA]LVWH'.]]&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
I built this to be rather flexible.  You call it as:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;findseq needle, haystack[, selName[, het[, firstOnly ]]]&amp;lt;/source&amp;gt; where the options are:&lt;br /&gt;
:: '''needle''' the sequence of amino acids to find.  Should be a string of one letter amino acid abbreviations.  Can also be a string-style regular expression (eg. FW.*QQ).&lt;br /&gt;
:: '''haystack''' the PyMOL object or selection in which to search&lt;br /&gt;
:: '''selName''' the name of the returned selection.  If you leave this blank, it'll be ''foundSeqXYZ'' where XYZ is some random integer (eg. foundSeq1435); if you supply ''sele'' then the usual PyMOL ''(sele)'' is used; and, finally, if it's anything else, then that will be used verbatim.  Defaults to ''foundSeqXYZ'' so as not to overwrite any selections you might have in ''sele''.&lt;br /&gt;
:: '''het''' 0/1 -- if 0 then heteroatoms are not considered; if 1 then they are; defaults to 0&lt;br /&gt;
:: '''firstOnly''' 0/1 -- if 0 then all matches are selected and returned; if 1 then only the first is returned&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
select_pepseq@[[Psico]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:ObjSel_Scripts]]&lt;br /&gt;
[[Category:Pymol-script-repo]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=DSSP_Stride&amp;diff=3533</id>
		<title>DSSP Stride</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=DSSP_Stride&amp;diff=3533"/>
		<updated>2012-10-23T07:18:22Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: /* Introduction */ add news about the update of the plugin&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
{{Infobox script-repo&lt;br /&gt;
|type      = plugin&lt;br /&gt;
|filename  = plugins/dssp_stride.py&lt;br /&gt;
|author    = [[User:Hongbo_zhu|Hongbo Zhu]]&lt;br /&gt;
|license   = -&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[http://swift.cmbi.ru.nl/gv/dssp/ DSSP] and [http://webclu.bio.wzw.tum.de/stride/ Stride] are popular tools for assigning secondary structures for proteins. DSSP &amp;amp; Stride Plugin for PyMOL provides a graphical user interface for coloring proteins according to their secondary structures assigned by DSSP or Stride. Most recent DSSP &amp;amp; Stride Plugin code can be obtained from [https://github.com/hongbo-zhu-cn/Pymol-script-repo/blob/master/plugins/dssp_stride.py this link].&lt;br /&gt;
&lt;br /&gt;
= News =&lt;br /&gt;
2012_10_22: The most recent version of DSSP (v2.0.4) does not consider residues after the first [http://www.wwpdb.org/documentation/format33/sect9.html#TER &amp;lt;tt&amp;gt;TER&amp;lt;/tt&amp;gt; record] from the same chain. The plugin has been updated to cope with this new feature.&lt;br /&gt;
&lt;br /&gt;
= External links =&lt;br /&gt;
[[File:demo_DSSP_plugin_1pyg.png|400px|thumb|right|Demonstration of DSSP plugin (pdb:1pyg).]]&lt;br /&gt;
* Most recent code on github: [https://github.com/hongbo-zhu-cn/Pymol-script-repo/blob/master/plugins/dssp_stride.py DSSP &amp;amp; Stride Plugin for PyMOL @ GitHub]&lt;br /&gt;
&lt;br /&gt;
* Original site (not updated anymore): [http://www.biotec.tu-dresden.de/~hongboz/dssp_pymol/dssp_pymol.html DSSP &amp;amp; Stride Plugin for PyMOL]&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;br /&gt;
[[Category:Pymol-script-repo]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Pdb_use_ter_records&amp;diff=7924</id>
		<title>Pdb use ter records</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Pdb_use_ter_records&amp;diff=7924"/>
		<updated>2012-10-22T11:09:29Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When a molecule (e.g. a protein molecule) is saved in pdb format by PyMOL, a line of [http://www.wwpdb.org/documentation/format33/sect9.html#TER TER] record is inserted wherever the residue id is not sequential. To suppress this feature, set &amp;lt;tt&amp;gt;pdb_use_ter_records&amp;lt;/tt&amp;gt; value to 0 before saving protein molecules.&lt;br /&gt;
&lt;br /&gt;
=Example= &lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
get pdb_use_ter_records  # return current value of pdb_use_ter_records&lt;br /&gt;
set pdb_use_ter_records, 0&lt;br /&gt;
&lt;br /&gt;
import cmd&lt;br /&gt;
cmd.set(name='pdb_use_ter_records', value=0) # same effect&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Pdb_use_ter_records&amp;diff=13023</id>
		<title>Pdb use ter records</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Pdb_use_ter_records&amp;diff=13023"/>
		<updated>2012-10-22T11:08:21Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: create page about parameter pdb_use_ter_records&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When a molecule (e.g. a protein molecule) is saved in pdb format by PyMOL, a line of [http://www.wwpdb.org/documentation/format33/sect9.html#TER TER] record is inserted wherever the residue id is not sequential. To suppress this feature, set &amp;lt;tt&amp;gt;pdb_use_ter_records&amp;lt;/tt&amp;gt; value to 0 before saving protein molecules.&lt;br /&gt;
&lt;br /&gt;
=Example= &lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
get pdb_use_ter_records  # return current value of pdb_use_ter_records&lt;br /&gt;
set pdb_use_ter_records, 0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Fetch&amp;diff=7322</id>
		<title>Fetch</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Fetch&amp;diff=7322"/>
		<updated>2012-10-19T13:25:32Z</updated>

		<summary type="html">&lt;p&gt;Hongbo zhu: /* Example */ add example of multiple commands in one line&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Fetch''' retrieves a protein structure from the PDB and loads it into PyMOL.  The PDB file is saved in the current working directory for PyMOL.&lt;br /&gt;
&lt;br /&gt;
You can now fetch electron density maps using ''type=fofc'' or ''type=2fofc''.  The map will be loaded if the electron density map exists on the [http://eds.bmc.uu.se/eds/ EDS] server.&lt;br /&gt;
You can also fetch the so-called [http://www.rcsb.org/pdb/101/static101.do?p=education_discussion/Looking-at-Structures/bioassembly_tutorial.html biological assembly or biological unit] files from PDB using ''type=pdb1'', ''type=pdb2'' and so on. &lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch PDB_ID [ ID2 ... IDN ] [, async = [0,1] , [ type=[fofc,2fofc] ]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To specify more than one PDB, just add its ID to the command line (separated by spaces).&lt;br /&gt;
&lt;br /&gt;
=== Proxy Setting ===&lt;br /&gt;
&lt;br /&gt;
If your network requires a proxy server, you can specify it by 'http_proxy' and 'ftp_proxy' environmental variables. &lt;br /&gt;
&lt;br /&gt;
At least in Mac OS X, these values are setup automatically. Otherwise, add&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;export http_proxy='http://proxy.server.name:port/'&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;export ftp_proxy='http://proxy.server.name:port/' # shouldn't start with ftp://...&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to your start up shell script.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# fetch them singly&lt;br /&gt;
fetch 1kao&lt;br /&gt;
fetch 1ctq&lt;br /&gt;
&lt;br /&gt;
# fetch them at once&lt;br /&gt;
fetch 1kao 1ctq&lt;br /&gt;
&lt;br /&gt;
# fetch them at once, load them into PyMOL all at once (synchronously)&lt;br /&gt;
fetch 1kao 1ctq, async=0&lt;br /&gt;
&lt;br /&gt;
# multiple commands in one line is accepted&lt;br /&gt;
fetch 1kao, async=0; as cartoon&lt;br /&gt;
&lt;br /&gt;
# Example loading a protein and its electron density map&lt;br /&gt;
fetch 1cll&lt;br /&gt;
fetch 1cll, type=2fofc&lt;br /&gt;
# focus on residues 30-40&lt;br /&gt;
map_trim *, i. 30-40, 4&lt;br /&gt;
zoom i. 30-40&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example 2 ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# fetch PDB files and process each of them&lt;br /&gt;
# using async=0, PyMOL will wait for fetch to finish before executing the next command&lt;br /&gt;
fetch 1kao, async=0&lt;br /&gt;
remove not (alt ''+A)&lt;br /&gt;
alter all, alt=''&lt;br /&gt;
save 1koa_clean.pdb,1koa&lt;br /&gt;
delete 1koa&lt;br /&gt;
fetch 1ctq, async=0&lt;br /&gt;
remove not (alt ''+A)&lt;br /&gt;
alter all, alt=''&lt;br /&gt;
save 1ctq_clean.pdb,1ctq&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example 3 ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# fetch the biological assembly of 1avd&lt;br /&gt;
# the assembly is composed of asymmetric units (ASUs) stored in different MODELs&lt;br /&gt;
# split the biological assembly using split_state&lt;br /&gt;
fetch 1avd, type=pdb1&lt;br /&gt;
split_state 1avd&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
[[Fetch_Path]], [[Fetch_Host]], [[FetchLocal]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Fetch]]&lt;/div&gt;</summary>
		<author><name>Hongbo zhu</name></author>
	</entry>
</feed>