<?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=Andwar</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=Andwar"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php/Special:Contributions/Andwar"/>
	<updated>2026-05-25T03:37:59Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Pytms&amp;diff=13351</id>
		<title>Pytms</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Pytms&amp;diff=13351"/>
		<updated>2015-11-19T15:34:37Z</updated>

		<summary type="html">&lt;p&gt;Andwar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = plugin&lt;br /&gt;
|filename  = plugins/pytms.py&lt;br /&gt;
|author    = [[User:Andwar|Andreas Warnecke]]&lt;br /&gt;
|license   = GPL-2.0&lt;br /&gt;
}}&lt;br /&gt;
[[Image:pytms.gif|right|PyTMs example: PTMs in red]]&lt;br /&gt;
&lt;br /&gt;
'''PyTMs''' is a PyMOL plugin that enables to easily introduce a set of common post-translational modifications (PTMs) into protein models.&amp;lt;br&amp;gt;&lt;br /&gt;
Latest version: '''1.2 (November 2015)'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
* For instruction on setting up plugins see [[Git intro]] or [[Plugin Manager]]&lt;br /&gt;
PyTMS can be [https://github.com/andwar/Pymol-script-repo/blob/master/plugins/pytms.py downloaded separately], or together with the [https://github.com/Pymol-Scripts/Pymol-script-repo pymol-script-repository]&amp;lt;br&amp;gt;&lt;br /&gt;
The '''pytms.py''' file should be placed in the '''plugins''' folder.&lt;br /&gt;
&lt;br /&gt;
==Using the GUI==&lt;br /&gt;
In PyMOL, navigate to: &amp;lt;u&amp;gt;P&amp;lt;/u&amp;gt;lugin --&amp;gt; PyTMs&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:pytms_menu.png|500 px|PyTMs GUI]]&amp;lt;br&amp;gt;&lt;br /&gt;
The supported PTM can be selected from the left panel. The options will appear on the right. For help, click the help button.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that available objects/selection can be selected using the buttons or be entered into the field. Target atoms are automatically sub-selected and do not need to be specified.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==PyMOL API functions==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;5;&amp;quot;|List of functions&lt;br /&gt;
|- style=&amp;quot;text-align:center;&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| PTM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| PyTMs API command&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| p.PTM property selector *&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target amino acid(s)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Modifyable N-terminus? **&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| acetylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| acetylate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| acetylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Lysine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Yes, biologically relvant&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| carbamylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| carbamylate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| carbamylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Lysine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Yes, implemented&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| citrullination&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| citrullinate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| citrullination&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Arginine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| cysteine oxidations&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| oxidize_cys&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| oxidation_cys&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Cysteine /(Seleno-)&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| malondialdehyde adducts&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| mda_modify&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| MDA&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Lysine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Yes, biologically relevant&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| methionine oxidation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| oxidize_met&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| oxidation_met&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Methionine /(Seleno-)&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| methylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| methylate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| methylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Lysine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Yes, implemented&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| nitration&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| nitrate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| nitration&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Tyrosine (Tryptophan)&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| nitrosylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| nitrosylate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| nitrosylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Cysteine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| proline hydroxylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;|hydroxy_pro&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| hydroxylation_pro&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Proline&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| phosphorylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| phosphorylate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| phosphorylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Serine, Threonine, Tyrosine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|}&lt;br /&gt;
* (*) requires incentive PyMOL version 1.7, or higher&lt;br /&gt;
* (**) N-terminal modifiactions excluding Proline&lt;br /&gt;
* Note that each function has an '''individual help description''', callable by entering, e.g.:&lt;br /&gt;
 help citrullinate&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Selections and custom property selectors==&lt;br /&gt;
PTM amino acids have altered names, and altered/added atoms are identifyable by unique names.&amp;lt;br&amp;gt;&lt;br /&gt;
The nomenclature is adapted mostly from [http://www.rcsb.org/pdb/home/home.do RCSB].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
Examples&lt;br /&gt;
select resn CIR # citrullines&lt;br /&gt;
select resn NIY # nitro-tyrosines&lt;br /&gt;
# etc. ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Note that more information can be found in the associated help of individual functions&lt;br /&gt;
* Hint: using the [[label]] command is a convenient way to get hold of the names of atoms or residues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Incentive PyMOL version (&amp;gt;1.7) support custom property selectors.&amp;lt;br&amp;gt;&lt;br /&gt;
PyTMs supports these by intoducting the property '''p.PTM''' selector (cf. table above), which will select the altered PTM atoms:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# To select a PTM, use e.g.:&lt;br /&gt;
select p.PTM in nitration #selects nitro groups&lt;br /&gt;
select p.PTM in * #selects any PTM&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==PyTMs in python scripts==&lt;br /&gt;
In simple API scripts, the API commands can be used directly.&amp;lt;br&amp;gt;&lt;br /&gt;
For use in python scripts PyTMs can also be imported, e.g.:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import pmg_tk.startup.pytms&lt;br /&gt;
pmg_tk.startup.pytms.mda_modify()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic residue-based optimization, animation, vdW clashes, surface selections==&lt;br /&gt;
{|&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
Some functions (MDA &amp;amp; phosphorylation) support basic structure optimization that is used to position PTMs in more favorable locations.&lt;br /&gt;
Note that this optimization is based solely on sterical vdW strain and currently ignores charge. Due to interation of testing, there may be a significant calculation time associated with this procedure.&lt;br /&gt;
The optimization can be followed in the console and graphically in the PyMOL window (only in case the GUI is used). There is an option to animate the states from original to final after calculation for reference (cf. example).&amp;lt;br&amp;gt;&lt;br /&gt;
Note that the presence of hydrogens will significantly affect both the calculation during optimization and the display of vdW clashes!&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All functions support the display of vdW clashes after modification to allow assessment of potential steric interactions/displacements.&amp;lt;br&amp;gt;&lt;br /&gt;
This is essentially an integrated version of the original [[show_bumps| show_bumps script]] by Thomas Holder.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that a dedicated '''display vdW strain''' function is available to perform this in retrospect, or on unmodified models.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PyTMs also enables the user to sub-select surface accessible residues. This corresponds to an integrated version of [[FindSurfaceResidues]] by Jason Vertrees. This option is enables by providing the required cutoff (in A^2).&lt;br /&gt;
&lt;br /&gt;
| text-align:center;&amp;quot; | '''Animation of optimization with steric vdW clashes:'''&amp;lt;br&amp;gt;[[Image:pytms_optimization_animation.gif|pytms example: optimization, animation, clashes]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Hints==&lt;br /&gt;
* console output appears first in the PyMOL console prior to the API interface&lt;br /&gt;
* when using the GUI menu, the modification process can be followed in the display window&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Update notes==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
'''&lt;br /&gt;
    0.90 pre release testing&lt;br /&gt;
    1.00 first release&lt;br /&gt;
        * minor changes and typo correction&lt;br /&gt;
        * fixed non-incentive users receiving&lt;br /&gt;
          error messages related to the 'alter' command&lt;br /&gt;
        * new feature: integrated surface selection&lt;br /&gt;
        * new feature: integrated display of vdW clashes for all PTMs&lt;br /&gt;
        * new function: display of vdW clashes indpendent of modification&lt;br /&gt;
    1.1 Minor fixes&lt;br /&gt;
        * changed boolean processing of 'delocalized' keyword&lt;br /&gt;
    1.2 Additional function and minor improvements&lt;br /&gt;
        * fixed crashed related to random selections&lt;br /&gt;
        * new function: nitrosylate (Cysteine S-Nitrosylation)&lt;br /&gt;
        * updated usage descriptions&lt;br /&gt;
        * the user interface window is now resizable&lt;br /&gt;
        * changes in nitrate-function:&lt;br /&gt;
            * the torsion angle can now be defined for the nitro group and has&lt;br /&gt;
              a default of ~22.352 (slight angle);&lt;br /&gt;
              this feature is currently only supported for Tyrosines!&lt;br /&gt;
            * selecting a surface cutoff in conjuction with random placement&lt;br /&gt;
              of CE1 or CE2 for Nitro-tyrosines will now select the most&lt;br /&gt;
              accessible CE atom rather than a random one&lt;br /&gt;
        * font size can now be adjusted from the Main menu&lt;br /&gt;
'''&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
The original citation can be found on [http://www.ncbi.nlm.nih.gov/pubmed/25431162 PubMED]&lt;br /&gt;
A current (non-repository) version of PyTMs can be downloaded here: [https://github.com/andwar/Pymol-script-repo/blob/master/plugins/pytms.py pytms.py]&amp;lt;br&amp;gt;&lt;br /&gt;
In case of suggestions, questions or feedback please feel free to [[User:Andwar| contact me]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
* [[Git intro]]&lt;br /&gt;
* [[Plugin_manager]]&lt;br /&gt;
* [[Plugins]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Biochemical_Properties]]&lt;br /&gt;
[[Category:UI_Scripts]]&lt;br /&gt;
[[Category:Biochemical_Scripts]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Valence&amp;diff=12813</id>
		<title>Valence</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Valence&amp;diff=12813"/>
		<updated>2015-04-22T10:01:32Z</updated>

		<summary type="html">&lt;p&gt;Andwar: added information to the valence command and distinguished it from the settings along with minor edits&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
Turning on the '''valence''' setting will enable the display of double bonds.&amp;lt;br&amp;gt;&lt;br /&gt;
Toggling '''valence_mode''' alters the positioning of double bonds (for representation as [[Lines]])&amp;lt;br&amp;gt;&lt;br /&gt;
'''valence_size''' alters the distance of double bonds.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that bonds can be edited to be delocalized using [[Unbond]] and [[Bond]].&amp;lt;br&amp;gt;&lt;br /&gt;
There is also a command called '''valence'''.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples for the settings: valence and valence_mode ==&lt;br /&gt;
&amp;lt;gallery heights=&amp;quot;200px&amp;quot; widths=&amp;quot;200px&amp;quot; align=&amp;quot;left&amp;quot; perrow=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
Image:PHE_valence_0.png|set valence, 0&amp;lt;br&amp;gt;#(no double bonds)&lt;br /&gt;
Image:PHE_valence_1_mode_1.png|set valence, 1&amp;lt;br&amp;gt;set valence_mode, 1&amp;lt;br&amp;gt;#bonds inside&lt;br /&gt;
Image:PHE_valence_1_mode_0.png|set valence, 1&amp;lt;br&amp;gt;set valence_mode, 0&amp;lt;br&amp;gt;#bonds centered&lt;br /&gt;
Image:PHE_delocalized.png|set valence, 1&amp;lt;br&amp;gt;#delocalized bonds&amp;lt;br&amp;gt;#(edited: see [[Bond]])&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''valence_size''' alters the distance of double bonds, but behaves slightly different depending on valence_mode&amp;lt;br&amp;gt;&lt;br /&gt;
{| width=&amp;quot;45%&amp;quot;&lt;br /&gt;
|+ style=&amp;quot;font-weight:bold; text-align:center; font-size:100%;&amp;quot; | valence_size&lt;br /&gt;
! valence_size with valence_mode 1&amp;lt;br&amp;gt; inside !! valence_size with valence_mode 0 &amp;lt;br&amp;gt; centered&lt;br /&gt;
|-&lt;br /&gt;
||[[File:valence_size_mode1.gif]] ||  [[File:valence_size_mode0.gif]]&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 valence, 0 # off&lt;br /&gt;
set valence, 1 # on&lt;br /&gt;
&lt;br /&gt;
set valence_mode, 0 # centered&lt;br /&gt;
set valence_mode, 1 # inside&lt;br /&gt;
&lt;br /&gt;
set valence_size, 0.1 # default: 0.06 # range 0 - ~0.5&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The valence command ==&lt;br /&gt;
The '''valence''' command automatically formats existing bonds and can even guess the bonds for standard amino acids.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#USAGE:&lt;br /&gt;
valence order, selection1 [, selection2 [, source [, target_state [, source_state [, reset [, quiet ]]]]]]&lt;br /&gt;
order can be either: 1, 2, 3, 4, aromatic, copy, guess&lt;br /&gt;
&lt;br /&gt;
#make PyMOL guess/autoformat bonds in proteins&lt;br /&gt;
valence guess, all&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Editing bonds ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# In editing mode: select the bond using Ctrl-right-click, then enter:&lt;br /&gt;
unbond pk1,pk2&lt;br /&gt;
bond pk1,pk2,4&lt;br /&gt;
# 1: single bond, 2: double bond, 3:triple bond, 4:delocalized&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Automatic editing of bonds==&lt;br /&gt;
Try using the '''valence''' command first.&amp;lt;br&amp;gt;&lt;br /&gt;
Secondly, [[Format_bonds]] is a script that automatically formats valence in all amino acids and has additional options.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
[[Bond]], [[Unbond]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Settings|Valence]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Pytms&amp;diff=12512</id>
		<title>Pytms</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Pytms&amp;diff=12512"/>
		<updated>2014-12-04T11:17:26Z</updated>

		<summary type="html">&lt;p&gt;Andwar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = plugin&lt;br /&gt;
|filename  = pytms.py&lt;br /&gt;
|author    = [[User:Andwar|Andreas Warnecke]]&lt;br /&gt;
|license   = GPL-2.0&lt;br /&gt;
}}&lt;br /&gt;
[[Image:pytms.gif|right|PyTMs example: PTMs in red]]&lt;br /&gt;
&lt;br /&gt;
'''PyTMs''' is a PyMOL plugin that enables to easily introduce a set of common post-translational modifications (PTMs) into protein models.&amp;lt;br&amp;gt;&lt;br /&gt;
Latest version: '''1.1'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
* For instruction on setting up plugins see [[Git intro]] or [[Plugin Manager]]&lt;br /&gt;
PyTMS can be [https://github.com/andwar/Pymol-script-repo/blob/master/plugins/pytms.py downloaded separately], or together with the [https://github.com/Pymol-Scripts/Pymol-script-repo pymol-script-repository]&amp;lt;br&amp;gt;&lt;br /&gt;
The '''pytms.py''' file should be placed in the '''plugins''' folder.&lt;br /&gt;
&lt;br /&gt;
==Using the GUI==&lt;br /&gt;
In PyMOL, navigate to: &amp;lt;u&amp;gt;P&amp;lt;/u&amp;gt;lugin --&amp;gt; PyTMs&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:pytms_menu.png|500 px|PyTMs GUI]]&amp;lt;br&amp;gt;&lt;br /&gt;
The supported PTM can be selected from the left panel. The options will appear on the right. For help, click the help button.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that available objects/selection can be selected using the buttons or be entered into the field. Target atoms are automatically sub-selected and do not need to be specified.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==PyMOL API functions==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;5;&amp;quot;|List of functions&lt;br /&gt;
|- style=&amp;quot;text-align:center;&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| PTM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| PyTMs API command&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| p.PTM property selector *&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target amino acid(s)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Modifyable N-terminus? **&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| acetylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| acetylate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| acetylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Lysine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Yes, biologically relvant&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| carbamylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| carbamylate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| carbamylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Lysine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Yes, implemented&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| citrullination&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| citrullinate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| citrullination&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Arginine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| cysteine oxidations&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| oxidize_cys&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| oxidation_cys&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Cysteine /(Seleno-)&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| malondialdehyde adducts&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| mda_modify&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| MDA&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Lysine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Yes, biologically relevant&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| methionine oxidation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| oxidize_met&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| oxidation_met&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Methionine /(Seleno-)&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| methylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| methylate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| methylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Lysine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Yes, implemented&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| nitration&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| nitrate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| nitration&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Tyrosine (Tryptophan)&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| proline hydroxylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;|hydroxy_pro&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| hydroxylation_pro&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Proline&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| phosphorylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| phosphorylate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| phosphorylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Serine, Threonine, Tyrosine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|}&lt;br /&gt;
* (*) requires incentive PyMOL version 1.7, or higher&lt;br /&gt;
* (**) N-terminal modifiactions excluding Proline&lt;br /&gt;
* Note that each function has an '''individual help description''', callable by entering, e.g.:&lt;br /&gt;
 help citrullinate&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Selections and custom property selectors==&lt;br /&gt;
PTM amino acids have altered names, and altered/added atoms are identifyable by unique names.&amp;lt;br&amp;gt;&lt;br /&gt;
The nomenclature is adapted mostly from [http://www.rcsb.org/pdb/home/home.do RCSB].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
Examples&lt;br /&gt;
select resn CIR # citrullines&lt;br /&gt;
select resn NIY # nitro-tyrosines&lt;br /&gt;
# etc. ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Note that more information can be found in the associated help of individual functions&lt;br /&gt;
* Hint: using the [[label]] command is a convenient way to get hold of the names of atoms or residues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Incentive PyMOL version (&amp;gt;1.7) support custom property selectors.&amp;lt;br&amp;gt;&lt;br /&gt;
PyTMs supports these by intoducting the property '''p.PTM''' selector (cf. table above), which will select the altered PTM atoms:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# To select a PTM, use e.g.:&lt;br /&gt;
select p.PTM in nitration #selects nitro groups&lt;br /&gt;
select p.PTM in * #selects any PTM&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==PyTMs in python scripts==&lt;br /&gt;
In simple API scripts, the API commands can be used directly.&amp;lt;br&amp;gt;&lt;br /&gt;
For use in python scripts PyTMs can also be imported, e.g.:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import pmg_tk.startup.pytms&lt;br /&gt;
pmg_tk.startup.pytms.mda_modify()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic residue-based optimization, animation, vdW clashes, surface selections==&lt;br /&gt;
{|&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
Some functions (MDA &amp;amp; phosphorylation) support basic structure optimization that is used to position PTMs in more favorable locations.&lt;br /&gt;
Note that this optimization is based solely on sterical vdW strain and currently ignores charge. Due to interation of testing, there may be a significant calculation time associated with this procedure.&lt;br /&gt;
The optimization can be followed in the console and graphically in the PyMOL window (only in case the GUI is used). There is an option to animate the states from original to final after calculation for reference (cf. example).&amp;lt;br&amp;gt;&lt;br /&gt;
Note that the presence of hydrogens will significantly affect both the calculation during optimization and the display of vdW clashes!&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All functions support the display of vdW clashes after modification to allow assessment of potential steric interactions/displacements.&amp;lt;br&amp;gt;&lt;br /&gt;
This is essentially an integrated version of the original [[show_bumps| show_bumps script]] by Thomas Holder.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that a dedicated '''display vdW strain''' function is available to perform this in retrospect, or on unmodified models.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PyTMs also enables the user to sub-select surface accessible residues. This corresponds to an integrated version of [[FindSurfaceResidues]] by Jason Vertrees. This option is enables by providing the required cutoff (in A^2).&lt;br /&gt;
&lt;br /&gt;
| text-align:center;&amp;quot; | '''Animation of optimization with steric vdW clashes:'''&amp;lt;br&amp;gt;[[Image:pytms_optimization_animation.gif|pytms example: optimization, animation, clashes]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Hints==&lt;br /&gt;
* console output appears first in the PyMOL console prior to the API interface&lt;br /&gt;
* when using the GUI menu, the modification process can be followed in the display window&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
The original citation can be found on [http://www.ncbi.nlm.nih.gov/pubmed/25431162 PubMED]&lt;br /&gt;
A current (non-repository) version of PyTMs can be downloaded here: [https://github.com/andwar/Pymol-script-repo/blob/master/plugins/pytms.py pytms.py]&amp;lt;br&amp;gt;&lt;br /&gt;
In case of suggestions, questions or feedback please feel free to [[User:Andwar| contact me]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
* [[Git intro]]&lt;br /&gt;
* [[Plugin_manager]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Biochemical_Properties]]&lt;br /&gt;
[[Category:UI_Scripts]]&lt;br /&gt;
[[Category:Biochemical_Scripts]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Pytms&amp;diff=12511</id>
		<title>Pytms</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Pytms&amp;diff=12511"/>
		<updated>2014-12-04T11:13:33Z</updated>

		<summary type="html">&lt;p&gt;Andwar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = plugin&lt;br /&gt;
|filename  = pytms.py&lt;br /&gt;
|author    = [[User:Andwar|Andreas Warnecke]]&lt;br /&gt;
|license   = GPL-2.0&lt;br /&gt;
}}&lt;br /&gt;
[[Image:pytms.gif|right|PyTMs example: PTMs in red]]&lt;br /&gt;
&lt;br /&gt;
'''PyTMs''' is a PyMOL plugin that enables to easily introduce a set of common post-translational modifications (PTMs) into protein models.&amp;lt;br&amp;gt;&lt;br /&gt;
Latest version: '''1.1'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
* For instruction on setting up plugins see [[Git intro]] or [[Plugin Manager]]&lt;br /&gt;
PyTMS can be [https://github.com/andwar/Pymol-script-repo/blob/master/plugins/pytms.py downloaded separately], or together with the [https://github.com/Pymol-Scripts/Pymol-script-repo pymol-script-repository]&amp;lt;br&amp;gt;&lt;br /&gt;
The '''pytms.py''' file should be placed in the '''plugins''' folder.&lt;br /&gt;
&lt;br /&gt;
==Using the GUI==&lt;br /&gt;
In PyMOL, navigate to: &amp;lt;u&amp;gt;P&amp;lt;/u&amp;gt;lugin --&amp;gt; PyTMs&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:pytms_menu.png|500 px|PyTMs GUI]]&amp;lt;br&amp;gt;&lt;br /&gt;
The supported PTM can be selected from the left panel. The options will appear on the right. For help, click the help button.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that available objects/selection can be selected using the buttons or be entered into the field. Target atoms are automatically sub-selected and do not need to be specified.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==PyMOL API functions==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;5;&amp;quot;|List of functions&lt;br /&gt;
|- style=&amp;quot;text-align:center;&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| PTM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| PyTMs API command&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| p.PTM property selector *&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target amino acid(s)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Modifyable N-terminus? **&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| acetylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| acetylate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| acetylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Lysine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Yes, biologically relvant&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| carbamylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| carbamylate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| carbamylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Lysine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Yes, implemented&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| citrullination&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| citrullinate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| citrullination&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Arginine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| cysteine oxidations&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| oxidize_cys&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| oxidation_cys&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Cysteine /(Seleno-)&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| malondialdehyde adducts&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| mda_modify&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| MDA&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Lysine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Yes, biologically relevant&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| methionine oxidation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| oxidize_met&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| oxidation_met&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Methionine /(Seleno-)&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| methylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| methylate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| methylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Lysine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Yes, implemented&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| nitration&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| nitrate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| nitration&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Tyrosine (Tryptophan)&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| proline hydroxylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;|hydroxy_pro&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| hydroxylation_pro&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Proline&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| phosphorylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| phosphorylate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| phosphorylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Serine, Threonine, Tyrosine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|}&lt;br /&gt;
* (*) requires incentive PyMOL version 1.7, or higher&lt;br /&gt;
* (**) N-terminal modifiactions excluding Proline&lt;br /&gt;
* Note that each function has an '''individual help description''', callable by entering, e.g.:&lt;br /&gt;
 help citrullinate&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Selections and custom property selectors==&lt;br /&gt;
PTM amino acids have altered names, and altered/added atoms are identifyable by unique names.&amp;lt;br&amp;gt;&lt;br /&gt;
The nomenclature is adapted mostly from [http://www.rcsb.org/pdb/home/home.do RCSB].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
Examples&lt;br /&gt;
select resn CIR # citrullines&lt;br /&gt;
select resn NIY # nitro-tyrosines&lt;br /&gt;
# etc. ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Note that more information can be found in the associated help of individual functions&lt;br /&gt;
* Hint: using the [[label]] command is a convenient way to get hold of the names of atoms or residues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Incentive PyMOL version (&amp;gt;1.7) support custom property selectors.&amp;lt;br&amp;gt;&lt;br /&gt;
PyTMs supports these by intoducting the property '''p.PTM''' selector (cf. table above), which will select the altered PTM atoms:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# To select a PTM, use e.g.:&lt;br /&gt;
select p.PTM in nitration #selects nitro groups&lt;br /&gt;
select p.PTM in * #selects any PTM&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==PyTMs in python scripts==&lt;br /&gt;
In simple API scripts, the API commands can be used directly.&amp;lt;br&amp;gt;&lt;br /&gt;
For use in python scripts PyTMs can also be imported, e.g.:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import pmg_tk.startup.pytms&lt;br /&gt;
pmg_tk.startup.pytms.mda_modify()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic residue-based optimization, animation, vdW clashes, surface selections==&lt;br /&gt;
{|&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
Some functions (MDA &amp;amp; phosphorylation) support basic structure optimization that is used to position PTMs in more favorable locations.&lt;br /&gt;
Note that this optimization is based solely on sterical vdW strain and currently ignores charge. Due to interation of testing, there may be a significant calculation time associated with this procedure.&lt;br /&gt;
The optimization can be followed in the console and graphically in the PyMOL window (only in case the GUI is used). There is an option to animate the states from original to final after calculation for reference (cf. example).&amp;lt;br&amp;gt;&lt;br /&gt;
Note that the presence of hydrogens will significantly affect both the calculation during optimization and the display of vdW clashes!&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All functions support the display of vdW clashes after modification to allow assessment of potential steric interactions/displacements.&amp;lt;br&amp;gt;&lt;br /&gt;
This is essentially an integrated version of the original [[show_bumps| show_bumps script]] by Thomas Holder.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that a dedicated '''display vdW strain''' function is available to perform this in retrospect, or on unmodified models.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PyTMs also enables the user to sub-select surface accessible residues. This corresponds to an integrated version of [[FindSurfaceResidues]] by Jason Vertrees. This option is enables by providing the required cutoff (in A^2).&lt;br /&gt;
&lt;br /&gt;
| text-align:center;&amp;quot; | '''Animation of optimization with steric vdW clashes:'''&amp;lt;br&amp;gt;[[Image:pytms_optimization_animation.gif|pytms example: optimization, animation, clashes]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Hints==&lt;br /&gt;
* console output appears first in the PyMOL console prior to the API interface&lt;br /&gt;
* when using the GUI menu, the modification process can be followed in the display window&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
The original citation can be found on [http://www.ncbi.nlm.nih.gov/pubmed/25431162 PubMED]&lt;br /&gt;
A current (non-repository) version of PyTMs can be downloaded here: [https://github.com/andwar/Pymol-script-repo/blob/master/plugins/pytms.py pytms.py]&amp;lt;br&amp;gt;&lt;br /&gt;
In case of suggestions, questions or feedback please feel free to contact me: [[User:Andwar]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
* [[Git intro]]&lt;br /&gt;
* [[Plugin_manager]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Biochemical_Properties]]&lt;br /&gt;
[[Category:UI_Scripts]]&lt;br /&gt;
[[Category:Biochemical_Scripts]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Pytms&amp;diff=12510</id>
		<title>Pytms</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Pytms&amp;diff=12510"/>
		<updated>2014-12-04T11:06:37Z</updated>

		<summary type="html">&lt;p&gt;Andwar: created content for Pytms page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = plugin&lt;br /&gt;
|filename  = pytms.py&lt;br /&gt;
|author    = [[User:Andwar|Andreas Warnecke]]&lt;br /&gt;
|license   = GPL-2.0&lt;br /&gt;
}}&lt;br /&gt;
[[Image:pytms.gif|right|PyTMs example: PTMs in red]]&lt;br /&gt;
&lt;br /&gt;
'''PyTMs''' is a PyMOL plugin that enables to easily introduce a set of common post-translational modifications (PTMs) into protein models.&amp;lt;br&amp;gt;&lt;br /&gt;
Latest version: '''1.1'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
* For instruction on setting up plugins see [[Git intro]] or [[Plugin Manager]]&lt;br /&gt;
PyTMS can be [https://github.com/andwar/Pymol-script-repo/blob/master/plugins/pytms.py downloaded separately], or together with the [https://github.com/Pymol-Scripts/Pymol-script-repo pymol-script-repository]&amp;lt;br&amp;gt;&lt;br /&gt;
The '''pytms.py''' file should be placed in the '''plugins''' folder.&lt;br /&gt;
&lt;br /&gt;
==Using the GUI==&lt;br /&gt;
In PyMOL, navigate to: &amp;lt;u&amp;gt;P&amp;lt;/u&amp;gt;lugin --&amp;gt; PyTMs&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:pytms_menu.png|500 px|PyTMs GUI]]&amp;lt;br&amp;gt;&lt;br /&gt;
The supported PTM can be selected from the left panel. The options will appear on the right. For help, click the help button.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that available objects/selection can be selected using the buttons or be entered into the field. Target atoms are automatically sub-selected and do not need to be specified.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==PyMOL API functions==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;5;&amp;quot;|List of functions&lt;br /&gt;
|- style=&amp;quot;text-align:center;&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| PTM&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| PyTMs API command&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| p.PTM property selector *&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Target amino acid(s)&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Modifyable N-terminus? **&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| acetylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| acetylate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| acetylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Lysine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Yes, biologically relvant&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| carbamylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| carbamylate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| carbamylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Lysine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Yes, implemented&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| citrullination&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| citrullinate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| citrullination&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Arginine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| cysteine oxidations&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| oxidize_cys&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| oxidation_cys&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Cysteine /(Seleno-)&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| malondialdehyde adducts&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| mda_modify&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| MDA&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Lysine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Yes, biologically relevant&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| methionine oxidation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| oxidize_met&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| oxidation_met&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Methionine /(Seleno-)&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| methylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| methylate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| methylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Lysine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Yes, implemented&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| nitration&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| nitrate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| nitration&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Tyrosine (Tryptophan)&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| proline hydroxylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;|hydroxy_pro&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| hydroxylation_pro&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Proline&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| phosphorylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| phosphorylate&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| phosphorylation&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| Serine, Threonine, Tyrosine&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| No&lt;br /&gt;
|}&lt;br /&gt;
* (*) requires incentive PyMOL version 1.7, or higher&lt;br /&gt;
* (**) N-terminal modifiactions excluding Proline&lt;br /&gt;
* Note that each function has an '''individual help description''', callable by entering, e.g.:&lt;br /&gt;
 help citrullinate&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Selections and custom property selectors==&lt;br /&gt;
PTM amino acids have altered names, and altered/added atoms are identifyable by unique names.&amp;lt;br&amp;gt;&lt;br /&gt;
The nomenclature is adapted mostly from [http://www.rcsb.org/pdb/home/home.do RCSB].&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
Examples&lt;br /&gt;
select resn CIR # citrullines&lt;br /&gt;
select resn NIY # nitro-tyrosines&lt;br /&gt;
# etc. ...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* Note that more information can be found in the associated help of individual functions&lt;br /&gt;
* Hint: using the [[label]] command is a convenient way to get hold of the names of atoms or residues&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Incentive PyMOL (&amp;gt; version 1.7) support custom property selectors.&amp;lt;br&amp;gt;&lt;br /&gt;
PyTMs supports these by intoducting the property '''p.PTM''' selector (cf. table above), which will select the altered PTM atoms:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# To select a PTM, use e.g.:&lt;br /&gt;
select p.PTM in nitration #selects nitro groups&lt;br /&gt;
select p.PTM in * #selects any PTM&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==PyTMs in python scripts==&lt;br /&gt;
In simple API scripts, the API commands can be used directly.&amp;lt;br&amp;gt;&lt;br /&gt;
For use in python scripts PyTMs can also be imported, e.g.:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import pmg_tk.startup.pytms&lt;br /&gt;
pmg_tk.startup.pytms.mda_modify()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic residue-based optimization, animation, vdW clashes, surface selections==&lt;br /&gt;
{|&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
Some functions (MDA &amp;amp; phosphorylation) support basic structure optimization that is used to position PTMs in more favorable locations.&lt;br /&gt;
Note that this optimization is based solely on sterical vdW strain and currently ignores charge. Due to interation of testing, there may be a significant calculation time associated with this procedure.&lt;br /&gt;
The optimization can be followed in the console and graphically in the PyMOL window (only in case the GUI is used). There is an option to animate the states from original to final after calculation for reference (cf. example).&amp;lt;br&amp;gt;&lt;br /&gt;
Note that the presence of hydrogens will significantly affect both the calculation during optimization and the display of vdW clashes!&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All functions support the display of vdW clashes after modification to allow assessment of potential steric interactions/displacements.&amp;lt;br&amp;gt;&lt;br /&gt;
This is essentially an integrated version of the original [[show_bumps| show_bumps script]] by Thomas Holder.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that a dedicated '''display vdW strain''' function is available to perform this in retrospect, or on unmodified models.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PyTMs also enables the user to sub-select surface accessible residues. This corresponds to an integrated version of [[FindSurfaceResidues]] by Jason Vertrees. This option is enables by providing the required cutoff (in A^2).&lt;br /&gt;
&lt;br /&gt;
| text-align:center;&amp;quot; | '''Animation of optimization with sterical vdW clashes:'''&amp;lt;br&amp;gt;[[Image:pytms_optimization_animation.gif|pytms example: optimization, animation, clashes]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Hints==&lt;br /&gt;
* console output appears first in the PyMOL console prior to the API interface&lt;br /&gt;
* when using the GUI menu, the modification process can be followed in the display window&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
The original citation can be found on [http://www.ncbi.nlm.nih.gov/pubmed/25431162 PubMED]&lt;br /&gt;
A current (non-repository) version of PyTMs can be downloaded here: [https://github.com/andwar/Pymol-script-repo/blob/master/plugins/pytms.py pytms.py]&amp;lt;br&amp;gt;&lt;br /&gt;
In case of suggestions, questions or feedback please feel free to contact me: [[User:Andwar]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
[[Git intro]] [[Plugin_manager]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Biochemical_Properties]]&lt;br /&gt;
[[Category:UI_Scripts]]&lt;br /&gt;
[[Category:Biochemical_Scripts]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=User:Andwar&amp;diff=12528</id>
		<title>User:Andwar</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=User:Andwar&amp;diff=12528"/>
		<updated>2014-12-03T15:36:55Z</updated>

		<summary type="html">&lt;p&gt;Andwar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you have any questions, comments or suggestions please feel free to contact me by mail: 4ndreas ''(dot)'' warneck3 ''(@)'' gmail ''dot'' com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==About me==&lt;br /&gt;
My name is Andreas Warnecke. I have a background in Molecular Medicine and am pursuing a PhD in Immunology at [http://ki.se/# Karlolinska Institutet]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='Pymol-script-repo' contributions by me==&lt;br /&gt;
* [[Format_bonds]]&lt;br /&gt;
* [[Get_colors]]&lt;br /&gt;
* [[Movie_color_fade]]&lt;br /&gt;
* [[Quickdisplays]]&lt;br /&gt;
* [[Cgo_grid]]&lt;br /&gt;
* [[Pytms]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Quickdisplays&amp;diff=12514</id>
		<title>Quickdisplays</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Quickdisplays&amp;diff=12514"/>
		<updated>2014-12-03T14:48:18Z</updated>

		<summary type="html">&lt;p&gt;Andwar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = Python Module&lt;br /&gt;
|filename  = quickdisplays.py&lt;br /&gt;
|author    = [[User:Andwar|Andreas Warnecke]]&lt;br /&gt;
|license   = BSD-2-Clause&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The module '''quickdisplays''' is a package containing several functions for quick standard displays:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3;&amp;quot;|List of functions&lt;br /&gt;
|- style=&amp;quot;text-align:center;&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| What it does&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Usage&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| disp_list &lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| prints a list of functions &lt;br /&gt;
| disp_list&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| disp_ss &lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| secondary structure &lt;br /&gt;
| disp_ss [ selection [, colors [, only ]]]&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| disp_ball_stick &lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| balls and sticks  &lt;br /&gt;
|disp_ball_stick [ selection [, hydrogens [, only ]]]&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| disp_mesh &lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| surface mesh &lt;br /&gt;
| disp_mesh [ selection [, color_m [, hydrogens [, only [, limits ]]]]]&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| disp_surf &lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| surface &lt;br /&gt;
| disp_surf [ selection [, color_s [, transparency [, hydrogens [, solvent [, ramp_above [, only [, limits ]]]]]]]]&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| disp_putty &lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| putty b-factor sausage &lt;br /&gt;
| disp_putty [ selection [, limits [, only ]]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Note that each function has an '''individual help description''', callable by entering, e.g.:&lt;br /&gt;
 help disp_surf&lt;br /&gt;
* For instruction on setting up plugin import see [[Git intro]] or [[Plugin Manager]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;5;&amp;quot;|Examples&lt;br /&gt;
|- style=&amp;quot;text-align:center;&amp;quot;&lt;br /&gt;
| [[Image:Quickdisplays_disp_surf.png|center|300px]]'''disp_surf'''&amp;lt;br&amp;gt;''surface''&lt;br /&gt;
| [[Image:Quickdisplays_disp_ss.png|center|300px]]'''disp_ss'''&amp;lt;br&amp;gt;''secondary structure''&lt;br /&gt;
| [[Image:Quickdisplays_disp_putty.png|center|300px]]'''disp_putty'''&amp;lt;br&amp;gt;''putty b-factor sausage''&lt;br /&gt;
| colspan=&amp;quot;2;&amp;quot; rowspan=&amp;quot;2;&amp;quot; style=&amp;quot;text-align:left;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
The ''combined displays'' example was produced like this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import quickdisplays&lt;br /&gt;
fetch 1hpv, async=0&lt;br /&gt;
&lt;br /&gt;
disp_putty all, limits=10&lt;br /&gt;
disp_surf color_s=lightblue, transparency=0.8&lt;br /&gt;
disp_ss chain B&lt;br /&gt;
disp_ball_stick hetatm&lt;br /&gt;
util.cbao hetatm&lt;br /&gt;
set mesh_mode, 1 # make sure hetams are meshed&lt;br /&gt;
set mesh_cutoff, 4.5&lt;br /&gt;
disp_mesh resn 478, color_m=green&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|- style=&amp;quot;text-align:center;&amp;quot;&lt;br /&gt;
| [[Image:Quickdisplays_disp_mesh.png|center|300px]]'''disp_mesh'''&amp;lt;br&amp;gt;''mesh''&lt;br /&gt;
| [[Image:Quickdisplays_disp_ball_stick.png|center|300px]]'''disp_ball_stick'''&amp;lt;br&amp;gt;''balls and sticks''&lt;br /&gt;
| [[Image:Quickdisplays_combo.png|center|300px]]''combined displays''&amp;lt;br&amp;gt;see example&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Some notes on the arguments==&lt;br /&gt;
* '''selection''' can be used to restrict the display to certain objects or selections, the default is 'all'&lt;br /&gt;
* '''only''' can be ''True'' or ''False'' and will toggle whether the display will be added (''show'') or replace others (''show_as'')&lt;br /&gt;
* '''disp_mesh''' and '''disp_surf''' support the color '''putty''', which will color the object/selection by b-factor&lt;br /&gt;
* '''limits''' defines the b-factor color range: &lt;br /&gt;
** a list entry will define absolute values '''[min;max]'''&lt;br /&gt;
** a float value will calculate the corresponding percentiles '''&amp;amp;plusmn;value%''', ''default=5''&lt;br /&gt;
* setting '''hydrogens''' will add hydrogen to the model; if set to ''=False'', hydrogens are removed, if omitted the state of hydogens will be 'as is'&lt;br /&gt;
* '''colors''' in '''disp_ss''' is flexible:&lt;br /&gt;
** set e.g. three colors, e.g. 'red green blue' for sheets, helices and loops, respectively (cf. example) &lt;br /&gt;
** alternatively certain 'util.' functions can be used (cf. example)&lt;br /&gt;
** setting ''False'' once or for individual colors will suppress coloring&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Applied example ==&lt;br /&gt;
Enter the following lines one-by-one and observe how the display will be affected&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# import function to PyMOL&lt;br /&gt;
import quickdisplays&lt;br /&gt;
&lt;br /&gt;
# prep&lt;br /&gt;
fetch 1hpv, async=0&lt;br /&gt;
bg black&lt;br /&gt;
orient&lt;br /&gt;
disp_list # list of functions&lt;br /&gt;
&lt;br /&gt;
help disp_ss # check out help&lt;br /&gt;
disp_ss&lt;br /&gt;
disp_ss only=T&lt;br /&gt;
disp_ss colors=smudge orange grey&lt;br /&gt;
disp_ss colors=chartreuse False False # False suppresses coloring&lt;br /&gt;
disp_ss colors=util.chainbow # You can use util.cbc, util.rainbow, ...&lt;br /&gt;
&lt;br /&gt;
help disp_ball_stick # check out help&lt;br /&gt;
disp_ball_stick hetatm&lt;br /&gt;
disp_ball_stick all, only=T&lt;br /&gt;
util.cbaw&lt;br /&gt;
disp_ball_stick hydrogens=1&lt;br /&gt;
disp_ball_stick hydrogens=-1&lt;br /&gt;
disp_stick_ball # will this work?&lt;br /&gt;
&lt;br /&gt;
help disp_mesh # check out help&lt;br /&gt;
disp_mesh&lt;br /&gt;
disp_mesh color_m=green, only=False&lt;br /&gt;
disp_mesh color_m=green, only=T&lt;br /&gt;
disp_ball_stick hetatm&lt;br /&gt;
set mesh_skip, 2 # omits lines in mesh&lt;br /&gt;
disp_mesh color_m=default, hydrogens=1, only=T&lt;br /&gt;
disp_mesh color_m=putty, hydrogens=0, limits=20&lt;br /&gt;
disp_mesh color_m=putty, limits=30&lt;br /&gt;
disp_mesh color_m=putty, limits=[15,50]&lt;br /&gt;
&lt;br /&gt;
help disp_putty # check out help&lt;br /&gt;
disp_putty chain A, only=False, limits=[15,50] #only default is True&lt;br /&gt;
disp_putty all, limits=0&lt;br /&gt;
disp_putty all, limits=10&lt;br /&gt;
&lt;br /&gt;
help disp_surf # check out help&lt;br /&gt;
disp_surf color_s=white, solvent=1&lt;br /&gt;
disp_surf color_s=white# solvent=0&lt;br /&gt;
disp_surf color_s=lightblue, transparency=0.8&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
[[Git intro]], [[Displaying Biochemical Properties]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Biochemical_Properties]]&lt;br /&gt;
[[Category:UI_Scripts]]&lt;br /&gt;
[[Category:Biochemical_Scripts]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Cgo_grid&amp;diff=12201</id>
		<title>Cgo grid</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Cgo_grid&amp;diff=12201"/>
		<updated>2014-07-16T12:22:48Z</updated>

		<summary type="html">&lt;p&gt;Andwar: created page for cgo_grid&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = Python Module&lt;br /&gt;
|filename  = cgo_grid.py&lt;br /&gt;
|author    = [[User:Andwar|Andreas Warnecke]]&lt;br /&gt;
|license   = BSD-2-Clause&lt;br /&gt;
}}&lt;br /&gt;
[[Image:cgo_grid.gif|right|cgo_grid creates flowing mesh objects]]&lt;br /&gt;
&lt;br /&gt;
==About cgo_grid==&lt;br /&gt;
'''cgo_grid''' will generate a flowing mesh object using the points provided or the current view. By default is will generate a flowing membrane. The shape is affected substantially by the arguments!&amp;lt;br&amp;gt;&lt;br /&gt;
* For instruction on setting up plugin import see [[Git intro]] or [[Plugin manager]]&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
'''cgo_grid''' has many arguments, but not all need to be set necessarily (see arguments or examples).&lt;br /&gt;
{|&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cgo_grid [ pos1 [, pos2 [, pos3 [, length_x [, length_z [, npoints_x [, npoints_z&lt;br /&gt;
[, nwaves_x [, nwaves_z [, offset_x [, offset_z [, gain_x [, gain_z&lt;br /&gt;
[, thickness [, color [, nstates [, startframe [, endframe&lt;br /&gt;
[, mode [, view [, name [, quiet ]]]]]]]]]]]]]]]]]]]]]]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Arguments==&lt;br /&gt;
{|&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    pos1 = single atom selection (='pk1') or list of 3 floats {default: [0,0,0]}&lt;br /&gt;
&lt;br /&gt;
    pos2 = single atom selection (='pk2') or list of 3 floats {default: [1,0,0]}&lt;br /&gt;
&lt;br /&gt;
    pos3 = single atom selection (='pk3') or list of 3 floats {default: [0,0,1]}&lt;br /&gt;
&lt;br /&gt;
    --&amp;gt; the plane is defined by pos1 (origin) and vectors to pos2 and pos3, respectively&lt;br /&gt;
&lt;br /&gt;
    length_x = &amp;lt;float&amp;gt;: length of membrane {default: 30}&lt;br /&gt;
    length_z = &amp;lt;float&amp;gt;: length of membrane {default: ''} # same as length_x&lt;br /&gt;
&lt;br /&gt;
    npoints_x = &amp;lt;int&amp;gt;: number of points(lines) along x-direction&lt;br /&gt;
                {default: ''} #will be set to give a ~1 unit grid&lt;br /&gt;
    npoints_z = &amp;lt;int&amp;gt;: number of points(lines) along z-direction&lt;br /&gt;
                {default: ''} #will be set to give a ~1 unit grid&lt;br /&gt;
                {minimum: 1 # automatic}&lt;br /&gt;
&lt;br /&gt;
    nwaves_x =   &amp;lt;float&amp;gt;: number of complete sin waves along object x-axis&lt;br /&gt;
                 {default: 2}&lt;br /&gt;
    nwaves_z =  &amp;lt;float&amp;gt;: number of complete sin waves along object z-axis&lt;br /&gt;
                {default: ''} # same as nwaves_x&lt;br /&gt;
                define separately to adjust number of waves in each direction&lt;br /&gt;
&lt;br /&gt;
    offset_x = &amp;lt;float&amp;gt; phase delay (in degrees) of sin wave in x-axis&lt;br /&gt;
             can be set to affect shape and starting amplitude {default: 0}&lt;br /&gt;
    offset_z = &amp;lt;float&amp;gt; phase delay (in degrees) of sin wave in z-axis&lt;br /&gt;
             can be set to affect shape and starting amplitude&lt;br /&gt;
             {default: ''} # same as  offset_x&lt;br /&gt;
    offset_x and offset_z can be used together to phase&lt;br /&gt;
    otherwise identical objects&lt;br /&gt;
&lt;br /&gt;
    gain_x = &amp;lt;float&amp;gt;: multiplication factor for y-amplitude for x-direction&lt;br /&gt;
             {default: 1}&lt;br /&gt;
    gain_z = &amp;lt;float&amp;gt;: multiplication factor for y-amplitude for z-direction&lt;br /&gt;
             {default: ''} #=gain_x&lt;br /&gt;
&lt;br /&gt;
    thickness = &amp;lt;float&amp;gt;: line thickness {default: 2}&lt;br /&gt;
&lt;br /&gt;
    color = color name &amp;lt;string&amp;gt; (e.g. 'skyblue') OR&lt;br /&gt;
            rgb-value list of 3 floats (e.g. [1.0,1.0,1.0]) OR&lt;br /&gt;
            {default: ''} // opposite of background&lt;br /&gt;
            input illegal values for random coloring&lt;br /&gt;
&lt;br /&gt;
    nstates =  &amp;lt;int&amp;gt;: number of states; {default: 60}&lt;br /&gt;
               this setting will define how many states&lt;br /&gt;
               the object will have (per wave) and how fluent and fast the&lt;br /&gt;
               animation will be.&lt;br /&gt;
               Higher values will promote 'fluent' transitions,&lt;br /&gt;
               but decrease flow speed.&lt;br /&gt;
                   Note: Frame animation cycles thought the states one at a time&lt;br /&gt;
                   and needs to be set accordingly. Can also be used to phase&lt;br /&gt;
                   otherwise identical objects.&lt;br /&gt;
               Set to 1 for static object {automatic minimum}&lt;br /&gt;
&lt;br /&gt;
    startframe: specify starting frame &amp;lt;int&amp;gt; or set (='') to use current frame&lt;br /&gt;
                set to 'append' to extend movie from the last frame {default: 1}&lt;br /&gt;
      endframe: specify end frame &amp;lt;int&amp;gt; or set (='') to use last frame&lt;br /&gt;
                if 'append' is used for startframe,&lt;br /&gt;
                endframe becomes the number of frames to be appended instead&lt;br /&gt;
                {default: 1}&lt;br /&gt;
                Note: if start- and endframe are the same, movie animation will&lt;br /&gt;
                be skipped, the object will be loaded and can be used afterwards&lt;br /&gt;
&lt;br /&gt;
    mode: defines positioning {default: 0}:&lt;br /&gt;
    0: pos1 is center&lt;br /&gt;
    1: pos1 is corner&lt;br /&gt;
&lt;br /&gt;
    view {default: 0}:&lt;br /&gt;
    '0': off/ uses provided points to create CGO&lt;br /&gt;
    '1': overrides atom selections and uses current orienatation for positioning&lt;br /&gt;
         - pos1 = origin/center&lt;br /&gt;
         - pos2 = origin +1 in camera y&lt;br /&gt;
         - pos3 = origin +1 in camera z&lt;br /&gt;
&lt;br /&gt;
    name: &amp;lt;string&amp;gt; name of cgo object {default: ''} / automatic&lt;br /&gt;
&lt;br /&gt;
    quiet: &amp;lt;boolean&amp;gt; toggles output&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
| text-align:center;&amp;quot; | Concept sketch:&amp;lt;br&amp;gt;[[Image:cgo_grid.png|500px|cgo_grid concept sketch]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
The behaviour or shape of the cgo_grid object are substantially influenced by the arguments&lt;br /&gt;
{|&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
delete all&lt;br /&gt;
set_view (\&lt;br /&gt;
     0.263772517,   -0.113038681,    0.957937598,\&lt;br /&gt;
    -0.040853567,    0.990910411,    0.128179103,\&lt;br /&gt;
    -0.963716805,   -0.072944686,    0.256756991,\&lt;br /&gt;
     0.000000000,    0.000000000, -131.816467285,\&lt;br /&gt;
     0.000000000,    0.000000000,    0.000000000,\&lt;br /&gt;
   -50.008331299,  353.641235352,  -20.000000000 )&lt;br /&gt;
&lt;br /&gt;
#membrane&lt;br /&gt;
cgo_grid color=blue&lt;br /&gt;
&lt;br /&gt;
#swimming worm, random color&lt;br /&gt;
cgo_grid \&lt;br /&gt;
pos1=[0,-5,0], pos2=[1,-5,1], pos3=[0,-5,1],\&lt;br /&gt;
length_x=15,\&lt;br /&gt;
npoints_z=1,\&lt;br /&gt;
gain_x=2,\&lt;br /&gt;
gain_z=0,\&lt;br /&gt;
thickness=20,\&lt;br /&gt;
color=3,\&lt;br /&gt;
mode=1,\&lt;br /&gt;
name=&amp;quot;worm&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#Moving Ladder&lt;br /&gt;
cgo_grid \&lt;br /&gt;
length_x=15,\&lt;br /&gt;
pos1=[0,10,0], pos2=[0,10,1], pos3=[0,9,0],\&lt;br /&gt;
npoints_x=2, npoints_z=30,\&lt;br /&gt;
name=&amp;quot;ladder&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#Roof&lt;br /&gt;
cgo_grid \&lt;br /&gt;
nstates=1,\&lt;br /&gt;
npoints_x=15,\&lt;br /&gt;
npoints_z=15,\&lt;br /&gt;
gain_x=20,\&lt;br /&gt;
gain_z=20,\&lt;br /&gt;
nwaves_x=0.5,\&lt;br /&gt;
thickness=5,\&lt;br /&gt;
color=cyan,\&lt;br /&gt;
name=&amp;quot;roof&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#Boxes&lt;br /&gt;
cgo_grid \&lt;br /&gt;
pos1=[0,-10,0], pos2=[1,-10,0], pos3=[0,-10,1],\&lt;br /&gt;
nstates=1,\&lt;br /&gt;
npoints_x=50,\&lt;br /&gt;
npoints_z=50,\&lt;br /&gt;
nwaves_x=0,\&lt;br /&gt;
color=[0.00 , 0.53 , 0.22],\&lt;br /&gt;
thickness=5,\&lt;br /&gt;
name=&amp;quot;bottom&amp;quot;&lt;br /&gt;
&lt;br /&gt;
cgo_grid \&lt;br /&gt;
nstates=1,\&lt;br /&gt;
npoints_x=2,\&lt;br /&gt;
npoints_z=2,\&lt;br /&gt;
nwaves_x=0,\&lt;br /&gt;
color=gray60,\&lt;br /&gt;
thickness=10,\&lt;br /&gt;
name=&amp;quot;top&amp;quot;&lt;br /&gt;
&lt;br /&gt;
cgo_grid \&lt;br /&gt;
pos1=[-15,-10,15], pos2=[-14,-10,15], pos3=[-15,-9,15],\&lt;br /&gt;
nstates=1,\&lt;br /&gt;
npoints_x=5,\&lt;br /&gt;
npoints_z=5,\&lt;br /&gt;
gain_x=0,\&lt;br /&gt;
gain_z=-2,\&lt;br /&gt;
length_z=10,\&lt;br /&gt;
nwaves_x=0.5,\&lt;br /&gt;
color=gray60,\&lt;br /&gt;
thickness=5,\&lt;br /&gt;
mode=1,\&lt;br /&gt;
name=&amp;quot;front&amp;quot;&lt;br /&gt;
&lt;br /&gt;
cgo_grid \&lt;br /&gt;
pos1=[-15,-10,-15], pos2=[-14,-10,-15], pos3=[-15,-9,-15],\&lt;br /&gt;
nstates=1,\&lt;br /&gt;
npoints_x=5,\&lt;br /&gt;
npoints_z=5,\&lt;br /&gt;
gain_x=0,\&lt;br /&gt;
gain_z=2,\&lt;br /&gt;
length_z=10,\&lt;br /&gt;
nwaves_x=0.5,\&lt;br /&gt;
color=gray60,\&lt;br /&gt;
thickness=5,\&lt;br /&gt;
mode=1,\&lt;br /&gt;
name=&amp;quot;back&amp;quot;&lt;br /&gt;
&lt;br /&gt;
set ray_trace_frames, 0&lt;br /&gt;
set movie_loop,1&lt;br /&gt;
mplay&lt;br /&gt;
&lt;br /&gt;
# play around with the ARGUMENTS! :-)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
* [[CgoCircle]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Math_Scripts]]&lt;br /&gt;
[[Category:CGO]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Distancetoatom&amp;diff=12205</id>
		<title>Distancetoatom</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Distancetoatom&amp;diff=12205"/>
		<updated>2014-07-13T11:09:01Z</updated>

		<summary type="html">&lt;p&gt;Andwar: typos&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = Python Module&lt;br /&gt;
|filename  = distancetoatom.py&lt;br /&gt;
|author    = [[User:Andwar|Andreas Warnecke]] and [[User:Jaredsampson|Jared Sampson]]&lt;br /&gt;
|license   = BSD-2-Clause&lt;br /&gt;
}}&lt;br /&gt;
[[Image:distancetoatom_0.png|right|300px|get distance to atoms within cutoff]]&lt;br /&gt;
&lt;br /&gt;
==About distancetoatom==&lt;br /&gt;
'''distancetoatom''' prints all distances between a specified atom, coordinate or group selection center and all atoms within cutoff distance that are part of the selection.&amp;lt;br&amp;gt;&lt;br /&gt;
All coordinates and distances can be saved in a csv-style text file report and/or can be stored in a (custom) atom property, if defined.&lt;br /&gt;
* For instruction on setting up plugin import see [[Git intro]] or [[Plugin manager]]&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
{|-&lt;br /&gt;
||&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
    distancetoatom [ origin [, cutoff [, filename [, selection [, state [, property_name [, coordinates [, decimals [, sort [, quiet ]]]]]]]]]]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Arguments===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3;&amp;quot;|Arguments for distancetoatom&lt;br /&gt;
|- style=&amp;quot;text-align:center;&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Keyword&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Default&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| What it does&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| origin &lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| pk1  &lt;br /&gt;
| &amp;quot;origin&amp;quot; defines the coordinates for the origin and can be:&lt;br /&gt;
1. a list with coordinates [x,y,z]&amp;lt;br&amp;gt;&lt;br /&gt;
2. a single atom selection string&amp;lt;br&amp;gt;&lt;br /&gt;
3. a multi-atom selection string (center will be used)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| cutoff&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| 10  &lt;br /&gt;
| &amp;quot;cutoff&amp;quot; defines the maximum distance, atoms further away are not considered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| filename &lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| None&lt;br /&gt;
| &amp;quot;filename&amp;quot; is the name of a report file that will be created (optional). &lt;br /&gt;
set to e.g. 'report.txt' to create a report. This file is CSV style and can be imported into EXCEL.&amp;lt;br&amp;gt;&lt;br /&gt;
(omit or set to &amp;quot;&amp;quot;, None, 0 or False to disable)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| selection&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| all&lt;br /&gt;
| only atoms within &amp;quot;selection&amp;quot; (and cutoff distance) will be used for calculation&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| state &lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| 0&lt;br /&gt;
| &amp;quot;state&amp;quot; is the state that will be used for calculations&lt;br /&gt;
use 0 (omit), to automatically use the current state&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| property_name&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| p.dist&lt;br /&gt;
| &amp;quot;property_name&amp;quot; defines a (custom) property in which the calculated distance will be stored.&lt;br /&gt;
This can be used e.g. for labeling or spectrum coloring etc. (cf. examples)&amp;lt;br&amp;gt;&lt;br /&gt;
NB! older PyMOL versions only support b or q and the distance will overwrite this property if set.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| coordinates&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| 0&lt;br /&gt;
| &amp;quot;coordinates&amp;quot; toggles whether, besides distance, the atom coordinates will be included in the report.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| decimals&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| 3&lt;br /&gt;
| &amp;quot;decimals&amp;quot; is the number of decimal places calculated.&lt;br /&gt;
Note that PDB files do not support a higher resolution than 3.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| sort&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| 1&lt;br /&gt;
| &amp;quot;sort&amp;quot; defines how the output will be sorted:&lt;br /&gt;
1: ascending (default)&amp;lt;br&amp;gt;&lt;br /&gt;
0: no sorting (by selection)&amp;lt;br&amp;gt;&lt;br /&gt;
-1: descending&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| quiet&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| 1&lt;br /&gt;
| toggle verbosity&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
{|-&lt;br /&gt;
||&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# make function available to PyMOL&lt;br /&gt;
import distancetoatom&lt;br /&gt;
&lt;br /&gt;
##############################&lt;br /&gt;
# Example 1: print all distances&lt;br /&gt;
frag LYS&lt;br /&gt;
edit name CA&lt;br /&gt;
distancetoatom&lt;br /&gt;
&lt;br /&gt;
##############################&lt;br /&gt;
# Example 2: print all distances to file&lt;br /&gt;
fetch 1cll, async=0&lt;br /&gt;
distancetoatom origin=/1cll//A/CA`150/CA, filename=distances.txt, selection=elem O, property_name=b&lt;br /&gt;
# the file is CSV-format and can be imported, e.g. to EXCEL&lt;br /&gt;
&lt;br /&gt;
# format&lt;br /&gt;
hide everything&lt;br /&gt;
select byres (resi 150 expand 5 and not resn hoh) &lt;br /&gt;
show_as sticks, sele&lt;br /&gt;
util.cbaw sele&lt;br /&gt;
show_as spheres, resi 150&lt;br /&gt;
zoom sele&lt;br /&gt;
&lt;br /&gt;
##########&lt;br /&gt;
# Label by stored distance (property_name)&lt;br /&gt;
label sele and elem O, &amp;quot;%.2f&amp;quot;%b&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##############################&lt;br /&gt;
# Example 3: color an object by distance to a coordinate&lt;br /&gt;
&lt;br /&gt;
fetch 1cll, async=0&lt;br /&gt;
distancetoatom [0,0,0], cutoff=1000, property_name=b&lt;br /&gt;
# the distance is stored in the b-factor in this case&lt;br /&gt;
# newer PyMOL versions support custom properties, e.g. &amp;quot;p.dist&amp;quot;&lt;br /&gt;
spectrum b, rainbow_rev &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
[[Image:distancetoatom_2.png|300px|Example 2]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:distancetoatom_1.png|300px|Example 3]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
* [[Distance]]&lt;br /&gt;
* [[Get Distance]]&lt;br /&gt;
* [[Get raw distances]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:UI_Scripts]]&lt;br /&gt;
[[Category:Math_Scripts]]&lt;br /&gt;
[[Category:Biochemical_Properties]]&lt;br /&gt;
[[Category:Biochemical_Scripts]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Distance&amp;diff=12995</id>
		<title>Distance</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Distance&amp;diff=12995"/>
		<updated>2014-07-13T11:07:43Z</updated>

		<summary type="html">&lt;p&gt;Andwar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Distance=&lt;br /&gt;
{|-&lt;br /&gt;
||&lt;br /&gt;
'''distance''' creates a new distance object between two selections.  It will display all distances within the cutoff.  [[Distance]] is also used to make hydrogen bonds.&lt;br /&gt;
Calling [[distance]] without arguments will show distances between selections (pk1) and (pk1), which can be set in editing mode or using the PkAt mouse action (usually CTRL-middle-click).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Note: For interactive use, the '''measurement''' [[wizard]] (from the PyMOL menu) makes measuring distances easier than using the [[distance]] command.&amp;lt;br&amp;gt;&lt;br /&gt;
If you want to measure distance and avoid creating a distance object, use [[Get Distance]] or [[Distancetoatom]].&amp;lt;br&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
[[Image:Dist ex1.png|300px|Example of distance.  See example #1.]]&lt;br /&gt;
|&lt;br /&gt;
[[Image:Dist ex2.png|300px|Example of distance.  See example #2.]]&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
 &lt;br /&gt;
=Usage=&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
distance [ name [, selection1 [, selection2 [, cutoff [, mode ]]]]]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
'''name'''&lt;br /&gt;
::string: name of the distance object to create &lt;br /&gt;
'''selection1'''&lt;br /&gt;
::string: first atom selection&lt;br /&gt;
'''selection2'''&lt;br /&gt;
::string: second atom selection &lt;br /&gt;
'''cutoff'''&lt;br /&gt;
::float: longest distance to show     &lt;br /&gt;
'''mode'''&lt;br /&gt;
::0: all interatomic distances &lt;br /&gt;
::1: only bond distances &lt;br /&gt;
::2: only show polar contact distances&lt;br /&gt;
::3: like mode=0, but use [[distance_exclusion]] setting&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.distance( string name, string selection1, string selection2,&lt;br /&gt;
              string cutoff, string mode )&lt;br /&gt;
   # returns the average distance between all atoms/frames&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
* Get and show the distance from residue 10's alpha carbon to residue 40's alpha carbon in 1ESR:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# make the first residue 0.&lt;br /&gt;
zero_residues 1esr, 0&lt;br /&gt;
distance i. 10 and n . CA, i. 40 and n. CA&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Get and show the distance from residue 10's alpha carbon to residue 35-42's alpha carbon in 1ESR:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# make the first residue 0.&lt;br /&gt;
zero_residues 1esr, 0&lt;br /&gt;
distance i. 10 and n . CA, i. 35-42 and n. CA&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This neat example shows how to create distance measurements from an atom in a molecule to all other atoms in the molecule (since PyMol supports wildcards).&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 cmd.distance(&amp;quot;(/mol1///1/C)&amp;quot;,&amp;quot;(/mol1///2/C*)&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or written without the PyMolScript code,&lt;br /&gt;
 dist /mol1///1/C, /mol1///2/C*&lt;br /&gt;
* Create multiple distance objects&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
for at1 in cmd.index(&amp;quot;resi 10&amp;quot;): \&lt;br /&gt;
   for at2 in cmd.index(&amp;quot;resi 11&amp;quot;): \&lt;br /&gt;
       cmd.distance(None, &amp;quot;%s`%d&amp;quot;%at1, &amp;quot;%s`%d&amp;quot;%at2)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
distance (selection1), (selection2)&lt;br /&gt;
&lt;br /&gt;
# example&lt;br /&gt;
dist i. 158 and n. CA, i. 160 and n. CA &lt;br /&gt;
&lt;br /&gt;
distance mydist, 14/CA, 29/CA&lt;br /&gt;
distance hbonds, all, all, 3.2, mode=2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
* [[Get Distance]] # Avoid creating an object&lt;br /&gt;
* [[Distancetoatom]] # Automated script for distances to a point&lt;br /&gt;
* [[Measure_Distance]] # basic script&lt;br /&gt;
* [[Lines]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Distance]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Distance&amp;diff=12994</id>
		<title>Distance</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Distance&amp;diff=12994"/>
		<updated>2014-07-13T11:05:05Z</updated>

		<summary type="html">&lt;p&gt;Andwar: minor edits and referencing&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Distance=&lt;br /&gt;
{|-&lt;br /&gt;
||&lt;br /&gt;
'''distance''' creates a new distance object between two selections.  It will display all distances within the cutoff.  [[Distance]] is also used to make hydrogen bonds.&lt;br /&gt;
Calling [[distance]] without arguments will show distances between selections (pk1) and (pk1), which can be set in editing mode or using the PkAt mouse action (usually CTRL-middle-click).&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Note: For interactive use, the '''measurement''' [[wizard]] makes measuring distances easier than using the [[distance]] command.&amp;lt;br&amp;gt;&lt;br /&gt;
If you want to measure distance and avoid creating a distance object, use [[Get Distance]] or [[Distancetoatom]].&amp;lt;br&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
[[Image:Dist ex1.png|300px|Example of distance.  See example #1.]]&lt;br /&gt;
|&lt;br /&gt;
[[Image:Dist ex2.png|300px|Example of distance.  See example #2.]]&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
 &lt;br /&gt;
=Usage=&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
distance [ name [, selection1 [, selection2 [, cutoff [, mode ]]]]]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
'''name'''&lt;br /&gt;
::string: name of the distance object to create &lt;br /&gt;
'''selection1'''&lt;br /&gt;
::string: first atom selection&lt;br /&gt;
'''selection2'''&lt;br /&gt;
::string: second atom selection &lt;br /&gt;
'''cutoff'''&lt;br /&gt;
::float: longest distance to show     &lt;br /&gt;
'''mode'''&lt;br /&gt;
::0: all interatomic distances &lt;br /&gt;
::1: only bond distances &lt;br /&gt;
::2: only show polar contact distances&lt;br /&gt;
::3: like mode=0, but use [[distance_exclusion]] setting&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.distance( string name, string selection1, string selection2,&lt;br /&gt;
              string cutoff, string mode )&lt;br /&gt;
   # returns the average distance between all atoms/frames&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
* Get and show the distance from residue 10's alpha carbon to residue 40's alpha carbon in 1ESR:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# make the first residue 0.&lt;br /&gt;
zero_residues 1esr, 0&lt;br /&gt;
distance i. 10 and n . CA, i. 40 and n. CA&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Get and show the distance from residue 10's alpha carbon to residue 35-42's alpha carbon in 1ESR:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# make the first residue 0.&lt;br /&gt;
zero_residues 1esr, 0&lt;br /&gt;
distance i. 10 and n . CA, i. 35-42 and n. CA&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* This neat example shows how to create distance measurements from an atom in a molecule to all other atoms in the molecule (since PyMol supports wildcards).&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 cmd.distance(&amp;quot;(/mol1///1/C)&amp;quot;,&amp;quot;(/mol1///2/C*)&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or written without the PyMolScript code,&lt;br /&gt;
 dist /mol1///1/C, /mol1///2/C*&lt;br /&gt;
* Create multiple distance objects&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
for at1 in cmd.index(&amp;quot;resi 10&amp;quot;): \&lt;br /&gt;
   for at2 in cmd.index(&amp;quot;resi 11&amp;quot;): \&lt;br /&gt;
       cmd.distance(None, &amp;quot;%s`%d&amp;quot;%at1, &amp;quot;%s`%d&amp;quot;%at2)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
distance (selection1), (selection2)&lt;br /&gt;
&lt;br /&gt;
# example&lt;br /&gt;
dist i. 158 and n. CA, i. 160 and n. CA &lt;br /&gt;
&lt;br /&gt;
distance mydist, 14/CA, 29/CA&lt;br /&gt;
distance hbonds, all, all, 3.2, mode=2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=See Also=&lt;br /&gt;
* [[Get Distance]] # Avoid creating an object&lt;br /&gt;
* [[Distancetoatom]] # Automated script for distances to a point&lt;br /&gt;
* [[Measure_Distance]] # basic script&lt;br /&gt;
* [[Lines]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Distance]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Distancetoatom&amp;diff=12204</id>
		<title>Distancetoatom</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Distancetoatom&amp;diff=12204"/>
		<updated>2014-07-13T10:42:55Z</updated>

		<summary type="html">&lt;p&gt;Andwar: created page for distancetoatoms&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = Python Module&lt;br /&gt;
|filename  = distancetoatom.py&lt;br /&gt;
|author    = [[User:Andwar|Andreas Warnecke]] and [[User:Jaredsampson|Jared Sampson]]&lt;br /&gt;
|license   = BSD-2-Clause&lt;br /&gt;
}}&lt;br /&gt;
[[Image:distancetoatom_0.png|right|300px|get distance to atoms within cutoff]]&lt;br /&gt;
&lt;br /&gt;
==About distancetoatom==&lt;br /&gt;
'''distancetoatom''' prints all distanced between a specified atom, coordinate or group selection center and all atoms within cutoff distance that are part of the selection.&amp;lt;br&amp;gt;&lt;br /&gt;
All coordinates and distances can be saved in a csv-style text file report and/or can be stored in a (custom) atom property, if defined.&lt;br /&gt;
* For instruction on setting up plugin import see [[Git intro]] or [[Plugin manager]]&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
{|-&lt;br /&gt;
||&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
    distancetoatom [ origin [, cutoff [, filename [, selection [, state [, property_name [, coordinates [, decimals [, sort [, quiet ]]]]]]]]]]&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Arguments===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3;&amp;quot;|Arguments for distancetoatom&lt;br /&gt;
|- style=&amp;quot;text-align:center;&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Keyword&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Default&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| What it does&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| origin &lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| pk1  &lt;br /&gt;
| &amp;quot;origin&amp;quot; defines the coordinates for the origin and can be:&lt;br /&gt;
1. a list with coordinates [x,y,z]&amp;lt;br&amp;gt;&lt;br /&gt;
2. a single atom selection string&amp;lt;br&amp;gt;&lt;br /&gt;
3. a multi-atom selection string (center will be used)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| cutoff&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| 10  &lt;br /&gt;
| &amp;quot;cutoff&amp;quot; defines the maximum distance, atoms further away are not considered&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| filename &lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| None&lt;br /&gt;
| &amp;quot;filename&amp;quot; is the name of a report file that will be created (optional). &lt;br /&gt;
set to e.g. 'report.txt' to create a report. This file is CSV style and can be imported into EXCEL.&amp;lt;br&amp;gt;&lt;br /&gt;
(omit or set to &amp;quot;&amp;quot;, None, 0 or False to disable)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| selection&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| all&lt;br /&gt;
| only atoms within &amp;quot;selection&amp;quot; (and cutoff distance) will be used for calculation&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| state &lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| 0&lt;br /&gt;
| &amp;quot;state&amp;quot; is the state that will be used for calculations&lt;br /&gt;
use 0 (omit), to automatically use the current state&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| property_name&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| p.dist&lt;br /&gt;
| &amp;quot;property_name&amp;quot; defines a (custom) property in which the calculated distance will be stored.&lt;br /&gt;
This can be used e.g. for labeling or spectrum coloring etc. (cf. examples)&amp;lt;br&amp;gt;&lt;br /&gt;
NB! older PyMOL versions only support b or q and the distance will overwrite this property if set.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| coordinates&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| 0&lt;br /&gt;
| &amp;quot;coordinates&amp;quot; toggles whether, besides distance, the atom coordinates will be included in the report.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| decimals&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| 3&lt;br /&gt;
| &amp;quot;decimals&amp;quot; is the number of decimal places calculated.&lt;br /&gt;
Note that PDB files do not support a higher resolution than 3.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| sort&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| 1&lt;br /&gt;
| &amp;quot;sort&amp;quot; defines how the output will be sorted:&lt;br /&gt;
1: ascending (default)&amp;lt;br&amp;gt;&lt;br /&gt;
0: no sorting (by selection)&amp;lt;br&amp;gt;&lt;br /&gt;
-1: descending&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| quiet&lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| 1&lt;br /&gt;
| toggle verbosity&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
{|-&lt;br /&gt;
||&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# make function available to PyMOL&lt;br /&gt;
import distancetoatom&lt;br /&gt;
&lt;br /&gt;
##############################&lt;br /&gt;
# Example 1: print all distances&lt;br /&gt;
frag LYS&lt;br /&gt;
edit name CA&lt;br /&gt;
distancetoatom&lt;br /&gt;
&lt;br /&gt;
##############################&lt;br /&gt;
# Example 2: print all distances to file&lt;br /&gt;
fetch 1cll, async=0&lt;br /&gt;
distancetoatom origin=/1cll//A/CA`150/CA, filename=distances.txt, selection=elem O, property_name=b&lt;br /&gt;
# the file is CSV-format and can be imported, e.g. to EXCEL&lt;br /&gt;
&lt;br /&gt;
# format&lt;br /&gt;
hide everything&lt;br /&gt;
select byres (resi 150 expand 5 and not resn hoh) &lt;br /&gt;
show_as sticks, sele&lt;br /&gt;
util.cbaw sele&lt;br /&gt;
show_as spheres, resi 150&lt;br /&gt;
zoom sele&lt;br /&gt;
&lt;br /&gt;
##########&lt;br /&gt;
# Label by stored distance (property_name)&lt;br /&gt;
label sele and elem O, &amp;quot;%.2f&amp;quot;%b&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
##############################&lt;br /&gt;
# Example 3: color an object by distance to a coordinate&lt;br /&gt;
&lt;br /&gt;
fetch 1cll, async=0&lt;br /&gt;
distancetoatom [0,0,0], cutoff=1000, property_name=b&lt;br /&gt;
# the distance is stored in the b-factor in this case&lt;br /&gt;
# newer PyMOL versions support custom properties, e.g. &amp;quot;p.dist&amp;quot;&lt;br /&gt;
spectrum b, rainbow_rev &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
[[Image:distancetoatom_2.png|300px|Example 2]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:distancetoatom_1.png|300px|Example 3]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
* [[Distance]]&lt;br /&gt;
* [[Get Distance]]&lt;br /&gt;
* [[Get raw distances]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:UI_Scripts]]&lt;br /&gt;
[[Category:Math_Scripts]]&lt;br /&gt;
[[Category:Biochemical_Properties]]&lt;br /&gt;
[[Category:Biochemical_Scripts]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Pytms&amp;diff=12509</id>
		<title>Pytms</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Pytms&amp;diff=12509"/>
		<updated>2014-07-02T14:44:02Z</updated>

		<summary type="html">&lt;p&gt;Andwar: Created page with &amp;quot;NB! This page has been created pro forma and the page content is pending, but will follow in the near future.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;NB! This page has been created pro forma and the page content is pending, but will follow in the near future.&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Quickdisplays&amp;diff=12010</id>
		<title>Quickdisplays</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Quickdisplays&amp;diff=12010"/>
		<updated>2014-06-21T15:52:28Z</updated>

		<summary type="html">&lt;p&gt;Andwar: /* SEE ALSO */ updated category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = Python Module&lt;br /&gt;
|filename  = quickdisplays.py&lt;br /&gt;
|author    = [[User:Andwar|Andreas Warnecke]]&lt;br /&gt;
|license   = BSD-2-Clause&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The module '''quickdisplays''' is a package containing several functions for quick standard displays:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3;&amp;quot;|List of functions&lt;br /&gt;
|- style=&amp;quot;text-align:center;&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| What it does&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Usage&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| disp_list &lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| prints a list of functions &lt;br /&gt;
| disp_list&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| disp_ss &lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| secondary structure &lt;br /&gt;
| disp_ss [ selection [, colors [, only ]]]&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| disp_ball_stick &lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| balls and sticks  &lt;br /&gt;
|disp_ball_stick [ selection [, hydrogens [, only ]]]&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| disp_mesh &lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| surface mesh &lt;br /&gt;
| disp_mesh [ selection [, color_m [, hydrogens [, only [, limits ]]]]]&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| disp_surf &lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| surface &lt;br /&gt;
| disp_surf [ selection [, color_s [, transparency [, hydrogens [, solvent [, ramp_above [, only [, limits ]]]]]]]]&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| disp_putty &lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| putty b-factor sausage &lt;br /&gt;
| disp_putty [ selection [, limits [, only ]]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Note that each function has an '''individual help destription''', callable by entering, e.g.:&lt;br /&gt;
 help disp_surf&lt;br /&gt;
* For instruction on setting up plugin import see [[Git intro]] or [[Plugin manager]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;5;&amp;quot;|Examples&lt;br /&gt;
|- style=&amp;quot;text-align:center;&amp;quot;&lt;br /&gt;
| [[Image:Quickdisplays_disp_surf.png|center|300px]]'''disp_surf'''&amp;lt;br&amp;gt;''surface''&lt;br /&gt;
| [[Image:Quickdisplays_disp_ss.png|center|300px]]'''disp_ss'''&amp;lt;br&amp;gt;''secondary structure''&lt;br /&gt;
| [[Image:Quickdisplays_disp_putty.png|center|300px]]'''disp_putty'''&amp;lt;br&amp;gt;''putty b-factor sausage''&lt;br /&gt;
| colspan=&amp;quot;2;&amp;quot; rowspan=&amp;quot;2;&amp;quot; style=&amp;quot;text-align:left;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
The ''combined displays'' example was produced like this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import quickdisplays&lt;br /&gt;
fetch 1hpv, async=0&lt;br /&gt;
&lt;br /&gt;
disp_putty all, limits=10&lt;br /&gt;
disp_surf color_s=lightblue, transparency=0.8&lt;br /&gt;
disp_ss chain B&lt;br /&gt;
disp_ball_stick hetatm&lt;br /&gt;
util.cbao hetatm&lt;br /&gt;
set mesh_mode, 1 # make sure hetams are meshed&lt;br /&gt;
set mesh_cutoff, 4.5&lt;br /&gt;
disp_mesh resn 478, color_m=green&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|- style=&amp;quot;text-align:center;&amp;quot;&lt;br /&gt;
| [[Image:Quickdisplays_disp_mesh.png|center|300px]]'''disp_mesh'''&amp;lt;br&amp;gt;''mesh''&lt;br /&gt;
| [[Image:Quickdisplays_disp_ball_stick.png|center|300px]]'''disp_ball_stick'''&amp;lt;br&amp;gt;''balls and sticks''&lt;br /&gt;
| [[Image:Quickdisplays_combo.png|center|300px]]''combined displays''&amp;lt;br&amp;gt;see example&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Some notes on the arguments==&lt;br /&gt;
* '''selection''' can be used to restrict the display to certain objects or selections, the default is 'all'&lt;br /&gt;
* '''only''' can be ''True'' or ''False'' and will toggle whether the display will be added (''show'') or replace others (''show_as'')&lt;br /&gt;
* '''disp_mesh''' and '''disp_surf''' support the color '''putty''', which will color the object/selection by b-factor&lt;br /&gt;
* '''limits''' defines the b-factor color range: &lt;br /&gt;
** a list entry will define absolute values '''[min;max]'''&lt;br /&gt;
** a float value will calculate the corresponding percentiles '''&amp;amp;plusmn;value%''', ''default=5''&lt;br /&gt;
* setting '''hydrogens''' will add hydrogen to the model; if set to ''=False'', hydrogens are removed, if omitted the state of hydogens will be 'as is'&lt;br /&gt;
* '''colors''' in '''disp_ss''' is flexible:&lt;br /&gt;
** set e.g. three colors, e.g. 'red green blue' for sheets, helices and loops, respectively (cf. example) &lt;br /&gt;
** alternatively certain 'util.' functions can be used (cf. example)&lt;br /&gt;
** setting ''False'' once or for individual colors will suppress coloring&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Applied example ==&lt;br /&gt;
Enter the following lines one-by-one and observe how the display will be affected&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# import function to PyMOL&lt;br /&gt;
import quickdisplays&lt;br /&gt;
&lt;br /&gt;
# prep&lt;br /&gt;
fetch 1hpv, async=0&lt;br /&gt;
bg black&lt;br /&gt;
orient&lt;br /&gt;
disp_list # list of functions&lt;br /&gt;
&lt;br /&gt;
help disp_ss # check out help&lt;br /&gt;
disp_ss&lt;br /&gt;
disp_ss only=T&lt;br /&gt;
disp_ss colors=smudge orange grey&lt;br /&gt;
disp_ss colors=chartreuse False False # False suppresses coloring&lt;br /&gt;
disp_ss colors=util.chainbow # You can use util.cbc, util.rainbow, ...&lt;br /&gt;
&lt;br /&gt;
help disp_ball_stick # check out help&lt;br /&gt;
disp_ball_stick hetatm&lt;br /&gt;
disp_ball_stick all, only=T&lt;br /&gt;
util.cbaw&lt;br /&gt;
disp_ball_stick hydrogens=1&lt;br /&gt;
disp_ball_stick hydrogens=-1&lt;br /&gt;
disp_stick_ball # will this work?&lt;br /&gt;
&lt;br /&gt;
help disp_mesh # check out help&lt;br /&gt;
disp_mesh&lt;br /&gt;
disp_mesh color_m=green, only=False&lt;br /&gt;
disp_mesh color_m=green, only=T&lt;br /&gt;
disp_ball_stick hetatm&lt;br /&gt;
set mesh_skip, 2 # omits lines in mesh&lt;br /&gt;
disp_mesh color_m=default, hydrogens=1, only=T&lt;br /&gt;
disp_mesh color_m=putty, hydrogens=0, limits=20&lt;br /&gt;
disp_mesh color_m=putty, limits=30&lt;br /&gt;
disp_mesh color_m=putty, limits=[15,50]&lt;br /&gt;
&lt;br /&gt;
help disp_putty # check out help&lt;br /&gt;
disp_putty chain A, only=False, limits=[15,50] #only default is True&lt;br /&gt;
disp_putty all, limits=0&lt;br /&gt;
disp_putty all, limits=10&lt;br /&gt;
&lt;br /&gt;
help disp_surf # check out help&lt;br /&gt;
disp_surf color_s=white, solvent=1&lt;br /&gt;
disp_surf color_s=white# solvent=0&lt;br /&gt;
disp_surf color_s=lightblue, transparency=0.8&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
[[Git intro]], [[Displaying Biochemical Properties]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:Biochemical_Properties]]&lt;br /&gt;
[[Category:UI_Scripts]]&lt;br /&gt;
[[Category:Biochemical_Scripts]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Movie_fade&amp;diff=13963</id>
		<title>Movie fade</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Movie_fade&amp;diff=13963"/>
		<updated>2014-06-10T13:10:41Z</updated>

		<summary type="html">&lt;p&gt;Andwar: /* See Also */ referenced movie_color_fade&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = Python Module&lt;br /&gt;
|filename  = movie_fade.py&lt;br /&gt;
|author    = [[User:Inchoate|Jason Vertrees]] and [[User:Speleo3|Thomas Holder]]&lt;br /&gt;
|license   = BSD-2-Clause&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This script will help fade in and out settings in a movie. Just specify the setting, it's initial value at an initial frame and it's ending value and frame.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
 movie_fade setting, startFrame, startVal, endFrame, endVal [, selection ]&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
To fade in sticks from fully transparent to fully opaque across 60 frames do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
mset 1x60&lt;br /&gt;
movie_fade stick_transparency, 1, 1., 60, 0.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More complex example which involves camera motion:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 1rx1, async=0&lt;br /&gt;
as cartoon&lt;br /&gt;
show surface&lt;br /&gt;
mset 1x80&lt;br /&gt;
movie.roll&lt;br /&gt;
movie_fade transparency,  1, 0., 40, 1.&lt;br /&gt;
movie_fade transparency, 41, 1., 80, 0.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example file:'''&lt;br /&gt;
{| width=&amp;quot;30%&amp;quot;&lt;br /&gt;
|+ style=&amp;quot;font-weight:bold; text-align:center; font-size:100%;&amp;quot; | &lt;br /&gt;
! Code !! Result&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import movie_fade&lt;br /&gt;
&lt;br /&gt;
fetch 1hpv, async=0&lt;br /&gt;
orient&lt;br /&gt;
&lt;br /&gt;
#format&lt;br /&gt;
bg black&lt;br /&gt;
show_as cartoon&lt;br /&gt;
color marine, ss s&lt;br /&gt;
color red, ss h&lt;br /&gt;
color white, ss l+&amp;quot;&amp;quot;&lt;br /&gt;
show sticks, resn 478&lt;br /&gt;
util.cbao resn 478&lt;br /&gt;
set surface_color, white, 1hpv&lt;br /&gt;
show surface&lt;br /&gt;
&lt;br /&gt;
#movie&lt;br /&gt;
mset 1x120&lt;br /&gt;
movie_fade transparency,1, 0, 60, 1, 1hpv&lt;br /&gt;
movie_fade transparency,61, 1, 120, 0, 1hpv&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
||[[File:Movie fade example.gif]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[mdo]]&lt;br /&gt;
* [[mappend]]&lt;br /&gt;
* [[set]]&lt;br /&gt;
* [[Movie_color_fade|movie_color_fade]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:UI_Scripts]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Movie_color_fade&amp;diff=12215</id>
		<title>Movie color fade</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Movie_color_fade&amp;diff=12215"/>
		<updated>2014-06-10T13:08:11Z</updated>

		<summary type="html">&lt;p&gt;Andwar: minor edits&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = Python Module&lt;br /&gt;
|filename  = movie_color_fade.py&lt;br /&gt;
|author    = [[User:Andwar|Andreas Warnecke]]&lt;br /&gt;
|license   = BSD-2-Clause&lt;br /&gt;
}}&lt;br /&gt;
[[Image:movie_color_fade_example_1.gif|right|movie_color_fade example]]&lt;br /&gt;
&lt;br /&gt;
'''movie_color_fade''' is like [[Movie_fade|movie_fade]], but will fade colors in a movie. Simply specify the arguments (see below).&lt;br /&gt;
* For instruction on setting up plugin import see [[Git intro]] or [[Plugin manager]]&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
{|-&lt;br /&gt;
||&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 movie_color_fade [ startframe [, startcolor [, endframe [, endcolor [, selection ]]]]]&lt;br /&gt;
 help movie_color_fade&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Arguments===&lt;br /&gt;
* startframe, endframe = beginning and end movie frame for fading&lt;br /&gt;
** if omitted, the current or last frame will be respectively set automatically&lt;br /&gt;
* startcolor, endcolor = coloring at start and end&lt;br /&gt;
* selection: target selection&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
This example yields the movie to the top right&lt;br /&gt;
{|-&lt;br /&gt;
||&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# make function available to PyMOL&lt;br /&gt;
import movie_color_fade&lt;br /&gt;
&lt;br /&gt;
# object prep&lt;br /&gt;
bg black&lt;br /&gt;
delete all&lt;br /&gt;
fetch 1hpv, async=0&lt;br /&gt;
as cartoon&lt;br /&gt;
orient&lt;br /&gt;
color yellow, chain A&lt;br /&gt;
color skyblue, chain B&lt;br /&gt;
# movie prep&lt;br /&gt;
mset 1x120&lt;br /&gt;
&lt;br /&gt;
# color fading&lt;br /&gt;
movie_color_fade 1, yellow, 60, skyblue, chain A&lt;br /&gt;
movie_color_fade 60, skyblue, 120, yellow, chain A&lt;br /&gt;
movie_color_fade 1, skyblue, 60, yellow, chain B&lt;br /&gt;
movie_color_fade 60, yellow, 120, skyblue, chain B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
* [[Movie_fade]]&lt;br /&gt;
* [[mappend]]&lt;br /&gt;
* [[Color]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:UI_Scripts]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Movie_color_fade&amp;diff=12214</id>
		<title>Movie color fade</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Movie_color_fade&amp;diff=12214"/>
		<updated>2014-06-10T13:05:40Z</updated>

		<summary type="html">&lt;p&gt;Andwar: created page: movie_color_fade&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = Python Module&lt;br /&gt;
|filename  = movie_color_fade.py&lt;br /&gt;
|author    = [[User:Andwar|Andreas Warnecke]]&lt;br /&gt;
|license   = BSD-2-Clause&lt;br /&gt;
}}&lt;br /&gt;
[[Image:movie_color_fade_example_1.gif|right|movie_color_fade example]]&lt;br /&gt;
&lt;br /&gt;
'''movie_color_fade''' is like [[Movie_fade|movie_fade]], but will fade colors in a movie. Simply specify the arguments (see below).&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
{|-&lt;br /&gt;
||&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 movie_color_fade [ startframe [, startcolor [, endframe [, endcolor [, selection ]]]]]&lt;br /&gt;
 help movie_color_fade&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Arguments===&lt;br /&gt;
* startframe, endframe = beginning and end movie frame for fading&lt;br /&gt;
** if omitted, the current or last frame will be respectively set automatically&lt;br /&gt;
* startcolor, endcolor = coloring at start and end&lt;br /&gt;
* selection: target selection&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
This example yields the movie to the top right&lt;br /&gt;
{|-&lt;br /&gt;
||&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# object prep&lt;br /&gt;
bg black&lt;br /&gt;
delete all&lt;br /&gt;
fetch 1hpv, async=0&lt;br /&gt;
as cartoon&lt;br /&gt;
orient&lt;br /&gt;
color yellow, chain A&lt;br /&gt;
color skyblue, chain B&lt;br /&gt;
# movie prep&lt;br /&gt;
mset 1x120&lt;br /&gt;
&lt;br /&gt;
# color fading&lt;br /&gt;
movie_color_fade 1, yellow, 60, skyblue, chain A&lt;br /&gt;
movie_color_fade 60, skyblue, 120, yellow, chain A&lt;br /&gt;
movie_color_fade 1, skyblue, 60, yellow, chain B&lt;br /&gt;
movie_color_fade 60, yellow, 120, skyblue, chain B&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
* [[Movie_fade]]&lt;br /&gt;
* [[mappend]]&lt;br /&gt;
* [[Color]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:UI_Scripts]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Get_colors&amp;diff=12209</id>
		<title>Get colors</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Get_colors&amp;diff=12209"/>
		<updated>2014-06-10T12:46:54Z</updated>

		<summary type="html">&lt;p&gt;Andwar: added category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = Python Module&lt;br /&gt;
|filename  = get_colors.py&lt;br /&gt;
|author    = [[User:Andwar|Andreas Warnecke]]&lt;br /&gt;
|license   = BSD-2-Clause&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
* '''get_colors''' contains two functions that can be useful when working with colors&lt;br /&gt;
** ''get_colors'' : returns all available PyMOL colors&lt;br /&gt;
** ''get_random_color'' : returns a random available PyMOL color&lt;br /&gt;
&lt;br /&gt;
* Note that basic colors can be accessed manually without this script from the PyMOL menu under '''Setting''' --&amp;gt; '''Colors...'''&lt;br /&gt;
* For instruction on setting up plugin import see [[Git intro]] or [[Plugin manager]]&lt;br /&gt;
&lt;br /&gt;
[[Image:1LSD_random_colors.png|right|300px|1LSD colored randomly by residue]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
 get_colors [ selection [, quiet ]]&lt;br /&gt;
 get_random_color [ selection [, quiet ]]&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
{|-&lt;br /&gt;
||&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# basic example&lt;br /&gt;
get_colors # basic colors&lt;br /&gt;
get colors all # larger range with intermediates&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#get disco funky&lt;br /&gt;
import get_colors&lt;br /&gt;
from get_colors import get_colors&lt;br /&gt;
from get_colors import get_random_color&lt;br /&gt;
&lt;br /&gt;
cmd.delete('all')&lt;br /&gt;
cmd.fetch('1LSD', async=0) # :P&lt;br /&gt;
cmd.hide('everything')&lt;br /&gt;
cmd.show_as('sticks','not hetatm')&lt;br /&gt;
cmd.orient()&lt;br /&gt;
&lt;br /&gt;
python # start a python block&lt;br /&gt;
from pymol import stored&lt;br /&gt;
stored.atom_list=[]&lt;br /&gt;
cmd.iterate('name CA','stored.atom_list.append([model, resi])')&lt;br /&gt;
resi_list=[&amp;quot;model %s and resi %s&amp;quot;%(value[0],value[1]) for value in stored.atom_list]&lt;br /&gt;
for resi in resi_list: cmd.color(get_random_color(),resi)&lt;br /&gt;
python end # end python block&lt;br /&gt;
cmd.ray()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
* [[Color]]&lt;br /&gt;
* [[Get Color Indices]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:UI_Scripts]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Color&amp;diff=13449</id>
		<title>Color</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Color&amp;diff=13449"/>
		<updated>2014-06-10T12:40:16Z</updated>

		<summary type="html">&lt;p&gt;Andwar: /* Getting Atom Colors */ added hint to colors menu and script&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;
====Reassigning B-Factors and Coloring - from file ====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
reinitialize&lt;br /&gt;
prot=&amp;quot;1XYZ&amp;quot;&lt;br /&gt;
cmd.fetch(prot,async=0)&lt;br /&gt;
&lt;br /&gt;
# Set b value to zero&lt;br /&gt;
cmd.alter(prot,b=0.0)&lt;br /&gt;
cmd.show_as(&amp;quot;cartoon&amp;quot;,prot)&lt;br /&gt;
&lt;br /&gt;
python&lt;br /&gt;
inFile = open(&amp;quot;phi_values.txt&amp;quot;, 'r')&lt;br /&gt;
val_list = []&lt;br /&gt;
for line in inFile.readlines()[1:]:&lt;br /&gt;
    split = line.split()&lt;br /&gt;
    resn = split[0][0] &lt;br /&gt;
    resi = split[0][1:-1]&lt;br /&gt;
    phi_ppm2 = float(split[1])&lt;br /&gt;
    phi_ppm2_err = float(split[3])&lt;br /&gt;
    R2_0 = float(split[4])&lt;br /&gt;
    R2_0_err = float(split[6])&lt;br /&gt;
    print &amp;quot;Resn=%s Resi=%s, phi_ppm2=%2.2f, phi_ppm2_err=%2.2f, R2_0=%2.2f, R2_0_err=%2.2f&amp;quot;%(resn,resi,phi_ppm2,phi_ppm2_err,R2_0,R2_0_err)&lt;br /&gt;
&lt;br /&gt;
    val_list.append(phi_ppm2)&lt;br /&gt;
    cmd.alter(&amp;quot;%s and resi %s and n. CA&amp;quot;%(prot,resi), &amp;quot;b=%s&amp;quot;%phi_ppm2)&lt;br /&gt;
&lt;br /&gt;
python end&lt;br /&gt;
minval = min(val_list)&lt;br /&gt;
print minval&lt;br /&gt;
maxval = max(val_list)&lt;br /&gt;
print maxval&lt;br /&gt;
cmd.spectrum(&amp;quot;b&amp;quot;, &amp;quot;blue_white_red&amp;quot;, &amp;quot;%s and n. CA&amp;quot;%prot, minimum=0, maximum=maxval)&lt;br /&gt;
cmd.ramp_new(&amp;quot;ramp_obj&amp;quot;, prot, range=[0, minval, maxval], color=&amp;quot;[blue, white, red ]&amp;quot;)&lt;br /&gt;
cmd.save(&amp;quot;%s_newBFactors.pdb&amp;quot;%prot, &amp;quot;%s&amp;quot;%prot)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expanding to Surface ===&lt;br /&gt;
See [[Expand_To_Surface]].&lt;br /&gt;
&lt;br /&gt;
If you have run the above code and would like the colors to be shown in the [[Surface]] representation, too, then you need to do the following:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Assumes alpha carbons colored from above.&lt;br /&gt;
create ca_obj, your-object-name and name ca &lt;br /&gt;
ramp_new ramp_obj, ca_obj, [0, 10], [-1, -1, 0]&lt;br /&gt;
set surface_color, ramp_obj, your-object-name&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thanks to Warren, for this one.&lt;br /&gt;
&lt;br /&gt;
=== Getting Atom Colors ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
stored.list = []&lt;br /&gt;
iterate all, stored.list.append(color) # use cmd.get_color_tuple(color) to convert color index to RGB values&lt;br /&gt;
print stored.list&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, you can [[label]] each atom by it's color code:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
label all, color&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What colors does PyMOL currently have? ===&lt;br /&gt;
basic colors can be manually accessed and edited from the PyMOL menu under '''Setting''' --&amp;gt; '''Colors...'''&amp;lt;br&amp;gt;&lt;br /&gt;
[[Get_colors]] is a script that allows accessing colors&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;
* [[Ramp_New]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Objects_and_Selections|Color]]&lt;br /&gt;
[[Category:Commands|Color]]&lt;br /&gt;
[[Category:States|Coloring states individually]]&lt;br /&gt;
[[Category:Coloring|Color]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Get_colors&amp;diff=12208</id>
		<title>Get colors</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Get_colors&amp;diff=12208"/>
		<updated>2014-06-10T12:35:05Z</updated>

		<summary type="html">&lt;p&gt;Andwar: created get_colors page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = Python Module&lt;br /&gt;
|filename  = get_colors.py&lt;br /&gt;
|author    = [[User:Andwar|Andreas Warnecke]]&lt;br /&gt;
|license   = BSD-2-Clause&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
* '''get_colors''' contains two functions that can be useful when working with colors&lt;br /&gt;
** ''get_colors'' : returns all available PyMOL colors&lt;br /&gt;
** ''get_random_color'' : returns a random available PyMOL color&lt;br /&gt;
&lt;br /&gt;
* Note that basic colors can be accessed manually without this script from the PyMOL menu under '''Setting''' --&amp;gt; '''Colors...'''&lt;br /&gt;
* For instruction on setting up plugin import see [[Git intro]] or [[Plugin manager]]&lt;br /&gt;
&lt;br /&gt;
[[Image:1LSD_random_colors.png|right|300px|1LSD colored randomly by residue]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
 get_colors [ selection [, quiet ]]&lt;br /&gt;
 get_random_color [ selection [, quiet ]]&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
{|-&lt;br /&gt;
||&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# basic example&lt;br /&gt;
get_colors # basic colors&lt;br /&gt;
get colors all # larger range with intermediates&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#get disco funky&lt;br /&gt;
import get_colors&lt;br /&gt;
from get_colors import get_colors&lt;br /&gt;
from get_colors import get_random_color&lt;br /&gt;
&lt;br /&gt;
cmd.delete('all')&lt;br /&gt;
cmd.fetch('1LSD', async=0) # :P&lt;br /&gt;
cmd.hide('everything')&lt;br /&gt;
cmd.show_as('sticks','not hetatm')&lt;br /&gt;
cmd.orient()&lt;br /&gt;
&lt;br /&gt;
python # start a python block&lt;br /&gt;
from pymol import stored&lt;br /&gt;
stored.atom_list=[]&lt;br /&gt;
cmd.iterate('name CA','stored.atom_list.append([model, resi])')&lt;br /&gt;
resi_list=[&amp;quot;model %s and resi %s&amp;quot;%(value[0],value[1]) for value in stored.atom_list]&lt;br /&gt;
for resi in resi_list: cmd.color(get_random_color(),resi)&lt;br /&gt;
python end # end python block&lt;br /&gt;
cmd.ray()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
* [[Color]]&lt;br /&gt;
* [[Get Color Indices]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=User:Andwar&amp;diff=12527</id>
		<title>User:Andwar</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=User:Andwar&amp;diff=12527"/>
		<updated>2014-06-10T11:52:47Z</updated>

		<summary type="html">&lt;p&gt;Andwar: created user page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you have any questions, comments or suggestions please feel free to contact me by mail: 4ndreas ''(dot)'' warneck3 ''(@)'' gmail ''dot'' com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==About me==&lt;br /&gt;
My name is Andreas Warnecke. I have a background in Molecular Medicine and am pursuing a PhD in Immunology at [http://ki.se/# Karlolinska Institutet]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=='Pymol-script-repo' contributions by me==&lt;br /&gt;
* [[Format_bonds]]&lt;br /&gt;
* [[Get_colors]]&lt;br /&gt;
* [[Movie_color_fade]]&lt;br /&gt;
* [[Quickdisplays]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Quickdisplays&amp;diff=12009</id>
		<title>Quickdisplays</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Quickdisplays&amp;diff=12009"/>
		<updated>2014-06-10T11:18:22Z</updated>

		<summary type="html">&lt;p&gt;Andwar: created script page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = Python Module&lt;br /&gt;
|filename  = quickdisplays.py&lt;br /&gt;
|author    = [[User:Andwar|Andreas Warnecke]]&lt;br /&gt;
|license   = BSD-2-Clause&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The module '''quickdisplays''' is a package containing several functions for quick standard displays:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;3;&amp;quot;|List of functions&lt;br /&gt;
|- style=&amp;quot;text-align:center;&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Function&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| What it does&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;| Usage&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| disp_list &lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| prints a list of functions &lt;br /&gt;
| disp_list&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| disp_ss &lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| secondary structure &lt;br /&gt;
| disp_ss [ selection [, colors [, only ]]]&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| disp_ball_stick &lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| balls and sticks  &lt;br /&gt;
|disp_ball_stick [ selection [, hydrogens [, only ]]]&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| disp_mesh &lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| surface mesh &lt;br /&gt;
| disp_mesh [ selection [, color_m [, hydrogens [, only [, limits ]]]]]&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| disp_surf &lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| surface &lt;br /&gt;
| disp_surf [ selection [, color_s [, transparency [, hydrogens [, solvent [, ramp_above [, only [, limits ]]]]]]]]&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot;| disp_putty &lt;br /&gt;
| style=&amp;quot;text-align:center;&amp;quot;| putty b-factor sausage &lt;br /&gt;
| disp_putty [ selection [, limits [, only ]]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Note that each function has an '''individual help destription''', callable by entering, e.g.:&lt;br /&gt;
 help disp_surf&lt;br /&gt;
* For instruction on setting up plugin import see [[Git intro]] or [[Plugin manager]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;5;&amp;quot;|Examples&lt;br /&gt;
|- style=&amp;quot;text-align:center;&amp;quot;&lt;br /&gt;
| [[Image:Quickdisplays_disp_surf.png|center|300px]]'''disp_surf'''&amp;lt;br&amp;gt;''surface''&lt;br /&gt;
| [[Image:Quickdisplays_disp_ss.png|center|300px]]'''disp_ss'''&amp;lt;br&amp;gt;''secondary structure''&lt;br /&gt;
| [[Image:Quickdisplays_disp_putty.png|center|300px]]'''disp_putty'''&amp;lt;br&amp;gt;''putty b-factor sausage''&lt;br /&gt;
| colspan=&amp;quot;2;&amp;quot; rowspan=&amp;quot;2;&amp;quot; style=&amp;quot;text-align:left;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
The ''combined displays'' example was produced like this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import quickdisplays&lt;br /&gt;
fetch 1hpv, async=0&lt;br /&gt;
&lt;br /&gt;
disp_putty all, limits=10&lt;br /&gt;
disp_surf color_s=lightblue, transparency=0.8&lt;br /&gt;
disp_ss chain B&lt;br /&gt;
disp_ball_stick hetatm&lt;br /&gt;
util.cbao hetatm&lt;br /&gt;
set mesh_mode, 1 # make sure hetams are meshed&lt;br /&gt;
set mesh_cutoff, 4.5&lt;br /&gt;
disp_mesh resn 478, color_m=green&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|- style=&amp;quot;text-align:center;&amp;quot;&lt;br /&gt;
| [[Image:Quickdisplays_disp_mesh.png|center|300px]]'''disp_mesh'''&amp;lt;br&amp;gt;''mesh''&lt;br /&gt;
| [[Image:Quickdisplays_disp_ball_stick.png|center|300px]]'''disp_ball_stick'''&amp;lt;br&amp;gt;''balls and sticks''&lt;br /&gt;
| [[Image:Quickdisplays_combo.png|center|300px]]''combined displays''&amp;lt;br&amp;gt;see example&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Some notes on the arguments==&lt;br /&gt;
* '''selection''' can be used to restrict the display to certain objects or selections, the default is 'all'&lt;br /&gt;
* '''only''' can be ''True'' or ''False'' and will toggle whether the display will be added (''show'') or replace others (''show_as'')&lt;br /&gt;
* '''disp_mesh''' and '''disp_surf''' support the color '''putty''', which will color the object/selection by b-factor&lt;br /&gt;
* '''limits''' defines the b-factor color range: &lt;br /&gt;
** a list entry will define absolute values '''[min;max]'''&lt;br /&gt;
** a float value will calculate the corresponding percentiles '''&amp;amp;plusmn;value%''', ''default=5''&lt;br /&gt;
* setting '''hydrogens''' will add hydrogen to the model; if set to ''=False'', hydrogens are removed, if omitted the state of hydogens will be 'as is'&lt;br /&gt;
* '''colors''' in '''disp_ss''' is flexible:&lt;br /&gt;
** set e.g. three colors, e.g. 'red green blue' for sheets, helices and loops, respectively (cf. example) &lt;br /&gt;
** alternatively certain 'util.' functions can be used (cf. example)&lt;br /&gt;
** setting ''False'' once or for individual colors will suppress coloring&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Applied example ==&lt;br /&gt;
Enter the following lines one-by-one and observe how the display will be affected&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# import function to PyMOL&lt;br /&gt;
import quickdisplays&lt;br /&gt;
&lt;br /&gt;
# prep&lt;br /&gt;
fetch 1hpv, async=0&lt;br /&gt;
bg black&lt;br /&gt;
orient&lt;br /&gt;
disp_list # list of functions&lt;br /&gt;
&lt;br /&gt;
help disp_ss # check out help&lt;br /&gt;
disp_ss&lt;br /&gt;
disp_ss only=T&lt;br /&gt;
disp_ss colors=smudge orange grey&lt;br /&gt;
disp_ss colors=chartreuse False False # False suppresses coloring&lt;br /&gt;
disp_ss colors=util.chainbow # You can use util.cbc, util.rainbow, ...&lt;br /&gt;
&lt;br /&gt;
help disp_ball_stick # check out help&lt;br /&gt;
disp_ball_stick hetatm&lt;br /&gt;
disp_ball_stick all, only=T&lt;br /&gt;
util.cbaw&lt;br /&gt;
disp_ball_stick hydrogens=1&lt;br /&gt;
disp_ball_stick hydrogens=-1&lt;br /&gt;
disp_stick_ball # will this work?&lt;br /&gt;
&lt;br /&gt;
help disp_mesh # check out help&lt;br /&gt;
disp_mesh&lt;br /&gt;
disp_mesh color_m=green, only=False&lt;br /&gt;
disp_mesh color_m=green, only=T&lt;br /&gt;
disp_ball_stick hetatm&lt;br /&gt;
set mesh_skip, 2 # omits lines in mesh&lt;br /&gt;
disp_mesh color_m=default, hydrogens=1, only=T&lt;br /&gt;
disp_mesh color_m=putty, hydrogens=0, limits=20&lt;br /&gt;
disp_mesh color_m=putty, limits=30&lt;br /&gt;
disp_mesh color_m=putty, limits=[15,50]&lt;br /&gt;
&lt;br /&gt;
help disp_putty # check out help&lt;br /&gt;
disp_putty chain A, only=False, limits=[15,50] #only default is True&lt;br /&gt;
disp_putty all, limits=0&lt;br /&gt;
disp_putty all, limits=10&lt;br /&gt;
&lt;br /&gt;
help disp_surf # check out help&lt;br /&gt;
disp_surf color_s=white, solvent=1&lt;br /&gt;
disp_surf color_s=white# solvent=0&lt;br /&gt;
disp_surf color_s=lightblue, transparency=0.8&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
[[Git intro]], [[Displaying Biochemical Properties]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Biochemical_Properties]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Valence&amp;diff=12812</id>
		<title>Valence</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Valence&amp;diff=12812"/>
		<updated>2014-06-09T20:42:19Z</updated>

		<summary type="html">&lt;p&gt;Andwar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
Turning on '''valence''' will enable the display of double bonds.&amp;lt;br&amp;gt;&lt;br /&gt;
Toggling '''valence_mode''' alters the positioning of double bonds (for representation as [[Lines]])&amp;lt;br&amp;gt;&lt;br /&gt;
'''valence_size''' alters the distance of double bonds.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that bonds can be edited to be delocalized using [[Unbond]] and [[Bond]].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&amp;lt;gallery heights=&amp;quot;200px&amp;quot; widths=&amp;quot;200px&amp;quot; align=&amp;quot;left&amp;quot; perrow=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
Image:PHE_valence_0.png|set valence, 0&amp;lt;br&amp;gt;#(no double bonds)&lt;br /&gt;
Image:PHE_valence_1_mode_1.png|set valence, 1&amp;lt;br&amp;gt;set valence_mode, 1&amp;lt;br&amp;gt;#bonds inside&lt;br /&gt;
Image:PHE_valence_1_mode_0.png|set valence, 1&amp;lt;br&amp;gt;set valence_mode, 0&amp;lt;br&amp;gt;#bonds centered&lt;br /&gt;
Image:PHE_delocalized.png|set valence, 1&amp;lt;br&amp;gt;#delocalized bonds&amp;lt;br&amp;gt;#(edited: see [[Bond]])&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''valence_size''' alters the distance of double bonds, but behaves slightly different depending on valence_mode&amp;lt;br&amp;gt;&lt;br /&gt;
{| width=&amp;quot;45%&amp;quot;&lt;br /&gt;
|+ style=&amp;quot;font-weight:bold; text-align:center; font-size:100%;&amp;quot; | valence_size&lt;br /&gt;
! valence_size with valence_mode 1&amp;lt;br&amp;gt; inside !! valence_size with valence_mode 0 &amp;lt;br&amp;gt; centered&lt;br /&gt;
|-&lt;br /&gt;
||[[File:valence_size_mode1.gif]] ||  [[File:valence_size_mode0.gif]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set valence, 0 # off&lt;br /&gt;
set valence, 1 # on&lt;br /&gt;
&lt;br /&gt;
set valence_mode, 0 # centered&lt;br /&gt;
set valence_mode, 1 # inside&lt;br /&gt;
&lt;br /&gt;
set valence_size, 0.1 # default: 0.06 # range 0 - ~0.5 &lt;br /&gt;
&lt;br /&gt;
# Editing bonds:&lt;br /&gt;
# In editing mode: select the bond using Ctrl-right-click, then enter:&lt;br /&gt;
unbond pk1,pk2&lt;br /&gt;
bond pk1,pk2,4&lt;br /&gt;
# 1: single bond, 2: double bond, 3:triple bond, 4:delocalized&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Automatic editing of bonds==&lt;br /&gt;
[[Format_bonds]] is a script that automatically formats valence in amino acids.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SEE ALSO==&lt;br /&gt;
[[Bond]], [[Unbond]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Settings|Valence]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Plugin_Manager&amp;diff=12648</id>
		<title>Plugin Manager</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Plugin_Manager&amp;diff=12648"/>
		<updated>2014-06-06T22:50:30Z</updated>

		<summary type="html">&lt;p&gt;Andwar: corrected path for windows&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Newer versions of PyMOL come with a '''Plugin Manager''', which can be used to load plugins such as those in the [https://github.com/Pymol-Scripts/Pymol-script-repo# PyMOL Script Repo].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Manual Setup=&lt;br /&gt;
In the PyMOL menu naviagte to '''Plugins''' &amp;gt; '''Plugin Manager''' &amp;lt;br&amp;gt;&lt;br /&gt;
Here you can manually add directories or scripts that will be loaded upon startup.&amp;lt;br&amp;gt;&lt;br /&gt;
Older versions have a basic version of this manager: '''Plugin''' &amp;gt; '''Manage Plugins''', however, here the scripts need to be added individually.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Scripted setup during PyMOL launching=&lt;br /&gt;
===Creating run_on_startup.py===&lt;br /&gt;
'''run_on_startup.py''' can easily be created using a text editor such as notepad.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''run_on_startup.py''' is handled similar to [[Pymolrc|pymolrc]] files and is executed every time PyMOL launches.&amp;lt;br&amp;gt;&lt;br /&gt;
An important distinction is that '''run_on_startup.py''' is executed before the [[Pymolrc|pymolrc]] files and is purely written in python.&amp;lt;br&amp;gt;&lt;br /&gt;
The recommended location of '''run_on_startup.py''' is the PyMOL home directory (PYMOL_PATH, e.g. something like 'C:\Program Files \PyMOL\').&amp;lt;br&amp;gt; &lt;br /&gt;
An advantage is that should PyMOL be installed on a computer with several users, this will be run for all users, while the pymolrc files can be individual (e.g. in the USER directory).&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#this can be copy-pasted to create run_on_startup.py in the home directory&lt;br /&gt;
 &lt;br /&gt;
# Add paths to sys.path so PyMOL can find modules and scripts&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
 &lt;br /&gt;
pymol_git = os.path.realpath(os.path.join(os.environ['PYMOL_PATH'], 'Pymol-script-repo'))&lt;br /&gt;
 &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;
try: # in case the PyMOL is older and doe not have the module pymol.plugins&lt;br /&gt;
    import pymol.plugins&lt;br /&gt;
 &lt;br /&gt;
    #THIS IS WHERE THE PATH IS ADDED TO INITIALIZE PLUGINS USING THE PLUGIN MANAGER&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;
 &lt;br /&gt;
    pymol.plugins.preferences = {'instantsave': False, 'verbose': False}&lt;br /&gt;
    pymol.plugins.autoload = {'apbs_tools': False}&lt;br /&gt;
    pymol.plugins.preferences = {'instantsave': True, 'verbose': False}&lt;br /&gt;
    # This can be used to trace if PyMOL executed the file correctly&lt;br /&gt;
    print 'Loaded run_on_stratup.py'&lt;br /&gt;
except:&lt;br /&gt;
    print 'NB! Plugin Manager not present!'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note that this block will also add the '''Pymol-script-repo''' and the subfolder '''Pymol-script-repo/modules''' to PyMOL's search path.&amp;lt;br&amp;gt;&lt;br /&gt;
This is something that is required in earlier PyMOL version to allow import of scripts. Thus this version of '''run_on_startup.py''' can be used for older versions, too.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that the settings specific for the ''new'' version of the '''Plugin Manager''' will not have an effect.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===What if the 'Pymol-script-repo' is not in the PyMOL directory?===&lt;br /&gt;
If the '''Pymol-script-repo''' is located somewhere else the first section of the '''run_on_startup.py''' file will be different.&amp;lt;br&amp;gt;&lt;br /&gt;
E.g. in the USER directory:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# This would replace the first section in '''run_on_startup.py'''.&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
&lt;br /&gt;
pymol_git = os.path.abspath(os.path.join(os.path.expanduser('~'), 'Pymol-script-repo'))&lt;br /&gt;
&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;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
E.g. in any other path:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# This would replace the first section in '''run_on_startup.py'''.&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
&lt;br /&gt;
pymol_git = os.path.realpath('D:/MY/RANDOM/PATH/TO/Pymol-script-repo') # Adjust this line&lt;br /&gt;
# Note the slash ('/') instead of backslash ('\'), beware Windows users!&lt;br /&gt;
&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;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Appending additional paths to the Plugin Manager===&lt;br /&gt;
Should your scripts be located in several alternative locations, it is possible to append additional directories to the '''Plugin Manager'''.&amp;lt;br&amp;gt;&lt;br /&gt;
In the example below, a directory called 'plugins_private', which is located in the PyMOL directory, is added to the Plugin Manger.&amp;lt;br&amp;gt;&lt;br /&gt;
Should the folder be somewhere else the example below can be adjusted as outlined above.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#copy paste into PyMOL's command line or into the pymolrc&lt;br /&gt;
&lt;br /&gt;
python&lt;br /&gt;
import os&lt;br /&gt;
import sys&lt;br /&gt;
import pymol.plugins # Note that this requires the 'new' Plugin Manager&lt;br /&gt;
&lt;br /&gt;
PRIVATE_PATH=os.path.realpath(os.path.join(os.environ['PYMOL_PATH'], 'plugins_private'))&lt;br /&gt;
startupdirectories=list(pymol.plugins.get_startup_path(True))&lt;br /&gt;
if PRIVATE_PATH not in startupdirectories:&lt;br /&gt;
    startupdirectories.append(PRIVATE_PATH)&lt;br /&gt;
if PRIVATE_PATH not in sys.path:&lt;br /&gt;
    sys.path.append(PRIVATE_PATH)&lt;br /&gt;
pymol.plugins.set_startup_path(startupdirectories)&lt;br /&gt;
python end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the '''Plugin Manager''' supports loading entire folders with scripts ('modules').&amp;lt;br&amp;gt;&lt;br /&gt;
If you have such a folder, make sure it contains a file called '__init__.py', which can be empty.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=If you don't have a Plugin Manager=&lt;br /&gt;
If you are running an older PyMOL without '''Plugin Manager''' you can either upgrade to the newest version or load plugins the traditional way. &amp;lt;br&amp;gt;&lt;br /&gt;
For detailed instructions see: [[Git install scripts]]&amp;lt;br&amp;gt;&lt;br /&gt;
Essentially, make sure that the folder is added to PyMOL's search paths.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
pymol_git = os.path.realpath(os.path.join(os.environ['PYMOL_PATH'], 'Pymol-script-repo'))&lt;br /&gt;
sys.path.append(pymol_git)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Import a plugin manually:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# EXAMPLE&lt;br /&gt;
delete all&lt;br /&gt;
frag LYS&lt;br /&gt;
cgo_arrow name N, name O # will not work if 'cgo_arrow' is not loaded&lt;br /&gt;
&lt;br /&gt;
import cgo_arrow # PyMOL will look for this file and load it&lt;br /&gt;
cgo_arrow name N, name O # should work if it is loaded&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=SEE ALSO=&lt;br /&gt;
[[Git install scripts]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Launching]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Plugin_manager&amp;diff=11949</id>
		<title>Plugin manager</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Plugin_manager&amp;diff=11949"/>
		<updated>2014-06-06T22:50:30Z</updated>

		<summary type="html">&lt;p&gt;Andwar: corrected path for windows&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Newer versions of PyMOL come with a '''Plugin Manager''', which can be used to load plugins such as those in the [https://github.com/Pymol-Scripts/Pymol-script-repo# PyMOL Script Repo].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Manual Setup=&lt;br /&gt;
In the PyMOL menu naviagte to '''Plugins''' &amp;gt; '''Plugin Manager''' &amp;lt;br&amp;gt;&lt;br /&gt;
Here you can manually add directories or scripts that will be loaded upon startup.&amp;lt;br&amp;gt;&lt;br /&gt;
Older versions have a basic version of this manager: '''Plugin''' &amp;gt; '''Manage Plugins''', however, here the scripts need to be added individually.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Scripted setup during PyMOL launching=&lt;br /&gt;
===Creating run_on_startup.py===&lt;br /&gt;
'''run_on_startup.py''' can easily be created using a text editor such as notepad.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''run_on_startup.py''' is handled similar to [[Pymolrc|pymolrc]] files and is executed every time PyMOL launches.&amp;lt;br&amp;gt;&lt;br /&gt;
An important distinction is that '''run_on_startup.py''' is executed before the [[Pymolrc|pymolrc]] files and is purely written in python.&amp;lt;br&amp;gt;&lt;br /&gt;
The recommended location of '''run_on_startup.py''' is the PyMOL home directory (PYMOL_PATH, e.g. something like 'C:\Program Files \PyMOL\').&amp;lt;br&amp;gt; &lt;br /&gt;
An advantage is that should PyMOL be installed on a computer with several users, this will be run for all users, while the pymolrc files can be individual (e.g. in the USER directory).&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#this can be copy-pasted to create run_on_startup.py in the home directory&lt;br /&gt;
 &lt;br /&gt;
# Add paths to sys.path so PyMOL can find modules and scripts&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
 &lt;br /&gt;
pymol_git = os.path.realpath(os.path.join(os.environ['PYMOL_PATH'], 'Pymol-script-repo'))&lt;br /&gt;
 &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;
try: # in case the PyMOL is older and doe not have the module pymol.plugins&lt;br /&gt;
    import pymol.plugins&lt;br /&gt;
 &lt;br /&gt;
    #THIS IS WHERE THE PATH IS ADDED TO INITIALIZE PLUGINS USING THE PLUGIN MANAGER&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;
 &lt;br /&gt;
    pymol.plugins.preferences = {'instantsave': False, 'verbose': False}&lt;br /&gt;
    pymol.plugins.autoload = {'apbs_tools': False}&lt;br /&gt;
    pymol.plugins.preferences = {'instantsave': True, 'verbose': False}&lt;br /&gt;
    # This can be used to trace if PyMOL executed the file correctly&lt;br /&gt;
    print 'Loaded run_on_stratup.py'&lt;br /&gt;
except:&lt;br /&gt;
    print 'NB! Plugin Manager not present!'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note that this block will also add the '''Pymol-script-repo''' and the subfolder '''Pymol-script-repo/modules''' to PyMOL's search path.&amp;lt;br&amp;gt;&lt;br /&gt;
This is something that is required in earlier PyMOL version to allow import of scripts. Thus this version of '''run_on_startup.py''' can be used for older versions, too.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that the settings specific for the ''new'' version of the '''Plugin Manager''' will not have an effect.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===What if the 'Pymol-script-repo' is not in the PyMOL directory?===&lt;br /&gt;
If the '''Pymol-script-repo''' is located somewhere else the first section of the '''run_on_startup.py''' file will be different.&amp;lt;br&amp;gt;&lt;br /&gt;
E.g. in the USER directory:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# This would replace the first section in '''run_on_startup.py'''.&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
&lt;br /&gt;
pymol_git = os.path.abspath(os.path.join(os.path.expanduser('~'), 'Pymol-script-repo'))&lt;br /&gt;
&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;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
E.g. in any other path:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# This would replace the first section in '''run_on_startup.py'''.&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
&lt;br /&gt;
pymol_git = os.path.realpath('D:/MY/RANDOM/PATH/TO/Pymol-script-repo') # Adjust this line&lt;br /&gt;
# Note the slash ('/') instead of backslash ('\'), beware Windows users!&lt;br /&gt;
&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;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Appending additional paths to the Plugin Manager===&lt;br /&gt;
Should your scripts be located in several alternative locations, it is possible to append additional directories to the '''Plugin Manager'''.&amp;lt;br&amp;gt;&lt;br /&gt;
In the example below, a directory called 'plugins_private', which is located in the PyMOL directory, is added to the Plugin Manger.&amp;lt;br&amp;gt;&lt;br /&gt;
Should the folder be somewhere else the example below can be adjusted as outlined above.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#copy paste into PyMOL's command line or into the pymolrc&lt;br /&gt;
&lt;br /&gt;
python&lt;br /&gt;
import os&lt;br /&gt;
import sys&lt;br /&gt;
import pymol.plugins # Note that this requires the 'new' Plugin Manager&lt;br /&gt;
&lt;br /&gt;
PRIVATE_PATH=os.path.realpath(os.path.join(os.environ['PYMOL_PATH'], 'plugins_private'))&lt;br /&gt;
startupdirectories=list(pymol.plugins.get_startup_path(True))&lt;br /&gt;
if PRIVATE_PATH not in startupdirectories:&lt;br /&gt;
    startupdirectories.append(PRIVATE_PATH)&lt;br /&gt;
if PRIVATE_PATH not in sys.path:&lt;br /&gt;
    sys.path.append(PRIVATE_PATH)&lt;br /&gt;
pymol.plugins.set_startup_path(startupdirectories)&lt;br /&gt;
python end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the '''Plugin Manager''' supports loading entire folders with scripts ('modules').&amp;lt;br&amp;gt;&lt;br /&gt;
If you have such a folder, make sure it contains a file called '__init__.py', which can be empty.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=If you don't have a Plugin Manager=&lt;br /&gt;
If you are running an older PyMOL without '''Plugin Manager''' you can either upgrade to the newest version or load plugins the traditional way. &amp;lt;br&amp;gt;&lt;br /&gt;
For detailed instructions see: [[Git install scripts]]&amp;lt;br&amp;gt;&lt;br /&gt;
Essentially, make sure that the folder is added to PyMOL's search paths.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
pymol_git = os.path.realpath(os.path.join(os.environ['PYMOL_PATH'], 'Pymol-script-repo'))&lt;br /&gt;
sys.path.append(pymol_git)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Import a plugin manually:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# EXAMPLE&lt;br /&gt;
delete all&lt;br /&gt;
frag LYS&lt;br /&gt;
cgo_arrow name N, name O # will not work if 'cgo_arrow' is not loaded&lt;br /&gt;
&lt;br /&gt;
import cgo_arrow # PyMOL will look for this file and load it&lt;br /&gt;
cgo_arrow name N, name O # should work if it is loaded&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=SEE ALSO=&lt;br /&gt;
[[Git install scripts]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Launching]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Plugin_Manager&amp;diff=12647</id>
		<title>Plugin Manager</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Plugin_Manager&amp;diff=12647"/>
		<updated>2014-06-06T19:14:11Z</updated>

		<summary type="html">&lt;p&gt;Andwar: some editing pointing out differences to the old plugin management&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Newer versions of PyMOL come with a '''Plugin Manager''', which can be used to load plugins such as those in the [https://github.com/Pymol-Scripts/Pymol-script-repo# PyMOL Script Repo].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Manual Setup=&lt;br /&gt;
In the PyMOL menu naviagte to '''Plugins''' &amp;gt; '''Plugin Manager''' &amp;lt;br&amp;gt;&lt;br /&gt;
Here you can manually add directories or scripts that will be loaded upon startup.&amp;lt;br&amp;gt;&lt;br /&gt;
Older versions have a basic version of this manager: '''Plugin''' &amp;gt; '''Manage Plugins''', however, here the scripts need to be added individually.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Scripted setup during PyMOL launching=&lt;br /&gt;
===Creating run_on_startup.py===&lt;br /&gt;
'''run_on_startup.py''' can easily be created using a text editor such as notepad.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''run_on_startup.py''' is handled similar to [[Pymolrc|pymolrc]] files and is executed every time PyMOL launches.&amp;lt;br&amp;gt;&lt;br /&gt;
An important distinction is that '''run_on_startup.py''' is executed before the [[Pymolrc|pymolrc]] files and is purely written in python.&amp;lt;br&amp;gt;&lt;br /&gt;
The recommended location of '''run_on_startup.py''' is the PyMOL home directory (PYMOL_PATH, e.g. something like 'C:\Program Files \PyMOL\').&amp;lt;br&amp;gt; &lt;br /&gt;
An advantage is that should PyMOL be installed on a computer with several users, this will be run for all users, while the pymolrc files can be individual (e.g. in the USER directory).&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#this can be copy-pasted to create run_on_startup.py in the home directory&lt;br /&gt;
 &lt;br /&gt;
# Add paths to sys.path so PyMOL can find modules and scripts&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
 &lt;br /&gt;
pymol_git = os.path.realpath(os.path.join(os.environ['PYMOL_PATH'], 'Pymol-script-repo'))&lt;br /&gt;
 &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;
try: # in case the PyMOL is older and doe not have the module pymol.plugins&lt;br /&gt;
    import pymol.plugins&lt;br /&gt;
 &lt;br /&gt;
    #THIS IS WHERE THE PATH IS ADDED TO INITIALIZE PLUGINS USING THE PLUGIN MANAGER&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;
 &lt;br /&gt;
    pymol.plugins.preferences = {'instantsave': False, 'verbose': False}&lt;br /&gt;
    pymol.plugins.autoload = {'apbs_tools': False}&lt;br /&gt;
    pymol.plugins.preferences = {'instantsave': True, 'verbose': False}&lt;br /&gt;
    # This can be used to trace if PyMOL executed the file correctly&lt;br /&gt;
    print 'Loaded run_on_stratup.py'&lt;br /&gt;
except:&lt;br /&gt;
    print 'NB! Plugin Manager not present!'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note that this block will also add the '''Pymol-script-repo''' and the subfolder '''Pymol-script-repo/modules''' to PyMOL's search path.&amp;lt;br&amp;gt;&lt;br /&gt;
This is something that is required in earlier PyMOL version to allow import of scripts. Thus this version of '''run_on_startup.py''' can be used for older versions, too.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that the settings specific for the ''new'' version of the '''Plugin Manager''' will not have an effect.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===What if the 'Pymol-script-repo' is not in the PyMOL directory?===&lt;br /&gt;
If the '''Pymol-script-repo''' is located somewhere else the first section of the '''run_on_startup.py''' file will be different.&amp;lt;br&amp;gt;&lt;br /&gt;
E.g. in the USER directory:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# This would replace the first section in '''run_on_startup.py'''.&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
&lt;br /&gt;
pymol_git = os.path.abspath(os.path.join(os.path.expanduser('~'), 'Pymol-script-repo'))&lt;br /&gt;
&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;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
E.g. in any other path:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# This would replace the first section in '''run_on_startup.py'''.&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
&lt;br /&gt;
pymol_git = os.path.realpath('D:\MY\RANDOM\PATH\TO\Pymol-script-repo') # Adjust this line&lt;br /&gt;
# Note the '\' instead of '/', beware Windows users!&lt;br /&gt;
&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;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Appending additional paths to the Plugin Manager===&lt;br /&gt;
Should your scripts be located in several alternative locations, it is possible to append additional directories to the '''Plugin Manager'''.&amp;lt;br&amp;gt;&lt;br /&gt;
In the example below, a directory called 'plugins_private', which is located in the PyMOL directory, is added to the Plugin Manger.&amp;lt;br&amp;gt;&lt;br /&gt;
Should the folder be somewhere else the example below can be adjusted as outlined above.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#copy paste into PyMOL's command line or into the pymolrc&lt;br /&gt;
&lt;br /&gt;
python&lt;br /&gt;
import os&lt;br /&gt;
import sys&lt;br /&gt;
import pymol.plugins # Note that this requires the 'new' Plugin Manager&lt;br /&gt;
&lt;br /&gt;
PRIVATE_PATH=os.path.realpath(os.path.join(os.environ['PYMOL_PATH'], 'plugins_private'))&lt;br /&gt;
startupdirectories=list(pymol.plugins.get_startup_path(True))&lt;br /&gt;
if PRIVATE_PATH not in startupdirectories:&lt;br /&gt;
    startupdirectories.append(PRIVATE_PATH)&lt;br /&gt;
if PRIVATE_PATH not in sys.path:&lt;br /&gt;
    sys.path.append(PRIVATE_PATH)&lt;br /&gt;
pymol.plugins.set_startup_path(startupdirectories)&lt;br /&gt;
python end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the '''Plugin Manager''' supports loading entire folders with scripts ('modules').&amp;lt;br&amp;gt;&lt;br /&gt;
If you have such a folder, make sure it contains a file called '__init__.py', which can be empty.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=If you don't have a Plugin Manager=&lt;br /&gt;
If you are running an older PyMOL without '''Plugin Manager''' you can either upgrade to the newest version or load plugins the traditional way. &amp;lt;br&amp;gt;&lt;br /&gt;
For detailed instructions see: [[Git install scripts]]&amp;lt;br&amp;gt;&lt;br /&gt;
Essentially, make sure that the folder is added to PyMOL's search paths.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
pymol_git = os.path.realpath(os.path.join(os.environ['PYMOL_PATH'], 'Pymol-script-repo'))&lt;br /&gt;
sys.path.append(pymol_git)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Import a plugin manually:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# EXAMPLE&lt;br /&gt;
delete all&lt;br /&gt;
frag LYS&lt;br /&gt;
cgo_arrow name N, name O # will not work if 'cgo_arrow' is not loaded&lt;br /&gt;
&lt;br /&gt;
import cgo_arrow # PyMOL will look for this file and load it&lt;br /&gt;
cgo_arrow name N, name O # should work if it is loaded&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=SEE ALSO=&lt;br /&gt;
[[Git install scripts]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Launching]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Plugin_manager&amp;diff=11948</id>
		<title>Plugin manager</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Plugin_manager&amp;diff=11948"/>
		<updated>2014-06-06T19:14:11Z</updated>

		<summary type="html">&lt;p&gt;Andwar: some editing pointing out differences to the old plugin management&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Newer versions of PyMOL come with a '''Plugin Manager''', which can be used to load plugins such as those in the [https://github.com/Pymol-Scripts/Pymol-script-repo# PyMOL Script Repo].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Manual Setup=&lt;br /&gt;
In the PyMOL menu naviagte to '''Plugins''' &amp;gt; '''Plugin Manager''' &amp;lt;br&amp;gt;&lt;br /&gt;
Here you can manually add directories or scripts that will be loaded upon startup.&amp;lt;br&amp;gt;&lt;br /&gt;
Older versions have a basic version of this manager: '''Plugin''' &amp;gt; '''Manage Plugins''', however, here the scripts need to be added individually.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Scripted setup during PyMOL launching=&lt;br /&gt;
===Creating run_on_startup.py===&lt;br /&gt;
'''run_on_startup.py''' can easily be created using a text editor such as notepad.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''run_on_startup.py''' is handled similar to [[Pymolrc|pymolrc]] files and is executed every time PyMOL launches.&amp;lt;br&amp;gt;&lt;br /&gt;
An important distinction is that '''run_on_startup.py''' is executed before the [[Pymolrc|pymolrc]] files and is purely written in python.&amp;lt;br&amp;gt;&lt;br /&gt;
The recommended location of '''run_on_startup.py''' is the PyMOL home directory (PYMOL_PATH, e.g. something like 'C:\Program Files \PyMOL\').&amp;lt;br&amp;gt; &lt;br /&gt;
An advantage is that should PyMOL be installed on a computer with several users, this will be run for all users, while the pymolrc files can be individual (e.g. in the USER directory).&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#this can be copy-pasted to create run_on_startup.py in the home directory&lt;br /&gt;
 &lt;br /&gt;
# Add paths to sys.path so PyMOL can find modules and scripts&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
 &lt;br /&gt;
pymol_git = os.path.realpath(os.path.join(os.environ['PYMOL_PATH'], 'Pymol-script-repo'))&lt;br /&gt;
 &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;
try: # in case the PyMOL is older and doe not have the module pymol.plugins&lt;br /&gt;
    import pymol.plugins&lt;br /&gt;
 &lt;br /&gt;
    #THIS IS WHERE THE PATH IS ADDED TO INITIALIZE PLUGINS USING THE PLUGIN MANAGER&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;
 &lt;br /&gt;
    pymol.plugins.preferences = {'instantsave': False, 'verbose': False}&lt;br /&gt;
    pymol.plugins.autoload = {'apbs_tools': False}&lt;br /&gt;
    pymol.plugins.preferences = {'instantsave': True, 'verbose': False}&lt;br /&gt;
    # This can be used to trace if PyMOL executed the file correctly&lt;br /&gt;
    print 'Loaded run_on_stratup.py'&lt;br /&gt;
except:&lt;br /&gt;
    print 'NB! Plugin Manager not present!'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Note that this block will also add the '''Pymol-script-repo''' and the subfolder '''Pymol-script-repo/modules''' to PyMOL's search path.&amp;lt;br&amp;gt;&lt;br /&gt;
This is something that is required in earlier PyMOL version to allow import of scripts. Thus this version of '''run_on_startup.py''' can be used for older versions, too.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that the settings specific for the ''new'' version of the '''Plugin Manager''' will not have an effect.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===What if the 'Pymol-script-repo' is not in the PyMOL directory?===&lt;br /&gt;
If the '''Pymol-script-repo''' is located somewhere else the first section of the '''run_on_startup.py''' file will be different.&amp;lt;br&amp;gt;&lt;br /&gt;
E.g. in the USER directory:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# This would replace the first section in '''run_on_startup.py'''.&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
&lt;br /&gt;
pymol_git = os.path.abspath(os.path.join(os.path.expanduser('~'), 'Pymol-script-repo'))&lt;br /&gt;
&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;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
E.g. in any other path:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# This would replace the first section in '''run_on_startup.py'''.&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
&lt;br /&gt;
pymol_git = os.path.realpath('D:\MY\RANDOM\PATH\TO\Pymol-script-repo') # Adjust this line&lt;br /&gt;
# Note the '\' instead of '/', beware Windows users!&lt;br /&gt;
&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;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Appending additional paths to the Plugin Manager===&lt;br /&gt;
Should your scripts be located in several alternative locations, it is possible to append additional directories to the '''Plugin Manager'''.&amp;lt;br&amp;gt;&lt;br /&gt;
In the example below, a directory called 'plugins_private', which is located in the PyMOL directory, is added to the Plugin Manger.&amp;lt;br&amp;gt;&lt;br /&gt;
Should the folder be somewhere else the example below can be adjusted as outlined above.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#copy paste into PyMOL's command line or into the pymolrc&lt;br /&gt;
&lt;br /&gt;
python&lt;br /&gt;
import os&lt;br /&gt;
import sys&lt;br /&gt;
import pymol.plugins # Note that this requires the 'new' Plugin Manager&lt;br /&gt;
&lt;br /&gt;
PRIVATE_PATH=os.path.realpath(os.path.join(os.environ['PYMOL_PATH'], 'plugins_private'))&lt;br /&gt;
startupdirectories=list(pymol.plugins.get_startup_path(True))&lt;br /&gt;
if PRIVATE_PATH not in startupdirectories:&lt;br /&gt;
    startupdirectories.append(PRIVATE_PATH)&lt;br /&gt;
if PRIVATE_PATH not in sys.path:&lt;br /&gt;
    sys.path.append(PRIVATE_PATH)&lt;br /&gt;
pymol.plugins.set_startup_path(startupdirectories)&lt;br /&gt;
python end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the '''Plugin Manager''' supports loading entire folders with scripts ('modules').&amp;lt;br&amp;gt;&lt;br /&gt;
If you have such a folder, make sure it contains a file called '__init__.py', which can be empty.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=If you don't have a Plugin Manager=&lt;br /&gt;
If you are running an older PyMOL without '''Plugin Manager''' you can either upgrade to the newest version or load plugins the traditional way. &amp;lt;br&amp;gt;&lt;br /&gt;
For detailed instructions see: [[Git install scripts]]&amp;lt;br&amp;gt;&lt;br /&gt;
Essentially, make sure that the folder is added to PyMOL's search paths.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
pymol_git = os.path.realpath(os.path.join(os.environ['PYMOL_PATH'], 'Pymol-script-repo'))&lt;br /&gt;
sys.path.append(pymol_git)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Import a plugin manually:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# EXAMPLE&lt;br /&gt;
delete all&lt;br /&gt;
frag LYS&lt;br /&gt;
cgo_arrow name N, name O # will not work if 'cgo_arrow' is not loaded&lt;br /&gt;
&lt;br /&gt;
import cgo_arrow # PyMOL will look for this file and load it&lt;br /&gt;
cgo_arrow name N, name O # should work if it is loaded&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=SEE ALSO=&lt;br /&gt;
[[Git install scripts]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Launching]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Plugin_Manager&amp;diff=12646</id>
		<title>Plugin Manager</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Plugin_Manager&amp;diff=12646"/>
		<updated>2014-06-06T17:53:45Z</updated>

		<summary type="html">&lt;p&gt;Andwar: links to pymolrc page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Newer versions of PyMOL come with a '''Plugin Manager''', which can be used to load plugins such as the  [https://github.com/Pymol-Scripts/Pymol-script-repo# PyMOL Script Repo].&lt;br /&gt;
&lt;br /&gt;
=Manual Setup=&lt;br /&gt;
In the PyMOL menu naviagte to '''Plugins''' &amp;gt; '''Plugin Manager''' &amp;lt;br&amp;gt;&lt;br /&gt;
Here you can manually add directories or scripts that will be loaded upon startup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Scripted setup during PyMOL launching=&lt;br /&gt;
===Creating run_on_startup.py===&lt;br /&gt;
'''run_on_startup.py''' can easily be created using a text editor such as notepad.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''run_on_startup.py''' is handled similar to [[Pymolrc|pymolrc]] files and is executed every time PyMOL launches.&amp;lt;br&amp;gt;&lt;br /&gt;
An important distinction is that '''run_on_startup.py''' is executed before the [[Pymolrc|pymolrc]] files and is purely written in python.&amp;lt;br&amp;gt;&lt;br /&gt;
The recommended location of '''run_on_startup.py''' is the PyMOL home directory (PYMOL_PATH, e.g. something like 'C:\Program Files \PyMOL\').&amp;lt;br&amp;gt; &lt;br /&gt;
An advantage is that should PyMOL be installed on a computer with several users, this will be run for all users, while the pymolrc files can be individual (e.g. in the USER directory).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#this can be copy-pasted to create run_on_startup.py in the home directory&lt;br /&gt;
&lt;br /&gt;
# Add paths to sys.path so PyMOL can find modules and scripts&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
&lt;br /&gt;
pymol_git = os.path.realpath(os.path.join(os.environ['PYMOL_PATH'], 'Pymol-script-repo'))&lt;br /&gt;
&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;
&lt;br /&gt;
#THIS IS WHERE THE PATH IS ADDED TO INITIALIZE PLUGINS USING THE PLUGIN MANAGER&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;
&lt;br /&gt;
pymol.plugins.preferences = {'instantsave': False, 'verbose': False}&lt;br /&gt;
pymol.plugins.autoload = {'apbs_tools': False}&lt;br /&gt;
pymol.plugins.preferences = {'instantsave': True, 'verbose': False}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# This can be used to trace if PyMOL executed the file correctly. Otherwise remove this part&lt;br /&gt;
print 'Loaded run_on_stratup.py' &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the '''Pymol-script-repo''' is located somewhere else the first section of the file will be different.&amp;lt;br&amp;gt;&lt;br /&gt;
E.g. in the USER directory:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# This would replace the first section in '''run_on_startup.py'''.&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
&lt;br /&gt;
pymol_git = os.path.abspath(os.path.join(os.path.expanduser('~'), 'Pymol-script-repo'))&lt;br /&gt;
&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;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
E.g. in any other path:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# This would replace the first section in '''run_on_startup.py'''.&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
&lt;br /&gt;
pymol_git = os.path.realpath('D:\MY\RANDOM\PATH\TO\Pymol-script-repo') # Adjust this line&lt;br /&gt;
# Note the '\' instead of '/', beware Windows users!&lt;br /&gt;
&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;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Appending additional paths to the Plugin Manager===&lt;br /&gt;
Should your scripts be located in several alternative locations, it is possible to append additional directories to the '''Plugin Manager'''.&amp;lt;br&amp;gt;&lt;br /&gt;
In the example below, a directory called 'plugins_private', which is located in the PyMOL directory, is added to the Plugin Manger.&amp;lt;br&amp;gt;&lt;br /&gt;
Should the folder be somewhere else the example below can be adjusted as outlined above.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#copy paste into PyMOL's command line or into the pymolrc&lt;br /&gt;
&lt;br /&gt;
python&lt;br /&gt;
import os&lt;br /&gt;
import sys&lt;br /&gt;
import pymol.plugins&lt;br /&gt;
&lt;br /&gt;
PRIVATE_PATH=os.path.realpath(os.path.join(os.environ['PYMOL_PATH'], 'plugins_private'))&lt;br /&gt;
startupdirectories=list(pymol.plugins.get_startup_path(True))&lt;br /&gt;
if PRIVATE_PATH not in startupdirectories:&lt;br /&gt;
    startupdirectories.append(PRIVATE_PATH)&lt;br /&gt;
if PRIVATE_PATH not in sys.path:&lt;br /&gt;
    sys.path.append(PRIVATE_PATH)&lt;br /&gt;
pymol.plugins.set_startup_path(startupdirectories)&lt;br /&gt;
python end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the '''Plugin Manager''' supports loading entire folders with scripts ('modules').&amp;lt;br&amp;gt;&lt;br /&gt;
If you have such a folder, make sure it contains a file called '__init__.py', which can be empty.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=If you don't have a Plugin Manager=&lt;br /&gt;
If you are running an older PyMOL without '''Plugin Manager''' you can either upgrade to the newest version or load plugins the traditional way. &amp;lt;br&amp;gt;&lt;br /&gt;
For detailed instructions see: [[Git install scripts]]&amp;lt;br&amp;gt;&lt;br /&gt;
Essentially, make sure that the folder is added to PyMOL's search paths.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
pymol_git = os.path.realpath(os.path.join(os.environ['PYMOL_PATH'], 'Pymol-script-repo'))&lt;br /&gt;
sys.path.append(pymol_git)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Import a plugin manually:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# EXAMPLE&lt;br /&gt;
delete all&lt;br /&gt;
frag LYS&lt;br /&gt;
cgo_arrow name N, name O # will not work if 'cgo_arrow' is not loaded&lt;br /&gt;
&lt;br /&gt;
import cgo_arrow # PyMOL will look for this file and load it&lt;br /&gt;
cgo_arrow name N, name O # should work if it is loaded&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=SEE ALSO=&lt;br /&gt;
[[Git install scripts]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Launching]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Plugin_manager&amp;diff=11947</id>
		<title>Plugin manager</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Plugin_manager&amp;diff=11947"/>
		<updated>2014-06-06T17:53:45Z</updated>

		<summary type="html">&lt;p&gt;Andwar: links to pymolrc page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Newer versions of PyMOL come with a '''Plugin Manager''', which can be used to load plugins such as the  [https://github.com/Pymol-Scripts/Pymol-script-repo# PyMOL Script Repo].&lt;br /&gt;
&lt;br /&gt;
=Manual Setup=&lt;br /&gt;
In the PyMOL menu naviagte to '''Plugins''' &amp;gt; '''Plugin Manager''' &amp;lt;br&amp;gt;&lt;br /&gt;
Here you can manually add directories or scripts that will be loaded upon startup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Scripted setup during PyMOL launching=&lt;br /&gt;
===Creating run_on_startup.py===&lt;br /&gt;
'''run_on_startup.py''' can easily be created using a text editor such as notepad.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''run_on_startup.py''' is handled similar to [[Pymolrc|pymolrc]] files and is executed every time PyMOL launches.&amp;lt;br&amp;gt;&lt;br /&gt;
An important distinction is that '''run_on_startup.py''' is executed before the [[Pymolrc|pymolrc]] files and is purely written in python.&amp;lt;br&amp;gt;&lt;br /&gt;
The recommended location of '''run_on_startup.py''' is the PyMOL home directory (PYMOL_PATH, e.g. something like 'C:\Program Files \PyMOL\').&amp;lt;br&amp;gt; &lt;br /&gt;
An advantage is that should PyMOL be installed on a computer with several users, this will be run for all users, while the pymolrc files can be individual (e.g. in the USER directory).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#this can be copy-pasted to create run_on_startup.py in the home directory&lt;br /&gt;
&lt;br /&gt;
# Add paths to sys.path so PyMOL can find modules and scripts&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
&lt;br /&gt;
pymol_git = os.path.realpath(os.path.join(os.environ['PYMOL_PATH'], 'Pymol-script-repo'))&lt;br /&gt;
&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;
&lt;br /&gt;
#THIS IS WHERE THE PATH IS ADDED TO INITIALIZE PLUGINS USING THE PLUGIN MANAGER&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;
&lt;br /&gt;
pymol.plugins.preferences = {'instantsave': False, 'verbose': False}&lt;br /&gt;
pymol.plugins.autoload = {'apbs_tools': False}&lt;br /&gt;
pymol.plugins.preferences = {'instantsave': True, 'verbose': False}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# This can be used to trace if PyMOL executed the file correctly. Otherwise remove this part&lt;br /&gt;
print 'Loaded run_on_stratup.py' &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the '''Pymol-script-repo''' is located somewhere else the first section of the file will be different.&amp;lt;br&amp;gt;&lt;br /&gt;
E.g. in the USER directory:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# This would replace the first section in '''run_on_startup.py'''.&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
&lt;br /&gt;
pymol_git = os.path.abspath(os.path.join(os.path.expanduser('~'), 'Pymol-script-repo'))&lt;br /&gt;
&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;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
E.g. in any other path:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# This would replace the first section in '''run_on_startup.py'''.&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
&lt;br /&gt;
pymol_git = os.path.realpath('D:\MY\RANDOM\PATH\TO\Pymol-script-repo') # Adjust this line&lt;br /&gt;
# Note the '\' instead of '/', beware Windows users!&lt;br /&gt;
&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;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Appending additional paths to the Plugin Manager===&lt;br /&gt;
Should your scripts be located in several alternative locations, it is possible to append additional directories to the '''Plugin Manager'''.&amp;lt;br&amp;gt;&lt;br /&gt;
In the example below, a directory called 'plugins_private', which is located in the PyMOL directory, is added to the Plugin Manger.&amp;lt;br&amp;gt;&lt;br /&gt;
Should the folder be somewhere else the example below can be adjusted as outlined above.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#copy paste into PyMOL's command line or into the pymolrc&lt;br /&gt;
&lt;br /&gt;
python&lt;br /&gt;
import os&lt;br /&gt;
import sys&lt;br /&gt;
import pymol.plugins&lt;br /&gt;
&lt;br /&gt;
PRIVATE_PATH=os.path.realpath(os.path.join(os.environ['PYMOL_PATH'], 'plugins_private'))&lt;br /&gt;
startupdirectories=list(pymol.plugins.get_startup_path(True))&lt;br /&gt;
if PRIVATE_PATH not in startupdirectories:&lt;br /&gt;
    startupdirectories.append(PRIVATE_PATH)&lt;br /&gt;
if PRIVATE_PATH not in sys.path:&lt;br /&gt;
    sys.path.append(PRIVATE_PATH)&lt;br /&gt;
pymol.plugins.set_startup_path(startupdirectories)&lt;br /&gt;
python end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the '''Plugin Manager''' supports loading entire folders with scripts ('modules').&amp;lt;br&amp;gt;&lt;br /&gt;
If you have such a folder, make sure it contains a file called '__init__.py', which can be empty.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=If you don't have a Plugin Manager=&lt;br /&gt;
If you are running an older PyMOL without '''Plugin Manager''' you can either upgrade to the newest version or load plugins the traditional way. &amp;lt;br&amp;gt;&lt;br /&gt;
For detailed instructions see: [[Git install scripts]]&amp;lt;br&amp;gt;&lt;br /&gt;
Essentially, make sure that the folder is added to PyMOL's search paths.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
pymol_git = os.path.realpath(os.path.join(os.environ['PYMOL_PATH'], 'Pymol-script-repo'))&lt;br /&gt;
sys.path.append(pymol_git)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Import a plugin manually:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# EXAMPLE&lt;br /&gt;
delete all&lt;br /&gt;
frag LYS&lt;br /&gt;
cgo_arrow name N, name O # will not work if 'cgo_arrow' is not loaded&lt;br /&gt;
&lt;br /&gt;
import cgo_arrow # PyMOL will look for this file and load it&lt;br /&gt;
cgo_arrow name N, name O # should work if it is loaded&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=SEE ALSO=&lt;br /&gt;
[[Git install scripts]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Launching]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Valence&amp;diff=11968</id>
		<title>Valence</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Valence&amp;diff=11968"/>
		<updated>2014-06-06T12:32:01Z</updated>

		<summary type="html">&lt;p&gt;Andwar: repaired misspelled unbond link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
Turning on '''valence''' will enable the display of double bonds.&amp;lt;br&amp;gt;&lt;br /&gt;
Toggling '''valence_mode''' alters the positioning of double bonds (for representation as [[Lines]])&amp;lt;br&amp;gt;&lt;br /&gt;
'''valence_size''' alters the distance of double bonds.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that bonds can be edited to be delocalized using [[Unbond]] and [[Bond]].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&amp;lt;gallery heights=&amp;quot;200px&amp;quot; widths=&amp;quot;200px&amp;quot; align=&amp;quot;left&amp;quot; perrow=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
Image:PHE_valence_0.png|set valence, 0&amp;lt;br&amp;gt;#(no double bonds)&lt;br /&gt;
Image:PHE_valence_1_mode_1.png|set valence, 1&amp;lt;br&amp;gt;set valence_mode, 1&amp;lt;br&amp;gt;#bonds inside&lt;br /&gt;
Image:PHE_valence_1_mode_0.png|set valence, 1&amp;lt;br&amp;gt;set valence_mode, 0&amp;lt;br&amp;gt;#bonds centered&lt;br /&gt;
Image:PHE_delocalized.png|set valence, 1&amp;lt;br&amp;gt;#delocalized bonds&amp;lt;br&amp;gt;#(edited: see [[Bond]])&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''valence_size''' alters the distance of double bonds, but behaves slightly different depending on valence_mode&amp;lt;br&amp;gt;&lt;br /&gt;
{| width=&amp;quot;45%&amp;quot;&lt;br /&gt;
|+ style=&amp;quot;font-weight:bold; text-align:center; font-size:100%;&amp;quot; | valence_size&lt;br /&gt;
! valence_size with valence_mode 1&amp;lt;br&amp;gt; inside !! valence_size with valence_mode 0 &amp;lt;br&amp;gt; centered&lt;br /&gt;
|-&lt;br /&gt;
||[[File:valence_size_mode1.gif]] ||  [[File:valence_size_mode0.gif]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set valence, 0 # off&lt;br /&gt;
set valence, 1 # on&lt;br /&gt;
&lt;br /&gt;
set valence_mode, 0 # centered&lt;br /&gt;
set valence_mode, 1 # inside&lt;br /&gt;
&lt;br /&gt;
set valence_size, 0.1 # default: 0.06 # range 0 - ~0.5 &lt;br /&gt;
&lt;br /&gt;
# Editing bonds:&lt;br /&gt;
# In editing mode: select the bond using Ctrl-right-click, then enter:&lt;br /&gt;
unbond pk1,pk2&lt;br /&gt;
bond pk1,pk2,4&lt;br /&gt;
# 1: single bond, 2: double bond, 3:triple bond, 4:delocalized&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=SEE ALSO=&lt;br /&gt;
[[Bond]], [[Unbond]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Settings|Valence]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Movie_fade&amp;diff=11941</id>
		<title>Movie fade</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Movie_fade&amp;diff=11941"/>
		<updated>2014-06-06T11:25:03Z</updated>

		<summary type="html">&lt;p&gt;Andwar: Added additional example (surface) with code and file&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = Python Module&lt;br /&gt;
|filename  = movie_fade.py&lt;br /&gt;
|author    = [[User:Inchoate|Jason Vertrees]] and [[User:Speleo3|Thomas Holder]]&lt;br /&gt;
|license   = BSD-2-Clause&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This script will help fade in and out settings in a movie. Just specify the setting, it's initial value at an initial frame and it's ending value and frame.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
 movie_fade setting, startFrame, startVal, endFrame, endVal [, selection ]&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
To fade in sticks from fully transparent to fully opaque across 60 frames do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
mset 1x60&lt;br /&gt;
movie_fade stick_transparency, 1, 1., 60, 0.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More complex example which involves camera motion:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
fetch 1rx1, async=0&lt;br /&gt;
as cartoon&lt;br /&gt;
show surface&lt;br /&gt;
mset 1x80&lt;br /&gt;
movie.roll&lt;br /&gt;
movie_fade transparency,  1, 0., 40, 1.&lt;br /&gt;
movie_fade transparency, 41, 1., 80, 0.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example file:'''&lt;br /&gt;
{| width=&amp;quot;30%&amp;quot;&lt;br /&gt;
|+ style=&amp;quot;font-weight:bold; text-align:center; font-size:100%;&amp;quot; | &lt;br /&gt;
! Code !! Result&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import movie_fade&lt;br /&gt;
&lt;br /&gt;
fetch 1hpv, async=0&lt;br /&gt;
orient&lt;br /&gt;
&lt;br /&gt;
#format&lt;br /&gt;
bg black&lt;br /&gt;
show_as cartoon&lt;br /&gt;
color marine, ss s&lt;br /&gt;
color red, ss h&lt;br /&gt;
color white, ss l+&amp;quot;&amp;quot;&lt;br /&gt;
show sticks, resn 478&lt;br /&gt;
util.cbao resn 478&lt;br /&gt;
set surface_color, white, 1hpv&lt;br /&gt;
show surface&lt;br /&gt;
&lt;br /&gt;
#movie&lt;br /&gt;
mset 1x120&lt;br /&gt;
movie_fade transparency,1, 0, 60, 1, 1hpv&lt;br /&gt;
movie_fade transparency,61, 1, 120, 0, 1hpv&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
||[[File:Movie fade example.gif]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[mdo]]&lt;br /&gt;
* [[mappend]]&lt;br /&gt;
* [[set]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:UI_Scripts]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Settings&amp;diff=11962</id>
		<title>Settings</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Settings&amp;diff=11962"/>
		<updated>2014-06-06T10:53:58Z</updated>

		<summary type="html">&lt;p&gt;Andwar: linked valence_size and valence_mode to valence page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PyMOL is incredibly useful because of its flexibility.  Almost any setting can be tweaked to give you the ability to make your scenes appear just as you want.  Each command usually comes with one or more settings.  For example, the [[ray]] command comes with '''50''' settings!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==List of settings==&lt;br /&gt;
&lt;br /&gt;
Below you will find the list of all known settings (as of this writing).  Settings are added all the time, so this list should be updated somehow.  Also, see all '''[[:Category:Settings|documented settings]]'''.&lt;br /&gt;
&lt;br /&gt;
If you feel like documenting them, and what they do, feel free.&lt;br /&gt;
&lt;br /&gt;
===A===&lt;br /&gt;
[[active_selections]]&lt;br /&gt;
[[all_states]]&lt;br /&gt;
[[ambient]]&lt;br /&gt;
[[angle_color]]&lt;br /&gt;
[[angle_label_position]]&lt;br /&gt;
[[angle_size]]&lt;br /&gt;
[[animation]]&lt;br /&gt;
[[animation_duration]]&lt;br /&gt;
[[antialias]]&lt;br /&gt;
[[async_builds]]&lt;br /&gt;
[[ati_bugs]]&lt;br /&gt;
[[atom_name_wildcard]]&lt;br /&gt;
[[auto_classify_atoms]]&lt;br /&gt;
[[auto_color]]&lt;br /&gt;
[[auto_copy_images]]&lt;br /&gt;
[[auto_defer_builds]]&lt;br /&gt;
[[auto_dss]]&lt;br /&gt;
[[auto_hide_selections]]&lt;br /&gt;
[[auto_indicate_flags]]&lt;br /&gt;
[[auto_number_selections]]&lt;br /&gt;
[[auto_remove_hydrogens]]&lt;br /&gt;
[[auto_rename_duplicate_objects]]&lt;br /&gt;
[[auto_sculpt]]&lt;br /&gt;
[[auto_show_lines]]&lt;br /&gt;
[[auto_show_nonbonded]]&lt;br /&gt;
[[auto_show_selections]]&lt;br /&gt;
[[auto_show_spheres]]&lt;br /&gt;
[[auto_zoom]]&lt;br /&gt;
&lt;br /&gt;
===B===&lt;br /&gt;
[[backface_cull]]&lt;br /&gt;
[[batch_prefix]]&lt;br /&gt;
[[bg_rgb]]&lt;br /&gt;
[[bonding_vdw_cutoff]]&lt;br /&gt;
[[button_mode]]&lt;br /&gt;
[[button_mode_name]]&lt;br /&gt;
&lt;br /&gt;
===C===&lt;br /&gt;
[[cache_display]]&lt;br /&gt;
[[cache_frames]]&lt;br /&gt;
[[cache_max]]&lt;br /&gt;
[[cache_memory]]&lt;br /&gt;
[[cache_mode]]&lt;br /&gt;
[[cartoon_color]]&lt;br /&gt;
[[cartoon_cylindrical_helices]]&lt;br /&gt;
[[cartoon_debug]]&lt;br /&gt;
[[cartoon_discrete_colors]]&lt;br /&gt;
[[cartoon_dumbbell_length]]&lt;br /&gt;
[[cartoon_dumbbell_radius]]&lt;br /&gt;
[[cartoon_dumbbell_width]]&lt;br /&gt;
[[cartoon_fancy_helices]]&lt;br /&gt;
[[cartoon_fancy_sheets]]&lt;br /&gt;
[[cartoon_flat_cycles]]&lt;br /&gt;
[[cartoon_flat_sheets]]&lt;br /&gt;
[[cartoon_helix_radius]]&lt;br /&gt;
[[cartoon_highlight_color]]&lt;br /&gt;
[[cartoon_ladder_color]]&lt;br /&gt;
[[cartoon_ladder_mode]]&lt;br /&gt;
[[cartoon_ladder_radius]]&lt;br /&gt;
[[cartoon_loop_cap]]&lt;br /&gt;
[[cartoon_loop_quality]]&lt;br /&gt;
[[cartoon_loop_radius]]&lt;br /&gt;
[[cartoon_nucleic_acid_color]]&lt;br /&gt;
[[cartoon_nucleic_acid_mode]]&lt;br /&gt;
[[cartoon_oval_length]]&lt;br /&gt;
[[cartoon_oval_quality]]&lt;br /&gt;
[[cartoon_oval_width]]&lt;br /&gt;
[[cartoon_power]]&lt;br /&gt;
[[cartoon_power_b]]&lt;br /&gt;
[[cartoon_putty_quality]]&lt;br /&gt;
[[cartoon_putty_radius]]&lt;br /&gt;
[[cartoon_putty_range]]&lt;br /&gt;
[[cartoon_putty_scale_max]]&lt;br /&gt;
[[cartoon_putty_scale_min]]&lt;br /&gt;
[[cartoon_putty_scale_power]]&lt;br /&gt;
[[cartoon_putty_transform]]&lt;br /&gt;
[[cartoon_rect_length]]&lt;br /&gt;
[[cartoon_rect_width]]&lt;br /&gt;
[[cartoon_refine]]&lt;br /&gt;
[[cartoon_refine_normals]]&lt;br /&gt;
[[cartoon_refine_tips]]&lt;br /&gt;
[[cartoon_ring_color]]&lt;br /&gt;
[[cartoon_ring_finder]]&lt;br /&gt;
[[cartoon_ring_mode]]&lt;br /&gt;
[[cartoon_ring_radius]]&lt;br /&gt;
[[cartoon_ring_transparency]]&lt;br /&gt;
[[cartoon_ring_width]]&lt;br /&gt;
[[cartoon_round_helices]]&lt;br /&gt;
[[cartoon_sampling]]&lt;br /&gt;
[[cartoon_side_chain_helper]]&lt;br /&gt;
[[cartoon_smooth_cycles]]&lt;br /&gt;
[[cartoon_smooth_first]]&lt;br /&gt;
[[cartoon_smooth_last]]&lt;br /&gt;
[[cartoon_smooth_loops]]&lt;br /&gt;
[[cartoon_throw]]&lt;br /&gt;
[[cartoon_trace_atoms]]&lt;br /&gt;
[[cartoon_transparency]]&lt;br /&gt;
[[cartoon_tube_cap]]&lt;br /&gt;
[[cartoon_tube_quality]]&lt;br /&gt;
[[cartoon_tube_radius]]&lt;br /&gt;
[[cavity_cull]]&lt;br /&gt;
[[cgo_dot_radius]]&lt;br /&gt;
[[cgo_dot_width]]&lt;br /&gt;
[[cgo_ellipsoid_quality]]&lt;br /&gt;
[[cgo_line_radius]]&lt;br /&gt;
[[cgo_line_width]]&lt;br /&gt;
[[cgo_ray_width_scale]]&lt;br /&gt;
[[cgo_sphere_quality]]&lt;br /&gt;
[[cgo_transparency]]&lt;br /&gt;
[[clamp_colors]]&lt;br /&gt;
[[cone_quality]]&lt;br /&gt;
[[connect_bonded]]&lt;br /&gt;
[[connect_cutoff]]&lt;br /&gt;
[[connect_mode]]&lt;br /&gt;
[[coulomb_cutoff]]&lt;br /&gt;
[[coulomb_dielectric]]&lt;br /&gt;
[[coulomb_units_factor]]&lt;br /&gt;
[[cull_spheres]]&lt;br /&gt;
[[cylinder_shader_ff_workaround]]&lt;br /&gt;
&lt;br /&gt;
===D===&lt;br /&gt;
[[dash_color]]&lt;br /&gt;
[[dash_gap]]&lt;br /&gt;
[[dash_length]]&lt;br /&gt;
[[dash_radius]]&lt;br /&gt;
[[dash_round_ends]]&lt;br /&gt;
[[dash_width]]&lt;br /&gt;
[[debug_pick]]&lt;br /&gt;
[[defer_builds_mode]]&lt;br /&gt;
[[defer_updates]]&lt;br /&gt;
[[depth_cue]]&lt;br /&gt;
[[dihedral_color]]&lt;br /&gt;
[[dihedral_label_position]]&lt;br /&gt;
[[dihedral_size]]&lt;br /&gt;
[[direct]]&lt;br /&gt;
[[dist_counter]]&lt;br /&gt;
[[distance_exclusion]]&lt;br /&gt;
[[dot_color]]&lt;br /&gt;
[[dot_density]]&lt;br /&gt;
[[dot_hydrogens]]&lt;br /&gt;
[[dot_lighting]]&lt;br /&gt;
[[dot_mode]]&lt;br /&gt;
[[dot_normals]]&lt;br /&gt;
[[dot_radius]]&lt;br /&gt;
[[dot_solvent]]&lt;br /&gt;
[[dot_width]]&lt;br /&gt;
[[draw_frames]]&lt;br /&gt;
&lt;br /&gt;
===E===&lt;br /&gt;
[[editor_auto_dihedral]]&lt;br /&gt;
[[editor_auto_origin]]&lt;br /&gt;
[[editor_label_fragments]]&lt;br /&gt;
[[ellipsoid_color]]&lt;br /&gt;
[[ellipsoid_probability]]&lt;br /&gt;
[[ellipsoid_quality]]&lt;br /&gt;
[[ellipsoid_scale]]&lt;br /&gt;
[[ellipsoid_transparency]]&lt;br /&gt;
&lt;br /&gt;
===F===&lt;br /&gt;
[[fast_idle]]&lt;br /&gt;
[[fetch_path]]&lt;br /&gt;
[[field_of_view]]&lt;br /&gt;
[[fit_iterations]]&lt;br /&gt;
[[fit_tolerance]]&lt;br /&gt;
[[float_labels]]&lt;br /&gt;
[[fog]]&lt;br /&gt;
[[fog_start]]&lt;br /&gt;
[[frame]]&lt;br /&gt;
[[full_screen]]&lt;br /&gt;
&lt;br /&gt;
===G===&lt;br /&gt;
[[gamma]]&lt;br /&gt;
[[gaussian_b_adjust]]&lt;br /&gt;
[[gaussian_b_floor]]&lt;br /&gt;
[[gaussian_resolution]]&lt;br /&gt;
[[geometry_export_mode]]&lt;br /&gt;
[[gl_ambient]]&lt;br /&gt;
[[gradient_max_length]]&lt;br /&gt;
[[gradient_min_length]]&lt;br /&gt;
[[gradient_min_slope]]&lt;br /&gt;
[[gradient_normal_min_dot]]&lt;br /&gt;
[[gradient_spacing]]&lt;br /&gt;
[[gradient_step_size]]&lt;br /&gt;
[[gradient_symmetry]]&lt;br /&gt;
[[grid_max]]&lt;br /&gt;
[[grid_mode]]&lt;br /&gt;
[[grid_slot]]&lt;br /&gt;
[[group_arrow_prefix]]&lt;br /&gt;
[[group_auto_mode]]&lt;br /&gt;
[[group_full_member_names]]&lt;br /&gt;
&lt;br /&gt;
===H===&lt;br /&gt;
[[h_bond_cone]]&lt;br /&gt;
[[h_bond_cutoff_center]]&lt;br /&gt;
[[h_bond_cutoff_edge]]&lt;br /&gt;
[[h_bond_exclusion]]&lt;br /&gt;
[[h_bond_from_proton]]&lt;br /&gt;
[[h_bond_max_angle]]&lt;br /&gt;
[[h_bond_power_a]]&lt;br /&gt;
[[h_bond_power_b]]&lt;br /&gt;
[[half_bonds]]&lt;br /&gt;
[[hash_max]]&lt;br /&gt;
[[hide_long_bonds]]&lt;br /&gt;
[[hide_underscore_names]]&lt;br /&gt;
&lt;br /&gt;
===I===&lt;br /&gt;
[[idle_delay]]&lt;br /&gt;
[[ignore_case]]&lt;br /&gt;
[[ignore_pdb_segi]]&lt;br /&gt;
[[image_copy_always]]&lt;br /&gt;
[[image_dots_per_inch]]&lt;br /&gt;
[[internal_feedback]]&lt;br /&gt;
[[internal_gui]]&lt;br /&gt;
[[internal_gui_control_size]]&lt;br /&gt;
[[internal_gui_mode]]&lt;br /&gt;
[[internal_gui_width]]&lt;br /&gt;
[[internal_prompt]]&lt;br /&gt;
[[isomesh_auto_state]]&lt;br /&gt;
&lt;br /&gt;
===J===&lt;br /&gt;
&lt;br /&gt;
===K===&lt;br /&gt;
&lt;br /&gt;
===L===&lt;br /&gt;
[[label_angle_digits]]&lt;br /&gt;
[[label_color]]&lt;br /&gt;
[[label_digits]]&lt;br /&gt;
[[label_dihedral_digits]]&lt;br /&gt;
[[label_distance_digits]]&lt;br /&gt;
[[label_font_id]]&lt;br /&gt;
[[label_outline_color]]&lt;br /&gt;
[[label_position]]&lt;br /&gt;
[[label_shadow_mode]]&lt;br /&gt;
[[label_size]]&lt;br /&gt;
[[legacy_mouse_zoom]]&lt;br /&gt;
[[legacy_vdw_radii]]&lt;br /&gt;
[[light]]&lt;br /&gt;
[[light2]]&lt;br /&gt;
[[light3]]&lt;br /&gt;
[[light4]]&lt;br /&gt;
[[light5]]&lt;br /&gt;
[[light6]]&lt;br /&gt;
[[light7]]&lt;br /&gt;
[[light8]]&lt;br /&gt;
[[light9]]&lt;br /&gt;
[[light_count]]&lt;br /&gt;
[[line_color]]&lt;br /&gt;
[[line_radius]]&lt;br /&gt;
[[line_smooth]]&lt;br /&gt;
[[line_stick_helper]]&lt;br /&gt;
[[line_width]]&lt;br /&gt;
[[log_box_selections]]&lt;br /&gt;
[[log_conformations]]&lt;br /&gt;
[[logging]]&lt;br /&gt;
&lt;br /&gt;
===M===&lt;br /&gt;
[[map_auto_expand_sym]]&lt;br /&gt;
[[matrix_mode]]&lt;br /&gt;
[[max_threads]]&lt;br /&gt;
[[max_triangles]]&lt;br /&gt;
[[mesh_carve_cutoff]]&lt;br /&gt;
[[mesh_carve_selection]]&lt;br /&gt;
[[mesh_carve_state]]&lt;br /&gt;
[[mesh_clear_cutoff]]&lt;br /&gt;
[[mesh_clear_selection]]&lt;br /&gt;
[[mesh_clear_state]]&lt;br /&gt;
[[mesh_color]]&lt;br /&gt;
[[mesh_cutoff]]&lt;br /&gt;
[[mesh_grid_max]]&lt;br /&gt;
[[mesh_lighting]]&lt;br /&gt;
[[mesh_mode]]&lt;br /&gt;
[[mesh_negative_color]]&lt;br /&gt;
[[mesh_negative_visible]]&lt;br /&gt;
[[mesh_normals]]&lt;br /&gt;
[[mesh_quality]]&lt;br /&gt;
[[mesh_radius]]&lt;br /&gt;
[[mesh_skip]]&lt;br /&gt;
[[mesh_solvent]]&lt;br /&gt;
[[mesh_type]]&lt;br /&gt;
[[mesh_width]]&lt;br /&gt;
[[min_mesh_spacing]]&lt;br /&gt;
[[moe_separate_chains]]&lt;br /&gt;
[[mouse_grid]]&lt;br /&gt;
[[mouse_limit]]&lt;br /&gt;
[[mouse_restart_movie_delay]]&lt;br /&gt;
[[mouse_scale]]&lt;br /&gt;
[[mouse_selection_mode]]&lt;br /&gt;
[[mouse_wheel_scale]]&lt;br /&gt;
[[movie_animate_by_frame]]&lt;br /&gt;
[[movie_delay]]&lt;br /&gt;
[[movie_fps]]&lt;br /&gt;
[[movie_loop]]&lt;br /&gt;
[[movie_rock]]&lt;br /&gt;
[[multiplex]]&lt;br /&gt;
&lt;br /&gt;
===N===&lt;br /&gt;
[[no_idle]]&lt;br /&gt;
[[nonbonded_size]]&lt;br /&gt;
[[nonbonded_transparency]]&lt;br /&gt;
[[normal_workaround]]&lt;br /&gt;
[[normalize_ccp4_maps]]&lt;br /&gt;
[[normalize_grd_maps]]&lt;br /&gt;
[[normalize_o_maps]]&lt;br /&gt;
[[nvidia_bugs]]&lt;br /&gt;
&lt;br /&gt;
===O===&lt;br /&gt;
[[opaque_background]]&lt;br /&gt;
[[orthoscopic]]&lt;br /&gt;
[[overlay]]&lt;br /&gt;
[[overlay_lines]]&lt;br /&gt;
&lt;br /&gt;
===P===&lt;br /&gt;
[[pdb_conect_all]]&lt;br /&gt;
[[pdb_discrete_chains]]&lt;br /&gt;
[[pdb_echo_tags]]&lt;br /&gt;
[[pdb_formal_charges]]&lt;br /&gt;
[[pdb_hetatm_guess_valences]]&lt;br /&gt;
[[pdb_hetatm_sort]]&lt;br /&gt;
[[pdb_honor_model_number]]&lt;br /&gt;
[[pdb_insertions_go_first]]&lt;br /&gt;
[[pdb_insure_orthogonal]]&lt;br /&gt;
[[pdb_literal_names]]&lt;br /&gt;
[[pdb_no_end_record]]&lt;br /&gt;
[[pdb_reformat_names_mode]]&lt;br /&gt;
[[pdb_retain_ids]]&lt;br /&gt;
[[pdb_standard_order]]&lt;br /&gt;
[[pdb_truncate_residue_name]]&lt;br /&gt;
[[pdb_unbond_cations]]&lt;br /&gt;
[[pdb_use_ter_records]]&lt;br /&gt;
[[pickable]]&lt;br /&gt;
[[png_file_gamma]]&lt;br /&gt;
[[png_screen_gamma]]&lt;br /&gt;
[[power]]&lt;br /&gt;
[[pqr_no_chain_id]]&lt;br /&gt;
[[presentation]]&lt;br /&gt;
[[presentation_auto_quit]]&lt;br /&gt;
[[presentation_auto_start]]&lt;br /&gt;
[[presentation_mode]]&lt;br /&gt;
[[preserve_chempy_ids]]&lt;br /&gt;
[[pymol_space_max_blue]]&lt;br /&gt;
[[pymol_space_max_green]]&lt;br /&gt;
[[pymol_space_max_red]]&lt;br /&gt;
[[pymol_space_min_factor]]&lt;br /&gt;
&lt;br /&gt;
===Q===&lt;br /&gt;
&lt;br /&gt;
===R===&lt;br /&gt;
[[raise_exceptions]]&lt;br /&gt;
[[ramp_blend_nearby_colors]]&lt;br /&gt;
[[rank_assisted_sorts]]&lt;br /&gt;
[[ray_blend_blue]]&lt;br /&gt;
[[ray_blend_colors]]&lt;br /&gt;
[[ray_blend_green]]&lt;br /&gt;
[[ray_blend_red]]&lt;br /&gt;
[[ray_clip_shadows]]&lt;br /&gt;
[[ray_color_ramps]]&lt;br /&gt;
[[ray_default_renderer]]&lt;br /&gt;
[[ray_direct_shade]]&lt;br /&gt;
[[ray_hint_camera]]&lt;br /&gt;
[[ray_hint_shadow]]&lt;br /&gt;
[[ray_improve_shadows]]&lt;br /&gt;
[[ray_interior_color]]&lt;br /&gt;
[[ray_interior_mode]]&lt;br /&gt;
[[ray_interior_reflect]]&lt;br /&gt;
[[ray_interior_shadows]]&lt;br /&gt;
[[ray_interior_texture]]&lt;br /&gt;
[[ray_label_specular]]&lt;br /&gt;
[[ray_legacy_lighting]]&lt;br /&gt;
[[ray_max_passes]]&lt;br /&gt;
[[ray_opaque_background]]&lt;br /&gt;
[[ray_orthoscopic]]&lt;br /&gt;
[[ray_oversample_cutoff]]&lt;br /&gt;
[[ray_pixel_scale]]&lt;br /&gt;
[[ray_scatter]]&lt;br /&gt;
[[ray_shadow]]&lt;br /&gt;
[[ray_shadow_decay_factor]]&lt;br /&gt;
[[ray_shadow_decay_range]]&lt;br /&gt;
[[ray_shadow_fudge]]&lt;br /&gt;
[[ray_shadows]]&lt;br /&gt;
[[ray_spec_local]]&lt;br /&gt;
[[ray_texture]]&lt;br /&gt;
[[ray_texture_settings]]&lt;br /&gt;
[[ray_trace_color]]&lt;br /&gt;
[[ray_trace_depth_factor]]&lt;br /&gt;
[[ray_trace_disco_factor]]&lt;br /&gt;
[[ray_trace_fog]]&lt;br /&gt;
[[ray_trace_fog_start]]&lt;br /&gt;
[[ray_trace_frames]]&lt;br /&gt;
[[ray_trace_gain]]&lt;br /&gt;
[[ray_trace_mode]]&lt;br /&gt;
[[ray_trace_persist_cutoff]]&lt;br /&gt;
[[ray_trace_slope_factor]]&lt;br /&gt;
[[ray_trace_trans_cutoff]]&lt;br /&gt;
[[ray_transparency_contrast]]&lt;br /&gt;
[[ray_transparency_oblique]]&lt;br /&gt;
[[ray_transparency_oblique_power]]&lt;br /&gt;
[[ray_transparency_shadows]]&lt;br /&gt;
[[ray_transparency_spec_cut]]&lt;br /&gt;
[[ray_transparency_specular]]&lt;br /&gt;
[[ray_triangle_fudge]]&lt;br /&gt;
[[reflect]]&lt;br /&gt;
[[reflect_power]]&lt;br /&gt;
[[retain_order]]&lt;br /&gt;
[[ribbon_color]]&lt;br /&gt;
[[ribbon_nucleic_acid_mode]]&lt;br /&gt;
[[ribbon_power]]&lt;br /&gt;
[[ribbon_power_b]]&lt;br /&gt;
[[ribbon_radius]]&lt;br /&gt;
[[ribbon_sampling]]&lt;br /&gt;
[[ribbon_side_chain_helper]]&lt;br /&gt;
[[ribbon_smooth]]&lt;br /&gt;
[[ribbon_throw]]&lt;br /&gt;
[[ribbon_trace_atoms]]&lt;br /&gt;
[[ribbon_width]]&lt;br /&gt;
[[robust_logs]]&lt;br /&gt;
[[rock]]&lt;br /&gt;
[[rock_delay]]&lt;br /&gt;
[[roving_byres]]&lt;br /&gt;
[[roving_cartoon]]&lt;br /&gt;
[[roving_delay]]&lt;br /&gt;
[[roving_detail]]&lt;br /&gt;
[[roving_isomesh]]&lt;br /&gt;
[[roving_isosurface]]&lt;br /&gt;
[[roving_labels]]&lt;br /&gt;
[[roving_lines]]&lt;br /&gt;
[[roving_map1_level]]&lt;br /&gt;
[[roving_map1_name]]&lt;br /&gt;
[[roving_map2_level]]&lt;br /&gt;
[[roving_map2_name]]&lt;br /&gt;
[[roving_map3_level]]&lt;br /&gt;
[[roving_map3_name]]&lt;br /&gt;
[[roving_nb_spheres]]&lt;br /&gt;
[[roving_nonbonded]]&lt;br /&gt;
[[roving_origin]]&lt;br /&gt;
[[roving_origin_z]]&lt;br /&gt;
[[roving_origin_z_cushion]]&lt;br /&gt;
[[roving_polar_contacts]]&lt;br /&gt;
[[roving_polar_cutoff]]&lt;br /&gt;
[[roving_ribbon]]&lt;br /&gt;
[[roving_selection]]&lt;br /&gt;
[[roving_spheres]]&lt;br /&gt;
[[roving_sticks]]&lt;br /&gt;
&lt;br /&gt;
===S===&lt;br /&gt;
[[scene_animation]]&lt;br /&gt;
[[scene_animation_duration]]&lt;br /&gt;
[[scene_buttons]]&lt;br /&gt;
[[scene_buttons_mode]]&lt;br /&gt;
[[scene_current_name]]&lt;br /&gt;
[[scene_loop]]&lt;br /&gt;
[[scene_restart_movie_delay]]&lt;br /&gt;
[[scenes_changed]]&lt;br /&gt;
[[sculpt_angl_weight]]&lt;br /&gt;
[[sculpt_auto_center]]&lt;br /&gt;
[[sculpt_avd_excl]]&lt;br /&gt;
[[sculpt_avd_gap]]&lt;br /&gt;
[[sculpt_avd_range]]&lt;br /&gt;
[[sculpt_avd_weight]]&lt;br /&gt;
[[sculpt_bond_weight]]&lt;br /&gt;
[[sculpt_field_mask]]&lt;br /&gt;
[[sculpt_hb_overlap]]&lt;br /&gt;
[[sculpt_hb_overlap_base]]&lt;br /&gt;
[[sculpt_line_weight]]&lt;br /&gt;
[[sculpt_max_max]]&lt;br /&gt;
[[sculpt_max_min]]&lt;br /&gt;
[[sculpt_max_scale]]&lt;br /&gt;
[[sculpt_max_weight]]&lt;br /&gt;
[[sculpt_memory]]&lt;br /&gt;
[[sculpt_min_max]]&lt;br /&gt;
[[sculpt_min_min]]&lt;br /&gt;
[[sculpt_min_scale]]&lt;br /&gt;
[[sculpt_min_weight]]&lt;br /&gt;
[[sculpt_nb_interval]]&lt;br /&gt;
[[sculpt_plan_weight]]&lt;br /&gt;
[[sculpt_pyra_weight]]&lt;br /&gt;
[[sculpt_tors_tolerance]]&lt;br /&gt;
[[sculpt_tors_weight]]&lt;br /&gt;
[[sculpt_tri_max]]&lt;br /&gt;
[[sculpt_tri_min]]&lt;br /&gt;
[[sculpt_tri_mode]]&lt;br /&gt;
[[sculpt_tri_scale]]&lt;br /&gt;
[[sculpt_tri_weight]]&lt;br /&gt;
[[sculpt_vdw_scale]]&lt;br /&gt;
[[sculpt_vdw_scale14]]&lt;br /&gt;
[[sculpt_vdw_vis_max]]&lt;br /&gt;
[[sculpt_vdw_vis_mid]]&lt;br /&gt;
[[sculpt_vdw_vis_min]]&lt;br /&gt;
[[sculpt_vdw_vis_mode]]&lt;br /&gt;
[[sculpt_vdw_weight]]&lt;br /&gt;
[[sculpt_vdw_weight14]]&lt;br /&gt;
[[sculpting]]&lt;br /&gt;
[[sculpting_cycles]]&lt;br /&gt;
[[sdof_drag_scale]]&lt;br /&gt;
[[secondary_structure]]&lt;br /&gt;
[[security]]&lt;br /&gt;
[[sel_counter]]&lt;br /&gt;
[[selection_overlay]]&lt;br /&gt;
[[selection_round_points]]&lt;br /&gt;
[[selection_visible_only]]&lt;br /&gt;
[[selection_width]]&lt;br /&gt;
[[selection_width_max]]&lt;br /&gt;
[[selection_width_scale]]&lt;br /&gt;
[[seq_view]]&lt;br /&gt;
[[seq_view_alignment]]&lt;br /&gt;
[[seq_view_color]]&lt;br /&gt;
[[seq_view_discrete_by_state]]&lt;br /&gt;
[[seq_view_fill_char]]&lt;br /&gt;
[[seq_view_fill_color]]&lt;br /&gt;
[[seq_view_format]]&lt;br /&gt;
[[seq_view_label_color]]&lt;br /&gt;
[[seq_view_label_mode]]&lt;br /&gt;
[[seq_view_label_spacing]]&lt;br /&gt;
[[seq_view_label_start]]&lt;br /&gt;
[[seq_view_location]]&lt;br /&gt;
[[seq_view_overlay]]&lt;br /&gt;
[[seq_view_unaligned_color]]&lt;br /&gt;
[[seq_view_unaligned_mode]]&lt;br /&gt;
[[session_cache_optimize]]&lt;br /&gt;
[[session_changed]]&lt;br /&gt;
[[session_compression]]&lt;br /&gt;
[[session_file]]&lt;br /&gt;
[[session_migration]]&lt;br /&gt;
[[session_version_check]]&lt;br /&gt;
[[shininess]]&lt;br /&gt;
[[show_alpha_checker]]&lt;br /&gt;
[[show_progress]]&lt;br /&gt;
[[simplify_display_lists]]&lt;br /&gt;
[[single_image]]&lt;br /&gt;
[[slice_dynamic_grid]]&lt;br /&gt;
[[slice_dynamic_grid_resolution]]&lt;br /&gt;
[[slice_grid]]&lt;br /&gt;
[[slice_height_map]]&lt;br /&gt;
[[slice_height_scale]]&lt;br /&gt;
[[slice_track_camera]]&lt;br /&gt;
[[slow_idle]]&lt;br /&gt;
[[smooth_color_triangle]]&lt;br /&gt;
[[solvent_radius]]&lt;br /&gt;
[[spec_count]]&lt;br /&gt;
[[spec_direct]]&lt;br /&gt;
[[spec_direct_power]]&lt;br /&gt;
[[spec_power]]&lt;br /&gt;
[[spec_reflect]]&lt;br /&gt;
[[specular]]&lt;br /&gt;
[[specular_intensity]]&lt;br /&gt;
[[sphere_color]]&lt;br /&gt;
[[sphere_mode]]&lt;br /&gt;
[[sphere_point_max_size]]&lt;br /&gt;
[[sphere_point_size]]&lt;br /&gt;
[[sphere_quality]]&lt;br /&gt;
[[sphere_scale]]&lt;br /&gt;
[[sphere_solvent]]&lt;br /&gt;
[[sphere_transparency]]&lt;br /&gt;
[[spheroid_fill]]&lt;br /&gt;
[[spheroid_scale]]&lt;br /&gt;
[[spheroid_smooth]]&lt;br /&gt;
[[ss_helix_phi_exclude]]&lt;br /&gt;
[[ss_helix_phi_include]]&lt;br /&gt;
[[ss_helix_phi_target]]&lt;br /&gt;
[[ss_helix_psi_exclude]]&lt;br /&gt;
[[ss_helix_psi_include]]&lt;br /&gt;
[[ss_helix_psi_target]]&lt;br /&gt;
[[ss_strand_phi_exclude]]&lt;br /&gt;
[[ss_strand_phi_include]]&lt;br /&gt;
[[ss_strand_phi_target]]&lt;br /&gt;
[[ss_strand_psi_exclude]]&lt;br /&gt;
[[ss_strand_psi_include]]&lt;br /&gt;
[[ss_strand_psi_target]]&lt;br /&gt;
[[state]]&lt;br /&gt;
[[static_singletons]]&lt;br /&gt;
[[stereo]]&lt;br /&gt;
[[stereo_angle]]&lt;br /&gt;
[[stereo_double_pump_mono]]&lt;br /&gt;
[[stereo_mode]]&lt;br /&gt;
[[stereo_shift]]&lt;br /&gt;
[[stick_ball]]&lt;br /&gt;
[[stick_ball_ratio]]&lt;br /&gt;
[[stick_color]]&lt;br /&gt;
[[stick_fixed_radius]]&lt;br /&gt;
[[stick_nub]]&lt;br /&gt;
[[stick_overlap]]&lt;br /&gt;
[[stick_quality]]&lt;br /&gt;
[[stick_radius]]&lt;br /&gt;
[[stick_transparency]]&lt;br /&gt;
[[stick_valence_scale]]&lt;br /&gt;
[[stop_on_exceptions]]&lt;br /&gt;
[[suppress_hidden]]&lt;br /&gt;
[[surface_best]]&lt;br /&gt;
[[surface_carve_cutoff]]&lt;br /&gt;
[[surface_carve_normal_cutoff]]&lt;br /&gt;
[[surface_carve_selection]]&lt;br /&gt;
[[surface_carve_state]]&lt;br /&gt;
[[surface_cavity_cutoff]]&lt;br /&gt;
[[surface_cavity_mode]]&lt;br /&gt;
[[surface_cavity_radius]]&lt;br /&gt;
[[surface_circumscribe]]&lt;br /&gt;
[[surface_clear_cutoff]]&lt;br /&gt;
[[surface_clear_selection]]&lt;br /&gt;
[[surface_clear_state]]&lt;br /&gt;
[[surface_color]]&lt;br /&gt;
[[surface_debug]]&lt;br /&gt;
[[surface_miserable]]&lt;br /&gt;
[[surface_mode]]&lt;br /&gt;
[[surface_negative_color]]&lt;br /&gt;
[[surface_negative_visible]]&lt;br /&gt;
[[surface_normal]]&lt;br /&gt;
[[surface_optimize_subsets]]&lt;br /&gt;
[[surface_poor]]&lt;br /&gt;
[[surface_proximity]]&lt;br /&gt;
[[surface_quality]]&lt;br /&gt;
[[surface_ramp_above_mode]]&lt;br /&gt;
[[surface_solvent]]&lt;br /&gt;
[[surface_trim_cutoff]]&lt;br /&gt;
[[surface_trim_factor]]&lt;br /&gt;
[[surface_type]]&lt;br /&gt;
[[suspend_updates]]&lt;br /&gt;
[[swap_dsn6_bytes]]&lt;br /&gt;
[[sweep_angle]]&lt;br /&gt;
[[sweep_mode]]&lt;br /&gt;
[[sweep_phase]]&lt;br /&gt;
[[sweep_speed]]&lt;br /&gt;
&lt;br /&gt;
===T===&lt;br /&gt;
[[test1]]&lt;br /&gt;
[[test2]]&lt;br /&gt;
[[text]]&lt;br /&gt;
[[texture_fonts]]&lt;br /&gt;
[[trace_atoms_mode]]&lt;br /&gt;
[[transparency]]&lt;br /&gt;
[[transparency_global_sort]]&lt;br /&gt;
[[transparency_mode]]&lt;br /&gt;
[[transparency_picking_mode]]&lt;br /&gt;
[[triangle_max_passes]]&lt;br /&gt;
[[trim_dots]]&lt;br /&gt;
[[two_sided_lighting]]&lt;br /&gt;
&lt;br /&gt;
===U===&lt;br /&gt;
[[use_display_lists]]&lt;br /&gt;
&lt;br /&gt;
===V===&lt;br /&gt;
[[valence]]&lt;br /&gt;
[[valence_default]]&lt;br /&gt;
[[valence|valence_mode]]&lt;br /&gt;
[[validate_object_names]]&lt;br /&gt;
[[valence|valence_size]]&lt;br /&gt;
[[virtual_trackball]]&lt;br /&gt;
&lt;br /&gt;
===W===&lt;br /&gt;
[[wildcard]]&lt;br /&gt;
[[wizard_prompt_mode]]&lt;br /&gt;
[[wrap_output]]&lt;br /&gt;
&lt;br /&gt;
===X===&lt;br /&gt;
&lt;br /&gt;
===Y===&lt;br /&gt;
&lt;br /&gt;
===Z===&lt;br /&gt;
&lt;br /&gt;
[[Category:Settings|All Settings]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Pymolrc&amp;diff=11958</id>
		<title>Pymolrc</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Pymolrc&amp;diff=11958"/>
		<updated>2014-06-06T10:46:21Z</updated>

		<summary type="html">&lt;p&gt;Andwar: minor wording change&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When Pymol [[Launching PyMOL|launches]], it will read custom settings and functions from a pymolrc file, if it exists. This is simply a script in PyMOL command syntax or in python syntax, depending on the suffix.&amp;lt;br&amp;gt;&lt;br /&gt;
Creating pymolrc files is a convenient way of loading individualized settings.&lt;br /&gt;
&lt;br /&gt;
== Open a pymolrc File for Editing ==&lt;br /&gt;
&lt;br /&gt;
On Windows: '''Start &amp;gt; Run''' and then paste&lt;br /&gt;
&lt;br /&gt;
 notepad &amp;quot;%HOMEDRIVE%%HOMEPATH%\pymolrc.pml&amp;quot;&lt;br /&gt;
&lt;br /&gt;
On Unix/Linux-type system (including Mac OS X): Open a terminal and type&lt;br /&gt;
&lt;br /&gt;
 nano ~/.pymolrc&lt;br /&gt;
&lt;br /&gt;
== Technical Details ==&lt;br /&gt;
&lt;br /&gt;
* The leading dot is optional, so everything that starts with '''.pymolrc''' or '''pymolrc''' will be found by PyMOL. Files with dot take precedence over files without dot.&lt;br /&gt;
* Files ending on '''.py''' (or .pym) will be parsed as python scripts, files ending on '''.pml''' or without suffix will be parsed as PyMOL command syntax.&lt;br /&gt;
* Several directories are searched, in order:&lt;br /&gt;
** current working directory&lt;br /&gt;
** $HOME&lt;br /&gt;
** $HOMEDRIVE + $HOMEPATH (on Windows)&lt;br /&gt;
** $PYMOL_PATH&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Multiple pymolrc files===&lt;br /&gt;
PyMOL will even load '''multiple pymolrc files''', however only either with dot or without dot, and only from the same directory.&amp;lt;br&amp;gt; &lt;br /&gt;
You can have multiple scripts: e.g. '''pymolrc-settings.pml''' and '''pymolrc-misc.pml''' in your home directory.&lt;br /&gt;
* '''pymolrc-settings.pml''' can e.g. be used to define 'permanent' custom [[Settings]] that you rarely change&lt;br /&gt;
* '''pymolrc-misc.pml''' can e.g. be used to define more transient custom [[Settings]], such as [[Cd|Working Directory]] or [[Fetch Path]]&lt;br /&gt;
You can query which pymolrc files have been loaded:&lt;br /&gt;
&lt;br /&gt;
 PyMOL&amp;gt; print invocation.options.deferred&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# simple test: change background color of PyMOL window&lt;br /&gt;
bg blue&lt;br /&gt;
&lt;br /&gt;
# this will run the script in the specified location&lt;br /&gt;
run /path/to/home/pymol/load_sep.py&lt;br /&gt;
&lt;br /&gt;
# your favorite settings&lt;br /&gt;
set movie_loop, 0&lt;br /&gt;
set two_sided_lighting, 1&lt;br /&gt;
&lt;br /&gt;
set label_size, 60&lt;br /&gt;
set label_outline_color, 1&lt;br /&gt;
set label_color, 0&lt;br /&gt;
set label_position, [0, 0, 10]&lt;br /&gt;
&lt;br /&gt;
# for images:&lt;br /&gt;
#   antialias =1 smooths jagged edges, 0 turns it off&lt;br /&gt;
set antialias, 1&lt;br /&gt;
&lt;br /&gt;
#   stick_radius -adjust thickness of atomic bonds&lt;br /&gt;
set stick_radius, 0.3&lt;br /&gt;
&lt;br /&gt;
# save fetched PDB files here&lt;br /&gt;
set fetch_path, /your/fetch/path&lt;br /&gt;
&lt;br /&gt;
# Personal short-cut to color_obj function&lt;br /&gt;
import color_obj&lt;br /&gt;
cmd.extend(&amp;quot;co&amp;quot;,color_obj.color_obj)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reload a pymolrc File ==&lt;br /&gt;
&lt;br /&gt;
To reload a pymolrc file (e.g. after editing .pymolrc, or after running [[reinitialize]]), [[Running Scripts|run it]] like any other script:&lt;br /&gt;
&lt;br /&gt;
 @~/.pymolrc&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 run ~/.pymolrc.py&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[save_settings]]&lt;br /&gt;
* [[Launching PyMOL]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Launching]]&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Pymolrc&amp;diff=11957</id>
		<title>Pymolrc</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Pymolrc&amp;diff=11957"/>
		<updated>2014-06-06T10:43:33Z</updated>

		<summary type="html">&lt;p&gt;Andwar: minor edits, highlighted the use of multiple files and inserted link to settings page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When Pymol [[Launching PyMOL|launches]], it will read custom settings and functions from a pymolrc file, if it exists. This is simply a script in PyMOL command syntax or in python syntax, depending on the suffix.&amp;lt;br&amp;gt;&lt;br /&gt;
Creating pymolrc files is a convenient way of loading individualized settings.&lt;br /&gt;
&lt;br /&gt;
== Open a pymolrc File for Editing ==&lt;br /&gt;
&lt;br /&gt;
On Windows: '''Start &amp;gt; Run''' and then paste&lt;br /&gt;
&lt;br /&gt;
 notepad &amp;quot;%HOMEDRIVE%%HOMEPATH%\pymolrc.pml&amp;quot;&lt;br /&gt;
&lt;br /&gt;
On Unix/Linux-type system (including Mac OS X): Open a terminal and type&lt;br /&gt;
&lt;br /&gt;
 nano ~/.pymolrc&lt;br /&gt;
&lt;br /&gt;
== Technical Details ==&lt;br /&gt;
&lt;br /&gt;
* The leading dot is optional, so everything that starts with '''.pymolrc''' or '''pymolrc''' will be found by PyMOL. Files with dot take precedence over files without dot.&lt;br /&gt;
* Files ending on '''.py''' (or .pym) will be parsed as python scripts, files ending on '''.pml''' or without suffix will be parsed as PyMOL command syntax.&lt;br /&gt;
* Several directories are searched, in order:&lt;br /&gt;
** current working directory&lt;br /&gt;
** $HOME&lt;br /&gt;
** $HOMEDRIVE + $HOMEPATH (on Windows)&lt;br /&gt;
** $PYMOL_PATH&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Multiple pymolrc files===&lt;br /&gt;
PyMOL will even load '''multiple pymolrc files''', however only either with dot or without dot, and only from the same directory.&amp;lt;br&amp;gt; &lt;br /&gt;
You can, however, have two scripts: e.g. '''pymolrc-settings.pml''' and '''pymolrc-misc.pml''' in your home directory.&lt;br /&gt;
* '''pymolrc-settings.pml''' can e.g. be used to define 'permanent' custom [[Settings]] that you rarely change&lt;br /&gt;
* '''pymolrc-misc.pml''' can e.g. be used to define more transient custom [[Settings]], such as [[Cd|Working Directory]] or [[Fetch Path]]&lt;br /&gt;
You can query which pymolrc files have been loaded:&lt;br /&gt;
&lt;br /&gt;
 PyMOL&amp;gt; print invocation.options.deferred&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# simple test: change background color of PyMOL window&lt;br /&gt;
bg blue&lt;br /&gt;
&lt;br /&gt;
# this will run the script in the specified location&lt;br /&gt;
run /path/to/home/pymol/load_sep.py&lt;br /&gt;
&lt;br /&gt;
# your favorite settings&lt;br /&gt;
set movie_loop, 0&lt;br /&gt;
set two_sided_lighting, 1&lt;br /&gt;
&lt;br /&gt;
set label_size, 60&lt;br /&gt;
set label_outline_color, 1&lt;br /&gt;
set label_color, 0&lt;br /&gt;
set label_position, [0, 0, 10]&lt;br /&gt;
&lt;br /&gt;
# for images:&lt;br /&gt;
#   antialias =1 smooths jagged edges, 0 turns it off&lt;br /&gt;
set antialias, 1&lt;br /&gt;
&lt;br /&gt;
#   stick_radius -adjust thickness of atomic bonds&lt;br /&gt;
set stick_radius, 0.3&lt;br /&gt;
&lt;br /&gt;
# save fetched PDB files here&lt;br /&gt;
set fetch_path, /your/fetch/path&lt;br /&gt;
&lt;br /&gt;
# Personal short-cut to color_obj function&lt;br /&gt;
import color_obj&lt;br /&gt;
cmd.extend(&amp;quot;co&amp;quot;,color_obj.color_obj)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reload a pymolrc File ==&lt;br /&gt;
&lt;br /&gt;
To reload a pymolrc file (e.g. after editing .pymolrc, or after running [[reinitialize]]), [[Running Scripts|run it]] like any other script:&lt;br /&gt;
&lt;br /&gt;
 @~/.pymolrc&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 run ~/.pymolrc.py&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[save_settings]]&lt;br /&gt;
* [[Launching PyMOL]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Launching]]&lt;br /&gt;
[[Category:Scripting]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Git_install_scripts&amp;diff=11934</id>
		<title>Git install scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Git_install_scripts&amp;diff=11934"/>
		<updated>2014-06-06T10:19:53Z</updated>

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

		<summary type="html">&lt;p&gt;Andwar: Created a page describing the Plugin Manager for PyMOL&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Newer versions of PyMOL come with a '''Plugin Manager''', which can be used to load plugins such as the  [https://github.com/Pymol-Scripts/Pymol-script-repo# PyMOL Script Repo].&lt;br /&gt;
&lt;br /&gt;
=Manual Setup=&lt;br /&gt;
In the PyMOL menu naviagte to '''Plugins''' &amp;gt; '''Plugin Manager''' &amp;lt;br&amp;gt;&lt;br /&gt;
Here you can manually add directories or scripts that will be loaded upon startup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Scripted setup during PyMOL launching=&lt;br /&gt;
===Creating run_on_startup.py===&lt;br /&gt;
'''run_on_startup.py''' can easily be created using a text editor such as notepad.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''run_on_startup.py''' is handled similar to pymolrc files and is executed every time PyMOL launches.&amp;lt;br&amp;gt;&lt;br /&gt;
An important distinction is that '''run_on_startup.py''' is executed before the pymolrc files and is purely written in python.&amp;lt;br&amp;gt;&lt;br /&gt;
The recommended location of '''run_on_startup.py''' is the PyMOL home directory (PYMOL_PATH, e.g. something like 'C:\Program Files \PyMOL\').&amp;lt;br&amp;gt; &lt;br /&gt;
An advantage is that should PyMOL be installed on a computer with several users, this will be run for all users, while the pymolrc files can be individual (e.g. in the USER directory).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#this can be copy-pasted to create run_on_startup.py in the home directory&lt;br /&gt;
&lt;br /&gt;
# Add paths to sys.path so PyMOL can find modules and scripts&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
&lt;br /&gt;
pymol_git = os.path.realpath(os.path.join(os.environ['PYMOL_PATH'], 'Pymol-script-repo'))&lt;br /&gt;
&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;
&lt;br /&gt;
#THIS IS WHERE THE PATH IS ADDED TO INITIALIZE PLUGINS USING THE PLUGIN MANAGER&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;
&lt;br /&gt;
pymol.plugins.preferences = {'instantsave': False, 'verbose': False}&lt;br /&gt;
pymol.plugins.autoload = {'apbs_tools': False}&lt;br /&gt;
pymol.plugins.preferences = {'instantsave': True, 'verbose': False}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# This can be used to trace if PyMOL executed the file correctly. Otherwise remove this part&lt;br /&gt;
print 'Loaded run_on_stratup.py' &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the '''Pymol-script-repo''' is located somewhere else the first section of the file will be different.&amp;lt;br&amp;gt;&lt;br /&gt;
E.g. in the USER directory:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# This would replace the first section in '''run_on_startup.py'''.&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
&lt;br /&gt;
pymol_git = os.path.abspath(os.path.join(os.path.expanduser('~'), 'Pymol-script-repo'))&lt;br /&gt;
&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;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
E.g. in any other path:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# This would replace the first section in '''run_on_startup.py'''.&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
&lt;br /&gt;
pymol_git = os.path.realpath('D:\MY\RANDOM\PATH\TO\Pymol-script-repo') # Adjust this line&lt;br /&gt;
# Note the '\' instead of '/', beware Windows users!&lt;br /&gt;
&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;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Appending additional paths to the Plugin Manager===&lt;br /&gt;
Should your scripts be located in several alternative locations, it is possible to append additional directories to the '''Plugin Manager'''.&amp;lt;br&amp;gt;&lt;br /&gt;
In the example below, a directory called 'plugins_private', which is located in the PyMOL directory, is added to the Plugin Manger.&amp;lt;br&amp;gt;&lt;br /&gt;
Should the folder be somewhere else the example below can be adjusted as outlined above.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#copy paste into PyMOL's command line or into the pymolrc&lt;br /&gt;
&lt;br /&gt;
python&lt;br /&gt;
import os&lt;br /&gt;
import sys&lt;br /&gt;
import pymol.plugins&lt;br /&gt;
&lt;br /&gt;
PRIVATE_PATH=os.path.realpath(os.path.join(os.environ['PYMOL_PATH'], 'plugins_private'))&lt;br /&gt;
startupdirectories=list(pymol.plugins.get_startup_path(True))&lt;br /&gt;
if PRIVATE_PATH not in startupdirectories:&lt;br /&gt;
    startupdirectories.append(PRIVATE_PATH)&lt;br /&gt;
if PRIVATE_PATH not in sys.path:&lt;br /&gt;
    sys.path.append(PRIVATE_PATH)&lt;br /&gt;
pymol.plugins.set_startup_path(startupdirectories)&lt;br /&gt;
python end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the '''Plugin Manager''' supports loading entire folders with scripts ('modules').&amp;lt;br&amp;gt;&lt;br /&gt;
If you have such a folder, make sure it contains a file called '__init__.py', which can be empty.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=If you don't have a Plugin Manager=&lt;br /&gt;
If you are running an older PyMOL without '''Plugin Manager''' you can either upgrade to the newest version or load plugins the traditional way. &amp;lt;br&amp;gt;&lt;br /&gt;
For detailed instructions see: [[Git install scripts]]&amp;lt;br&amp;gt;&lt;br /&gt;
Essentially, make sure that the folder is added to PyMOL's search paths.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
pymol_git = os.path.realpath(os.path.join(os.environ['PYMOL_PATH'], 'Pymol-script-repo'))&lt;br /&gt;
sys.path.append(pymol_git)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Import a plugin manually:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# EXAMPLE&lt;br /&gt;
delete all&lt;br /&gt;
frag LYS&lt;br /&gt;
cgo_arrow name N, name O # will not work if 'cgo_arrow' is not loaded&lt;br /&gt;
&lt;br /&gt;
import cgo_arrow # PyMOL will look for this file and load it&lt;br /&gt;
cgo_arrow name N, name O # should work if it is loaded&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=SEE ALSO=&lt;br /&gt;
[[Git install scripts]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Launching]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Plugin_manager&amp;diff=11946</id>
		<title>Plugin manager</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Plugin_manager&amp;diff=11946"/>
		<updated>2014-06-06T10:06:06Z</updated>

		<summary type="html">&lt;p&gt;Andwar: Created a page describing the Plugin Manager for PyMOL&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Newer versions of PyMOL come with a '''Plugin Manager''', which can be used to load plugins such as the  [https://github.com/Pymol-Scripts/Pymol-script-repo# PyMOL Script Repo].&lt;br /&gt;
&lt;br /&gt;
=Manual Setup=&lt;br /&gt;
In the PyMOL menu naviagte to '''Plugins''' &amp;gt; '''Plugin Manager''' &amp;lt;br&amp;gt;&lt;br /&gt;
Here you can manually add directories or scripts that will be loaded upon startup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Scripted setup during PyMOL launching=&lt;br /&gt;
===Creating run_on_startup.py===&lt;br /&gt;
'''run_on_startup.py''' can easily be created using a text editor such as notepad.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''run_on_startup.py''' is handled similar to pymolrc files and is executed every time PyMOL launches.&amp;lt;br&amp;gt;&lt;br /&gt;
An important distinction is that '''run_on_startup.py''' is executed before the pymolrc files and is purely written in python.&amp;lt;br&amp;gt;&lt;br /&gt;
The recommended location of '''run_on_startup.py''' is the PyMOL home directory (PYMOL_PATH, e.g. something like 'C:\Program Files \PyMOL\').&amp;lt;br&amp;gt; &lt;br /&gt;
An advantage is that should PyMOL be installed on a computer with several users, this will be run for all users, while the pymolrc files can be individual (e.g. in the USER directory).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#this can be copy-pasted to create run_on_startup.py in the home directory&lt;br /&gt;
&lt;br /&gt;
# Add paths to sys.path so PyMOL can find modules and scripts&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
&lt;br /&gt;
pymol_git = os.path.realpath(os.path.join(os.environ['PYMOL_PATH'], 'Pymol-script-repo'))&lt;br /&gt;
&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;
&lt;br /&gt;
#THIS IS WHERE THE PATH IS ADDED TO INITIALIZE PLUGINS USING THE PLUGIN MANAGER&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;
&lt;br /&gt;
pymol.plugins.preferences = {'instantsave': False, 'verbose': False}&lt;br /&gt;
pymol.plugins.autoload = {'apbs_tools': False}&lt;br /&gt;
pymol.plugins.preferences = {'instantsave': True, 'verbose': False}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# This can be used to trace if PyMOL executed the file correctly. Otherwise remove this part&lt;br /&gt;
print 'Loaded run_on_stratup.py' &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the '''Pymol-script-repo''' is located somewhere else the first section of the file will be different.&amp;lt;br&amp;gt;&lt;br /&gt;
E.g. in the USER directory:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# This would replace the first section in '''run_on_startup.py'''.&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
&lt;br /&gt;
pymol_git = os.path.abspath(os.path.join(os.path.expanduser('~'), 'Pymol-script-repo'))&lt;br /&gt;
&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;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
E.g. in any other path:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# This would replace the first section in '''run_on_startup.py'''.&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
&lt;br /&gt;
pymol_git = os.path.realpath('D:\MY\RANDOM\PATH\TO\Pymol-script-repo') # Adjust this line&lt;br /&gt;
# Note the '\' instead of '/', beware Windows users!&lt;br /&gt;
&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;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Appending additional paths to the Plugin Manager===&lt;br /&gt;
Should your scripts be located in several alternative locations, it is possible to append additional directories to the '''Plugin Manager'''.&amp;lt;br&amp;gt;&lt;br /&gt;
In the example below, a directory called 'plugins_private', which is located in the PyMOL directory, is added to the Plugin Manger.&amp;lt;br&amp;gt;&lt;br /&gt;
Should the folder be somewhere else the example below can be adjusted as outlined above.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#copy paste into PyMOL's command line or into the pymolrc&lt;br /&gt;
&lt;br /&gt;
python&lt;br /&gt;
import os&lt;br /&gt;
import sys&lt;br /&gt;
import pymol.plugins&lt;br /&gt;
&lt;br /&gt;
PRIVATE_PATH=os.path.realpath(os.path.join(os.environ['PYMOL_PATH'], 'plugins_private'))&lt;br /&gt;
startupdirectories=list(pymol.plugins.get_startup_path(True))&lt;br /&gt;
if PRIVATE_PATH not in startupdirectories:&lt;br /&gt;
    startupdirectories.append(PRIVATE_PATH)&lt;br /&gt;
if PRIVATE_PATH not in sys.path:&lt;br /&gt;
    sys.path.append(PRIVATE_PATH)&lt;br /&gt;
pymol.plugins.set_startup_path(startupdirectories)&lt;br /&gt;
python end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the '''Plugin Manager''' supports loading entire folders with scripts ('modules').&amp;lt;br&amp;gt;&lt;br /&gt;
If you have such a folder, make sure it contains a file called '__init__.py', which can be empty.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=If you don't have a Plugin Manager=&lt;br /&gt;
If you are running an older PyMOL without '''Plugin Manager''' you can either upgrade to the newest version or load plugins the traditional way. &amp;lt;br&amp;gt;&lt;br /&gt;
For detailed instructions see: [[Git install scripts]]&amp;lt;br&amp;gt;&lt;br /&gt;
Essentially, make sure that the folder is added to PyMOL's search paths.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import sys&lt;br /&gt;
import os&lt;br /&gt;
pymol_git = os.path.realpath(os.path.join(os.environ['PYMOL_PATH'], 'Pymol-script-repo'))&lt;br /&gt;
sys.path.append(pymol_git)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Import a plugin manually:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# EXAMPLE&lt;br /&gt;
delete all&lt;br /&gt;
frag LYS&lt;br /&gt;
cgo_arrow name N, name O # will not work if 'cgo_arrow' is not loaded&lt;br /&gt;
&lt;br /&gt;
import cgo_arrow # PyMOL will look for this file and load it&lt;br /&gt;
cgo_arrow name N, name O # should work if it is loaded&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=SEE ALSO=&lt;br /&gt;
[[Git install scripts]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Launching]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Valence&amp;diff=11967</id>
		<title>Valence</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Valence&amp;diff=11967"/>
		<updated>2014-06-04T21:49:55Z</updated>

		<summary type="html">&lt;p&gt;Andwar: minor typo corrections&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
Turning on '''valence''' will enable the display of double bonds.&amp;lt;br&amp;gt;&lt;br /&gt;
Toggling '''valence_mode''' alters the positioning of double bonds (for representation as [[Lines]])&amp;lt;br&amp;gt;&lt;br /&gt;
'''valence_size''' alters the distance of double bonds.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that bonds can be edited to be delocalized using [[Unond]] and [[Bond]].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&amp;lt;gallery heights=&amp;quot;200px&amp;quot; widths=&amp;quot;200px&amp;quot; align=&amp;quot;left&amp;quot; perrow=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
Image:PHE_valence_0.png|set valence, 0&amp;lt;br&amp;gt;#(no double bonds)&lt;br /&gt;
Image:PHE_valence_1_mode_1.png|set valence, 1&amp;lt;br&amp;gt;set valence_mode, 1&amp;lt;br&amp;gt;#bonds inside&lt;br /&gt;
Image:PHE_valence_1_mode_0.png|set valence, 1&amp;lt;br&amp;gt;set valence_mode, 0&amp;lt;br&amp;gt;#bonds centered&lt;br /&gt;
Image:PHE_delocalized.png|set valence, 1&amp;lt;br&amp;gt;#delocalized bonds&amp;lt;br&amp;gt;#(edited: see [[Bond]])&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''valence_size''' alters the distance of double bonds, but behaves slightly different depending on valence_mode&amp;lt;br&amp;gt;&lt;br /&gt;
{| width=&amp;quot;45%&amp;quot;&lt;br /&gt;
|+ style=&amp;quot;font-weight:bold; text-align:center; font-size:100%;&amp;quot; | valence_size&lt;br /&gt;
! valence_size with valence_mode 1&amp;lt;br&amp;gt; inside !! valence_size with valence_mode 0 &amp;lt;br&amp;gt; centered&lt;br /&gt;
|-&lt;br /&gt;
||[[File:valence_size_mode1.gif]] ||  [[File:valence_size_mode0.gif]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set valence, 0 # off&lt;br /&gt;
set valence, 1 # on&lt;br /&gt;
&lt;br /&gt;
set valence_mode, 0 # centered&lt;br /&gt;
set valence_mode, 1 # inside&lt;br /&gt;
&lt;br /&gt;
set valence_size, 0.1 # default: 0.06 # range 0 - ~0.5 &lt;br /&gt;
&lt;br /&gt;
# Editing bonds:&lt;br /&gt;
# In editing mode: select the bond using Ctrl-right-click, then enter:&lt;br /&gt;
unbond pk1,pk2&lt;br /&gt;
bond pk1,pk2,4&lt;br /&gt;
# 1: single bond, 2: double bond, 3:triple bond, 4:delocalized&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=SEE ALSO=&lt;br /&gt;
[[Bond]], [[Unond]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Settings|Valence]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Valence&amp;diff=11966</id>
		<title>Valence</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Valence&amp;diff=11966"/>
		<updated>2014-06-04T21:45:21Z</updated>

		<summary type="html">&lt;p&gt;Andwar: added descriptions for valence_size&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
Turning on '''valence''' will enable the display of double bonds.&amp;lt;br&amp;gt;&lt;br /&gt;
Toggling '''valence_mode''' alters the positioning of double bonds (for representation as [[Lines]])&amp;lt;br&amp;gt;&lt;br /&gt;
'''valence_size''' alters the distance of double bonds&lt;br /&gt;
Note that bonds can be edited to be delocalized using [[Unond]] and [[Bond]].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&amp;lt;gallery heights=&amp;quot;200px&amp;quot; widths=&amp;quot;200px&amp;quot; align=&amp;quot;left&amp;quot; perrow=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
Image:PHE_valence_0.png|set valence, 0&amp;lt;br&amp;gt;#(no double bonds)&lt;br /&gt;
Image:PHE_valence_1_mode_1.png|set valence, 1&amp;lt;br&amp;gt;set valence_mode, 1&amp;lt;br&amp;gt;#bonds inside&lt;br /&gt;
Image:PHE_valence_1_mode_0.png|set valence, 1&amp;lt;br&amp;gt;set valence_mode, 0&amp;lt;br&amp;gt;#bonds centered&lt;br /&gt;
Image:PHE_delocalized.png|set valence, 1&amp;lt;br&amp;gt;#delocalized bonds&amp;lt;br&amp;gt;#(edited: see [[Bond]])&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''valence_size''' alters the distance of double bonds, but behaves slightly different depending on valence_mode&amp;lt;br&amp;gt;&lt;br /&gt;
{| width=&amp;quot;45%&amp;quot;&lt;br /&gt;
|+ style=&amp;quot;font-weight:bold; text-align:center; font-size:100%;&amp;quot; | valence_size&lt;br /&gt;
! valence_size with valence_mode 1 !! valence_size with valence_mode 0&lt;br /&gt;
|-&lt;br /&gt;
||[[File:valence_size_mode1.gif]] ||  [[File:valence_size_mode0.gif]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set valence, 0 # off&lt;br /&gt;
set valence, 1 # on&lt;br /&gt;
&lt;br /&gt;
set valence_mode, 0 # centered&lt;br /&gt;
set valence_mode, 1 # inside&lt;br /&gt;
&lt;br /&gt;
set valence_size, 0.1 # default: 0.06 # range 0 - ~0.5 &lt;br /&gt;
&lt;br /&gt;
# Editing bonds:&lt;br /&gt;
# In editing mode: select the bond using Ctrl-right-click, then enter:&lt;br /&gt;
unbond pk1,pk2&lt;br /&gt;
bond pk1,pk2,4&lt;br /&gt;
# 1: single bond, 2: double bond, 3:triple bond, 4:delocalized&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=SEE ALSO=&lt;br /&gt;
[[Bond]], [[Unond]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Settings|Valence]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=FindSurfaceResidues&amp;diff=11932</id>
		<title>FindSurfaceResidues</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=FindSurfaceResidues&amp;diff=11932"/>
		<updated>2014-06-01T22:56:28Z</updated>

		<summary type="html">&lt;p&gt;Andwar: changed (commented) a line in the surfaceatoms function (section: if show!=False); altering vdw affects repeated runs and was replaced by adjusting sphere_scale instead&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type      = module&lt;br /&gt;
|filename  = findSurfaceResidues.py&lt;br /&gt;
|author    = [[User:inchoate|Jason Vertrees]] &lt;br /&gt;
|license   = BSD-2-Clause&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Image:FindExRes.png|thumb|right|300px|Result of $TUT/1hpv.pdb at 2.5 Ang cutoff.&lt;br /&gt;
Image:Surface_residues_ex.png|300px|Example coloring of surface residues&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
This script will select (and color if requested) surface residues and atoms on an object or selection.  See the options below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each time, the script will create two new selections called, 'exposed_res_XYZ' and 'exposed_atm_XYZ' where XYZ is some random number.  This is done so that no other selections/objects are overwritten.&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
 findSurfaceResidues [ selection=all [, cutoff=2.5 [, doShow=False ]]]&lt;br /&gt;
&lt;br /&gt;
The parameters are:&lt;br /&gt;
&lt;br /&gt;
'''selection'''&lt;br /&gt;
:: The object or selection for which to find exposed residues;&lt;br /&gt;
:: DEFAULT = (all)&lt;br /&gt;
'''cutoff'''&lt;br /&gt;
:: The cutoff in square Angstroms that defines exposed or not.  Those residues with &amp;gt; cutoff Ang^2 exposed will be considered ''exposed'';&lt;br /&gt;
:: DEFAULT =  2.5 Ang^2&lt;br /&gt;
'''doShow'''&lt;br /&gt;
:: Change the visualization to highlight the exposed residues vs interior&lt;br /&gt;
:: DEFAULT = False/Blank&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# make sure you download and run the code below, before trying these examples.&lt;br /&gt;
load $TUT/1hpv.pdb&lt;br /&gt;
findSurfaceResidues&lt;br /&gt;
# now show the exposed&lt;br /&gt;
findSurfaceResidues doShow=True&lt;br /&gt;
&lt;br /&gt;
# watch how the visualization changes:&lt;br /&gt;
findSurfaceResidues doShow=1, cutoff=0.5&lt;br /&gt;
findSurfaceResidues doShow=1, cutoff=1.0&lt;br /&gt;
findSurfaceResidues doShow=1, cutoff=1.5&lt;br /&gt;
findSurfaceResidues doShow=1, cutoff=2.0&lt;br /&gt;
findSurfaceResidues doShow=1, cutoff=2.5&lt;br /&gt;
findSurfaceResidues doShow=1, cutoff=3.0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= The Code =&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# -*- coding: utf-8 -*-&lt;br /&gt;
import pymol&lt;br /&gt;
from pymol import cmd&lt;br /&gt;
import random&lt;br /&gt;
&lt;br /&gt;
def findSurfaceResidues(objSel=&amp;quot;(all)&amp;quot;, cutoff=2.5, doShow=False, verbose=False):&lt;br /&gt;
	&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
	findSurfaceResidues&lt;br /&gt;
		finds those residues on the surface of a protein&lt;br /&gt;
		that have at least 'cutoff' exposed A**2 surface area.&lt;br /&gt;
&lt;br /&gt;
	PARAMS&lt;br /&gt;
		objSel (string)&lt;br /&gt;
			the object or selection in which to find&lt;br /&gt;
			exposed residues&lt;br /&gt;
			DEFAULT: (all)&lt;br /&gt;
&lt;br /&gt;
		cutoff (float)&lt;br /&gt;
			your cutoff of what is exposed or not. &lt;br /&gt;
			DEFAULT: 2.5 Ang**2&lt;br /&gt;
&lt;br /&gt;
		asSel (boolean)&lt;br /&gt;
			make a selection out of the residues found&lt;br /&gt;
&lt;br /&gt;
	RETURNS&lt;br /&gt;
		(list: (chain, resv ) )&lt;br /&gt;
			A Python list of residue numbers corresponding&lt;br /&gt;
			to those residues w/more exposure than the cutoff.&lt;br /&gt;
&lt;br /&gt;
	&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
	tmpObj=&amp;quot;__tmp&amp;quot;&lt;br /&gt;
	cmd.create( tmpObj, objSel + &amp;quot; and polymer&amp;quot;);&lt;br /&gt;
	if verbose!=False:&lt;br /&gt;
		print &amp;quot;WARNING: I'm setting dot_solvent.  You may not care for this.&amp;quot;&lt;br /&gt;
	cmd.set(&amp;quot;dot_solvent&amp;quot;);&lt;br /&gt;
	cmd.get_area(selection=tmpObj, load_b=1)&lt;br /&gt;
&lt;br /&gt;
	# threshold on what one considers an &amp;quot;exposed&amp;quot; atom (in A**2):&lt;br /&gt;
	cmd.remove( tmpObj + &amp;quot; and b &amp;lt; &amp;quot; + str(cutoff) )&lt;br /&gt;
&lt;br /&gt;
	stored.tmp_dict = {}&lt;br /&gt;
	cmd.iterate(tmpObj, &amp;quot;stored.tmp_dict[(chain,resv)]=1&amp;quot;)&lt;br /&gt;
	exposed = stored.tmp_dict.keys()&lt;br /&gt;
	exposed.sort()&lt;br /&gt;
&lt;br /&gt;
        randstr = str(random.randint(0,10000))&lt;br /&gt;
	selName = &amp;quot;exposed_atm_&amp;quot; + randstr&lt;br /&gt;
	if verbose!=False:&lt;br /&gt;
		print &amp;quot;Exposed residues are selected in: &amp;quot; + selName&lt;br /&gt;
	cmd.select(selName, objSel + &amp;quot; in &amp;quot; + tmpObj ) &lt;br /&gt;
        selNameRes = &amp;quot;exposed_res_&amp;quot; + randstr&lt;br /&gt;
        cmd.select(selNameRes, &amp;quot;byres &amp;quot; + selName )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	if doShow!=False:&lt;br /&gt;
		cmd.show_as(&amp;quot;spheres&amp;quot;, objSel + &amp;quot; and poly&amp;quot;)&lt;br /&gt;
		cmd.color(&amp;quot;white&amp;quot;, objSel)&lt;br /&gt;
		cmd.color(&amp;quot;red&amp;quot;, selName)&lt;br /&gt;
&lt;br /&gt;
	cmd.delete(tmpObj)&lt;br /&gt;
&lt;br /&gt;
	return exposed&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
cmd.extend(&amp;quot;findSurfaceResidues&amp;quot;, findSurfaceResidues)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Another version =&lt;br /&gt;
&amp;lt;gallery heights=&amp;quot;240px&amp;quot; widths=&amp;quot;340px&amp;quot;&amp;gt;&lt;br /&gt;
Image:Surfaceatoms.png|Another version, to show the same thing. The part of the protein which is not surface exposed is in cartoon. The white is the surface &amp;quot;byres&amp;quot; exposed residues shown in sticks. The orange is the atoms which is exposed.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from pymol import cmd, stored&lt;br /&gt;
 &lt;br /&gt;
def surfaceatoms(molecule=&amp;quot;NIL&amp;quot;,show=True, verbose=True, cutoff=2.5):&lt;br /&gt;
	&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
	surfaceatoms&lt;br /&gt;
		finds those residues on the surface of a protein&lt;br /&gt;
		that have at least 'cutoff' exposed A**2 surface area.&lt;br /&gt;
 	PARAMS&lt;br /&gt;
		molecule (string)&lt;br /&gt;
			the object or selection in which to find&lt;br /&gt;
			exposed residues&lt;br /&gt;
			DEFAULT: (last molecule in pymol)&lt;br /&gt;
 		cutoff (float)&lt;br /&gt;
			your cutoff of what is exposed or not. &lt;br /&gt;
			DEFAULT: 2.5 Ang**2&lt;br /&gt;
	RETURNS&lt;br /&gt;
		(list: (chain, resv ) )&lt;br /&gt;
			A Python list of residue numbers corresponding&lt;br /&gt;
			to those residues w/more exposure than the cutoff.&lt;br /&gt;
	&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
	if molecule==&amp;quot;NIL&amp;quot;:&lt;br /&gt;
		assert len(cmd.get_names())!=0, &amp;quot;Did you forget to load a molecule? There are no objects in pymol.&amp;quot;&lt;br /&gt;
		molecule=cmd.get_names()[-1]&lt;br /&gt;
	tmpObj=&amp;quot;__tmp&amp;quot;&lt;br /&gt;
	cmd.create(tmpObj, &amp;quot;(%s and polymer) and not resn HOH&amp;quot;%molecule)&lt;br /&gt;
	if verbose!=False:&lt;br /&gt;
		print &amp;quot;WARNING: I'm setting dot_solvent.  You may not care for this.&amp;quot;&lt;br /&gt;
	cmd.set(&amp;quot;dot_solvent&amp;quot;)&lt;br /&gt;
	cmd.get_area(selection=tmpObj, load_b=1)&lt;br /&gt;
 	# threshold on what one considers an &amp;quot;exposed&amp;quot; atom (in A**2):&lt;br /&gt;
	cmd.remove( tmpObj + &amp;quot; and b &amp;lt; &amp;quot; + str(cutoff) )&lt;br /&gt;
 	stored.tmp_dict = {}&lt;br /&gt;
	cmd.iterate(tmpObj, &amp;quot;stored.tmp_dict[(chain,resv)]=1&amp;quot;)&lt;br /&gt;
	exposed = stored.tmp_dict.keys()&lt;br /&gt;
	exposed.sort()&lt;br /&gt;
 &lt;br /&gt;
	selName = &amp;quot;%s_atoms&amp;quot;%molecule&lt;br /&gt;
	cmd.select(selName, molecule + &amp;quot; in &amp;quot; + tmpObj ) &lt;br /&gt;
	if verbose!=False:&lt;br /&gt;
		print &amp;quot;Exposed residues are selected in: &amp;quot; + selName&lt;br /&gt;
	selNameRes = &amp;quot;%s_resi&amp;quot;%molecule&lt;br /&gt;
	cmd.select(selNameRes, &amp;quot;byres &amp;quot; + selName )&lt;br /&gt;
 &lt;br /&gt;
 	if show!=False:&lt;br /&gt;
		cmd.hide(&amp;quot;everything&amp;quot;, molecule)&lt;br /&gt;
		cmd.show(&amp;quot;cartoon&amp;quot;, &amp;quot;%s and not %s and not resn HOH&amp;quot;%(molecule,selNameRes))&lt;br /&gt;
		cmd.show(&amp;quot;sticks&amp;quot;, &amp;quot;%s&amp;quot;%selNameRes)&lt;br /&gt;
		cmd.util.cbaw(selNameRes)&lt;br /&gt;
		cmd.disable(selNameRes)&lt;br /&gt;
		#cmd.alter('%s'%(selName),'vdw=0.5') # affects repeated runs&lt;br /&gt;
                cmd.set('sphere_scale','0.3','%s'%(selName)) # does not affect repeated runs&lt;br /&gt;
		cmd.show(&amp;quot;spheres&amp;quot;, &amp;quot;%s&amp;quot;%selName)&lt;br /&gt;
		cmd.util.cbao(selName)&lt;br /&gt;
		cmd.disable(selName)&lt;br /&gt;
&lt;br /&gt;
 	cmd.delete(tmpObj)&lt;br /&gt;
	print(exposed)&lt;br /&gt;
 	return(exposed)&lt;br /&gt;
cmd.extend(&amp;quot;surfaceatoms&amp;quot;, surfaceatoms)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:ObjSel_Scripts]]&lt;br /&gt;
[[Category:Biochemical_Scripts]]&lt;br /&gt;
[[Category:Structural_Biology_Scripts]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Valence&amp;diff=11965</id>
		<title>Valence</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Valence&amp;diff=11965"/>
		<updated>2014-05-29T20:51:50Z</updated>

		<summary type="html">&lt;p&gt;Andwar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
Turning on '''valence''' will enable the display of double bonds.&amp;lt;br&amp;gt;&lt;br /&gt;
Toggling '''valence_mode''' alters the positioning of double bonds (for representation as [[Lines]])&amp;lt;br&amp;gt;&lt;br /&gt;
Note that bonds can be edited to be delocalized using [[Unond]] and [[Bond]]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&amp;lt;gallery heights=&amp;quot;200px&amp;quot; widths=&amp;quot;200px&amp;quot; align=&amp;quot;left&amp;quot; perrow=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
Image:PHE_valence_0.png|set valence, 0&amp;lt;br&amp;gt;#(no double bonds)&lt;br /&gt;
Image:PHE_valence_1_mode_1.png|set valence, 1&amp;lt;br&amp;gt;set valence_mode, 1&amp;lt;br&amp;gt;#bonds inside&lt;br /&gt;
Image:PHE_valence_1_mode_0.png|set valence, 1&amp;lt;br&amp;gt;set valence_mode, 0&amp;lt;br&amp;gt;#bonds centered&lt;br /&gt;
Image:PHE_delocalized.png|set valence, 1&amp;lt;br&amp;gt;#delocalized bonds&amp;lt;br&amp;gt;#(edited: see [[Bond]])&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 valence, 0 # off&lt;br /&gt;
set valence, 1 # on&lt;br /&gt;
&lt;br /&gt;
set valence_mode, 0 # centered&lt;br /&gt;
set valence_mode, 1 # inside&lt;br /&gt;
&lt;br /&gt;
# In editing mode:&lt;br /&gt;
# select the bond using Ctrl-right-click, then enter:&lt;br /&gt;
unbond pk1,pk2&lt;br /&gt;
bond pk1,pk2,4&lt;br /&gt;
# 1: single bond, 2: double bond, 3:triple bond, 4:delocalized&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=SEE ALSO=&lt;br /&gt;
[[Bond]], [[Unond]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Settings|Valence]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Valence&amp;diff=11964</id>
		<title>Valence</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Valence&amp;diff=11964"/>
		<updated>2014-05-29T20:49:59Z</updated>

		<summary type="html">&lt;p&gt;Andwar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
Turning on '''valence''' will enable the display of double bonds.&amp;lt;br&amp;gt;&lt;br /&gt;
Toggling '''valence_mode''' alters the positioning of double bonds (for representation as [[Lines]])&amp;lt;br&amp;gt;&lt;br /&gt;
Note that bonds can be edited to be delocalized using [[Unond]] and [[Bond]]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&amp;lt;gallery heights=&amp;quot;200px&amp;quot; widths=&amp;quot;200px&amp;quot; align=&amp;quot;left&amp;quot; perrow=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
Image:PHE_valence_0.png|set valence, 0&amp;lt;br&amp;gt;#(no double bonds)&lt;br /&gt;
Image:PHE_valence_1_mode_1.png|set valence, 1&amp;lt;br&amp;gt;set valence_mode, 1&amp;lt;br&amp;gt;#bonds inside&lt;br /&gt;
Image:PHE_valence_1_mode_0.png|set valence, 1&amp;lt;br&amp;gt;set valence_mode, 0&amp;lt;br&amp;gt;#bonds centered&lt;br /&gt;
Image:PHE_delocalized.png|set valence, 1&amp;lt;br&amp;gt;#delocalized bonds&amp;lt;br&amp;gt;#(edited: see [[Bond]])&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 valence, 0 # off&lt;br /&gt;
set valence, 1 # on&lt;br /&gt;
&lt;br /&gt;
set valence_mode, 0 # centered&lt;br /&gt;
set valence_mode, 1 # inside&lt;br /&gt;
&lt;br /&gt;
# In editing mode:&lt;br /&gt;
# select the bond using Ctrl-right-click, then enter:&lt;br /&gt;
unbond pk1,pk2&lt;br /&gt;
bond pk1,pk2,4&lt;br /&gt;
# 1: single bond, 2: double bond, triple bond, 4:delocalized&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=SEE ALSO=&lt;br /&gt;
[[Bond]], [[Unond]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Settings|Valence]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Hash_max&amp;diff=8016</id>
		<title>Hash max</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Hash_max&amp;diff=8016"/>
		<updated>2014-02-18T13:52:12Z</updated>

		<summary type="html">&lt;p&gt;Andwar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
[[hash_max]] sets how much memory PyMOL uses when ray tracing.&lt;br /&gt;
Higher values will enable PyMOL to ray trace more quickly, provided you can secure the necessary memory. Thus for large scenes,  it can be useful to increase this value.  Simpler scenes probably don't need it.  If '''hash_max''' is set too high, then PyMOL can (and will) crash when it attempts to use more memory than available.&lt;br /&gt;
Likewise, '''hash_max''' can be used to limit the use of memory to avoid crashes at the expense of increased computing time.&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 hash_max, int&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
where '''int''' is a positive integer.  The default value is 100.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
set hash_max, 200&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[[ray]], [[png]], [[draw]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Settings|Hash_Max]]&lt;br /&gt;
[[Category:Performance]]&lt;/div&gt;</summary>
		<author><name>Andwar</name></author>
	</entry>
</feed>