<?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=Mpb21</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=Mpb21"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php/Special:Contributions/Mpb21"/>
	<updated>2026-04-15T12:16:47Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Cluster_mols&amp;diff=14185</id>
		<title>Cluster mols</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Cluster_mols&amp;diff=14185"/>
		<updated>2017-12-01T15:23:07Z</updated>

		<summary type="html">&lt;p&gt;Mpb21: Added full page of description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:cluster_mols_py_pymol.png|450px|right]]&lt;br /&gt;
cluster_mols is a PyMOL plugin that allows the user to quickly select compounds from a virtual screen to be purchased or synthesized.&lt;br /&gt;
&lt;br /&gt;
It helps the user by automatically clustering input compounds based on their molecular fingerprints [http://openbabel.org/wiki/FP2] and loading them into the PyMOL window.  cluster_mols also highlights both good and bad polar interactions between the ligands and a user specified receptor.  Additionally there are a number of keyboard controls for selecting and extracting compounds, as well as functionality for searching online to see if there are vendors for a selected compound.&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
The basic work flow of cluster_mols.py can be broken up into three parts.&lt;br /&gt;
# Computing a similarity matrix from the input compounds&lt;br /&gt;
# Performing hierarchical clustering on the results from 1)&lt;br /&gt;
# Cutting the tree at a user-specified height and creating and sorting clusters &lt;br /&gt;
&lt;br /&gt;
The results of 1 and 2 are saved to python pickle files so you do not have to recompute them in subsequent runs.&lt;br /&gt;
&lt;br /&gt;
In addition, it also highlights both good and bad polar contacts between the ligand and a user specified protein using the 'show_contacts' module described below.&lt;br /&gt;
&lt;br /&gt;
This script also integrates keyboard controls which allows for WASD movement through the clusters as well as keyboard shortcuts for pulling out compounds.&lt;br /&gt;
See below for usage.&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
The most up to date version (recommended) of cluster_mols is available through BitBucket at: https://bitbucket.org/mpb21/cluster_mols_py/overview&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
This plugin has a number of dependencies that are required. And it is currently only supported on Linux and OSX. &lt;br /&gt;
&lt;br /&gt;
Python packages (install using easy_install or pip)&lt;br /&gt;
# openbabel&lt;br /&gt;
# chemfp&lt;br /&gt;
# numpy&lt;br /&gt;
# scipy&lt;br /&gt;
# Tkinter&lt;br /&gt;
# fastcluster&lt;br /&gt;
# argparse (optional: for command line only)&lt;br /&gt;
&lt;br /&gt;
Command line tools (These must be accessible through your PATH environment variable):&lt;br /&gt;
# babel -- from http://openbabel.org&lt;br /&gt;
&lt;br /&gt;
Recent versions of cluster_mols do not require sdsorter, but it is still a very useful tool for dealing with sdf files.&lt;br /&gt;
# sdsorter -- https://sourceforge.net/projects/sdsorter/&lt;br /&gt;
&lt;br /&gt;
Once you have the required dependencies, install it through PyMOL's Plugin menu.&lt;br /&gt;
&lt;br /&gt;
PyMOL &amp;gt; Plugin &amp;gt; Install Plugin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The GUI is relatively straightforward, if you follow it from top to bottom, and then then left to right through the tabs. &lt;br /&gt;
&lt;br /&gt;
The program requires that the input be a '.sdf' or '.sdf.gz' file. If your compounds are not in that format, use the 'babel' tool from OpenBabel to convert them.&lt;br /&gt;
&lt;br /&gt;
== GUI Options ==&lt;br /&gt;
[[File:cluster_mols_screen_1_desc.png|200px|thumb]]&lt;br /&gt;
[[File:cluster_mols_screen_2_desc.png|200px|thumb]]&lt;br /&gt;
&lt;br /&gt;
In the 'Compute Similarities' tab, there are options for selecting a new ligand and for specifying how many CPUs you want to run the similarity calculation on. Clicking the 'Compute Similarity' button will start the similarity calculations. If you check the 'Ignore saved results?' box it will ignore any saved intermediate results files. This could be useful if you change the contents of the original input file while keeping the file name the same.&lt;br /&gt;
&lt;br /&gt;
Depending on how many compounds there are, the similarity calculations may take between 1 and 10 minutes.  If you launched PyMOL from the command line, you will be able to see the progress printing out in the console. The similarity results are saved to a file so if you want to re-cluster the same input file, you do not need to wait to recompute the similarities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first option on the Cluster Compounds tab defines how the clusters will be sorted. The default is to sort by the 'minimizedAffinity' which is inserted into the output sdf file after minimization with 'smina' (An enhanced version of AutoDock Vina. Available at: http://www.smina.sf.net). You can also sort the clusters by any SD tag that exists in the input file, or by the Title (alphabetically) or by the size of the cluster.&lt;br /&gt;
&lt;br /&gt;
The second option is the height at which the hierarchical clustering tree is cut. The units are arbitrary, but a higher number leads to a small number of large clusters of less similar compounds, and lower cutoffs lead to more small clusters of more similar compounds. Play around with the cutoff until you get a clustering that you like. The third option is a check box for whether to group clusters with only one compound into one ‘singletons’ cluster. The forth option enables the show_contacts tool that is described below. There is also a field to enter a PyMOL selection string to compute the hydrogen bonds to. Finally, there is a button to create the clusters and load them into PyMOL.&lt;br /&gt;
&lt;br /&gt;
== Keyboard Controls ==&lt;br /&gt;
Once you have finished the similarity calculations and clustering mentioned above, you can navigate the clusters using the keyboard. Familiar to gamers, you can move through clusters using the WASD keys, (W for up, S for down, A for left, D for right). &lt;br /&gt;
The one important caveat is that due to [[Set_Key#KEYS_WHICH_CAN_BE_REDEFINED|limitations]] in PyMOL, the WASD movement needs to be used with the Control (or Alt) key. Meaning Ctrl-W moves up. It seems weird, but you quickly get used to it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Navigation Controls&lt;br /&gt;
&lt;br /&gt;
Ctrl-W – Move up a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-S – Move down a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-A – Move to the previous compound in a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-D – Move to the next compound in the cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-F -- Check for vendors&lt;br /&gt;
&lt;br /&gt;
If you acquired your compounds from ZINCPharmer (http://zincpharmer.csb.pitt.edu/) and/or your compounds have title that start with a ZINC ID (http://www.docking.zinc.org) or a MolPort ID (http://www.molport.com), you can hit 'Ctrl-F' to see if there are any vendors available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compound selection&lt;br /&gt;
&lt;br /&gt;
In addition to moving through the clusters, you can also extract compounds that you like for later viewing using the following controls. Pressing F3 will append the current compounds into a new object with the suffix '_selected'. &lt;br /&gt;
&lt;br /&gt;
F1 – Print title of currently selected molecule&lt;br /&gt;
&lt;br /&gt;
F2 – Remove most recently added compound&lt;br /&gt;
&lt;br /&gt;
'''F3 – Add currently visible compound to list''' (Most commonly used)&lt;br /&gt;
&lt;br /&gt;
F4, F12 – Print List&lt;br /&gt;
&lt;br /&gt;
== show_contacts ==&lt;br /&gt;
show_contacts is an expanded version of list_hbonds[http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/] that shows both favorable and unfavorable contacts between ligands and a protein receptor. show_contacts has been integrated into cluster_mols as a function and is executed automatically when clustering. It can also be run by itself, not in the context of cluster_mols. In the standalone case, the usage is as follows:&lt;br /&gt;
&lt;br /&gt;
	show_contacts(selection,selection2,result=&amp;quot;contacts&amp;quot;,cutoff=3.6, bigcutoff = 4.0):&lt;br /&gt;
&lt;br /&gt;
The arguments are as follows:&lt;br /&gt;
#selection -- pymol selection string for the protein&lt;br /&gt;
#selection2 -- pymol selection string for the ligands&lt;br /&gt;
#results -- prefix of the object that the distances should be shown in. (Default &amp;quot;contacts&amp;quot;)&lt;br /&gt;
#cutoff -- Distance cutoff for what is considered an ideal hydrogen bond.&lt;br /&gt;
#bigcutoff -- Distance cutoff for a non-ideal hydrogen bond.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
The output of show_contacts are a set of pymol distance objects. They are color-coded and size coded to indicate different interactions between the ligand and protein. They are controlled by the parameter indicated.&lt;br /&gt;
&lt;br /&gt;
# thin-purple lines -- all possible polar contacts (acc-acc, don-don, acc-don) -- bigcutoff&lt;br /&gt;
# thick-yellow lines -- All ideal hydrogen bonds -- cutoff&lt;br /&gt;
# thin-yellow lines -- Non ideal hydrogen bonds -- bigcutoff&lt;br /&gt;
# thick-red lines -- Polar clashes, i.e. Donor-Donor, Acceptor-Acceptor -- cutoff&lt;br /&gt;
&lt;br /&gt;
= Server =&lt;br /&gt;
A client-server architecture has been implemented as well to allow for offloading the calculations to a remote server. The cluster_mols_server.py runs on the server and listens for input from clients and returns the results. Use of the remote server can be enable or disabled with the boolean near the top of the cluster_mols.py script. Setting RUN_REMOTELY = True attempts to offload the work to the remote server and setting it to False runs it locally.&lt;br /&gt;
&lt;br /&gt;
= Citing ClusterMols =&lt;br /&gt;
If you use ClusterMols in your work, please cite the following.&lt;br /&gt;
&lt;br /&gt;
Baumgartner, Matthew (2016) IMPROVING RATIONAL DRUG DESIGN BY INCORPORATING NOVEL BIOPHYSICAL INSIGHT. Doctoral Dissertation, University of Pittsburgh.&lt;br /&gt;
&lt;br /&gt;
= Authors =&lt;br /&gt;
The main cluster_mols.py script was conceived of by Matthew P Baumgartner (mpb21 [at] pitt.edu) and Dr. David Koes while working in the lab of Dr. Carlos Camacho at the University of Pittsburgh. The cluster_mols.py script was implemented (and later rewritten) by MPB. The show_contacts functionality and the first version of the objectfocus.py keyboard controls was written by DK.&lt;br /&gt;
&lt;br /&gt;
Please send questions/comments/bug reports to matthew.p.baumgartner [at] gmail.com.&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Mpb21</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Frame_slider&amp;diff=12566</id>
		<title>Frame slider</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Frame_slider&amp;diff=12566"/>
		<updated>2015-03-24T18:27:49Z</updated>

		<summary type="html">&lt;p&gt;Mpb21: added picture&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type     = script&lt;br /&gt;
|filename  = frame_slider.py&lt;br /&gt;
|author   = Matthew Baumgartner&lt;br /&gt;
|license = MIT&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Frame slider plugin provides a simple slider bar that allows you to quickly skip through frames in PyMOL. It also has a text field that you can type the desired frame in and it will automatically go to that frame.&lt;br /&gt;
&lt;br /&gt;
[[File:frame_slider.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:UI_Scripts]]&lt;br /&gt;
[[Category:Pymol-script-repo]]&lt;/div&gt;</summary>
		<author><name>Mpb21</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Frame_slider&amp;diff=12565</id>
		<title>Frame slider</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Frame_slider&amp;diff=12565"/>
		<updated>2015-03-24T18:16:27Z</updated>

		<summary type="html">&lt;p&gt;Mpb21: added installation instructions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type     = script&lt;br /&gt;
|filename  = frame_slider.py&lt;br /&gt;
|author   = Matthew Baumgartner&lt;br /&gt;
|license = MIT&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Frame slider plugin provides a simple slider bar that allows you to quickly skip through frames in PyMOL. It also has a text field that you can type the desired frame in and it will automatically go to that frame.&lt;br /&gt;
&lt;br /&gt;
[[File:frame_slider.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
The frame slider plugin can be installed through the Plugin Manager in the Plugin Menu of PyMOL.&lt;/div&gt;</summary>
		<author><name>Mpb21</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Frame_slider&amp;diff=12564</id>
		<title>Frame slider</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Frame_slider&amp;diff=12564"/>
		<updated>2015-03-24T18:12:41Z</updated>

		<summary type="html">&lt;p&gt;Mpb21: added picture&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type     = script&lt;br /&gt;
|filename  = frame_slider.py&lt;br /&gt;
|author   = Matthew Baumgartner&lt;br /&gt;
|license = MIT&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Frame slider plugin provides a simple slider bar that allows you to quickly skip through frames in PyMOL. It also has a text field that you can type the desired frame in and it will automatically go to that frame.&lt;br /&gt;
&lt;br /&gt;
[[File:frame_slider.png]]&lt;/div&gt;</summary>
		<author><name>Mpb21</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Frame_slider&amp;diff=12563</id>
		<title>Frame slider</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Frame_slider&amp;diff=12563"/>
		<updated>2015-03-24T18:11:00Z</updated>

		<summary type="html">&lt;p&gt;Mpb21: Creation of page for frame slider plugin&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox script-repo&lt;br /&gt;
|type     = script&lt;br /&gt;
|filename  = frame_slider.py&lt;br /&gt;
|author   = Matthew Baumgartner&lt;br /&gt;
|license = MIT&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Frame slider plugin provides a simple slider bar that allows you to quickly skip through frames in PyMOL. It also has a text field that you can type the desired frame in and it will automatically go to that frame.&lt;/div&gt;</summary>
		<author><name>Mpb21</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Get_Names&amp;diff=12580</id>
		<title>Get Names</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Get_Names&amp;diff=12580"/>
		<updated>2015-03-18T16:04:18Z</updated>

		<summary type="html">&lt;p&gt;Mpb21: /* EXAMPLES */  Changed the example so that it will print the actual object name&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''get_names''' returns a list of object and/or selection names.&lt;br /&gt;
&lt;br /&gt;
===PYMOL API===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
cmd.get_names( [string: &amp;quot;objects&amp;quot;|&amp;quot;selections&amp;quot;|&amp;quot;all&amp;quot;|&amp;quot;public_objects&amp;quot;|&amp;quot;public_selections&amp;quot;] )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===NOTES===&lt;br /&gt;
The default behavior is to return only object names.&lt;br /&gt;
&lt;br /&gt;
=== EXAMPLES ===&lt;br /&gt;
Multiple alignments&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# structure align all proteins in PyMOL to the protein named &amp;quot;PROT&amp;quot;.  Effectively a &lt;br /&gt;
# poor multiple method for multiple structure alignment.&lt;br /&gt;
for x in cmd.get_names(&amp;quot;all&amp;quot;): cealign( &amp;quot;PROT&amp;quot;, x)&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Determine whether or not an object (objName) is enabled:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
if objName in cmd.get_names(enabled_only=1):&lt;br /&gt;
    print objName, &amp;quot;is enabled&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[get_type]], [[get_names_of_type]], [[count_atoms]], [[count_states]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Get Names]]&lt;/div&gt;</summary>
		<author><name>Mpb21</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Spectrum&amp;diff=12191</id>
		<title>Spectrum</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Spectrum&amp;diff=12191"/>
		<updated>2014-09-18T14:50:28Z</updated>

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

		<summary type="html">&lt;p&gt;Mpb21: Removed all text. Note to other editors, this is the author and I need to take down this page for a bit and I don't see a way to hide the page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Placeholder&lt;/div&gt;</summary>
		<author><name>Mpb21</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Cluster_mols&amp;diff=12122</id>
		<title>Cluster mols</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Cluster_mols&amp;diff=12122"/>
		<updated>2014-09-17T13:05:50Z</updated>

		<summary type="html">&lt;p&gt;Mpb21: Edited dependencies and changed Download link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:cluster_mols_py_pymol.png|450px|right]]&lt;br /&gt;
cluster_mols is a PyMOL plugin that allows the user to quickly select compounds from a virtual screen to be purchased or synthesized.&lt;br /&gt;
&lt;br /&gt;
It helps the user by automatically clustering input compounds based on their molecular fingerprints [http://openbabel.org/wiki/FP2] and loading them into the PyMOL window.  cluster_mols also highlights both good and bad polar interactions between the ligands and a user specified receptor.  Additionally there are a number of keyboard controls for selecting and extracting compounds, as well as functionality for searching online to see if there are vendors for a selected compound.&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
The basic work flow of cluster_mols.py can be broken up into three parts.&lt;br /&gt;
# Computing a similarity matrix from the input compounds&lt;br /&gt;
# Performing hierarchical clustering on the results from 1)&lt;br /&gt;
# Cutting the tree at a user-specified height and creating and sorting clusters &lt;br /&gt;
&lt;br /&gt;
The results of 1 and 2 are saved to python pickle files so you do not have to recompute them in subsequent runs.&lt;br /&gt;
&lt;br /&gt;
In addition, it also highlights both good and bad polar contacts between the ligand and a user specified protein using the 'show_contacts' module described below.&lt;br /&gt;
&lt;br /&gt;
This script also integrates keyboard controls which allows for WASD movement through the clusters as well as keyboard shortcuts for pulling out compounds.&lt;br /&gt;
See below for usage.&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
The most up to date version (recommended) of cluster_mols is available through SourceForge at: [[ Currently Unavailable ]]&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
This plugin has a number of dependencies that are required. And it is currently only supported on Linux and OSX. &lt;br /&gt;
&lt;br /&gt;
Python packages (install using easy_install or pip)&lt;br /&gt;
# openbabel&lt;br /&gt;
# chemfp&lt;br /&gt;
# numpy&lt;br /&gt;
# scipy&lt;br /&gt;
# Tkinter&lt;br /&gt;
# fastcluster&lt;br /&gt;
# argparse (optional: for command line only)&lt;br /&gt;
&lt;br /&gt;
Command line tools (These must be accessible through your PATH environment variable):&lt;br /&gt;
# babel -- from http://openbabel.org&lt;br /&gt;
&lt;br /&gt;
Recent versions of cluster_mols do not require sdsorter, but it is still a very useful tool for dealing with sdf files.&lt;br /&gt;
# sdsorter -- https://sourceforge.net/projects/sdsorter/&lt;br /&gt;
&lt;br /&gt;
Once you have the required dependencies, install it through PyMOL's Plugin menu.&lt;br /&gt;
&lt;br /&gt;
PyMOL &amp;gt; Plugin &amp;gt; Install Plugin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The GUI is relatively straightforward, if you follow it from top to bottom, and then then left to right through the tabs. &lt;br /&gt;
&lt;br /&gt;
The program requires that the input be a '.sdf' or '.sdf.gz' file. If your compounds are not in that format, use the 'babel' tool from OpenBabel to convert them.&lt;br /&gt;
&lt;br /&gt;
== GUI Options ==&lt;br /&gt;
[[File:cluster_mols_screen_1_desc.png|200px|thumb]]&lt;br /&gt;
[[File:cluster_mols_screen_2_desc.png|200px|thumb]]&lt;br /&gt;
&lt;br /&gt;
In the 'Compute Similarities' tab, there are options for selecting a new ligand and for specifying how many CPUs you want to run the similarity calculation on. Clicking the 'Compute Similarity' button will start the similarity calculations. If you check the 'Ignore saved results?' box it will ignore any saved intermediate results files. This could be useful if you change the contents of the original input file while keeping the file name the same.&lt;br /&gt;
&lt;br /&gt;
Depending on how many compounds there are, the similarity calculations may take between 1 and 10 minutes.  If you launched PyMOL from the command line, you will be able to see the progress printing out in the console. The similarity results are saved to a file so if you want to re-cluster the same input file, you do not need to wait to recompute the similarities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first option on the Cluster Compounds tab defines how the clusters will be sorted. The default is to sort by the 'minimizedAffinity' which is inserted into the output sdf file after minimization with 'smina' (An enhanced version of AutoDock Vina. Available at: http://www.smina.sf.net). You can also sort the clusters by any SD tag that exists in the input file, or by the Title (alphabetically) or by the size of the cluster.&lt;br /&gt;
&lt;br /&gt;
The second option is the height at which the hierarchical clustering tree is cut. The units are arbitrary, but a higher number leads to a small number of large clusters of less similar compounds, and lower cutoffs lead to more small clusters of more similar compounds. Play around with the cutoff until you get a clustering that you like. The third option is a check box for whether to group clusters with only one compound into one ‘singletons’ cluster. The forth option enables the show_contacts tool that is described below. There is also a field to enter a PyMOL selection string to compute the hydrogen bonds to. Finally, there is a button to create the clusters and load them into PyMOL.&lt;br /&gt;
&lt;br /&gt;
== Keyboard Controls ==&lt;br /&gt;
Once you have finished the similarity calculations and clustering mentioned above, you can navigate the clusters using the keyboard. Familiar to gamers, you can move through clusters using the WASD keys, (W for up, S for down, A for left, D for right). &lt;br /&gt;
The one important caveat is that due to [[Set_Key#KEYS_WHICH_CAN_BE_REDEFINED|limitations]] in PyMOL, the WASD movement needs to be used with the Control (or Alt) key. Meaning Ctrl-W moves up. It seems weird, but you quickly get used to it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Navigation Controls&lt;br /&gt;
&lt;br /&gt;
Ctrl-W – Move up a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-S – Move down a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-A – Move to the previous compound in a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-D – Move to the next compound in the cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-F -- Check for vendors&lt;br /&gt;
&lt;br /&gt;
If you acquired your compounds from ZINCPharmer (http://zincpharmer.csb.pitt.edu/) and/or your compounds have title that start with a ZINC ID (http://www.docking.zinc.org) or a MolPort ID (http://www.molport.com), you can hit 'Ctrl-F' to see if there are any vendors available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compound selection&lt;br /&gt;
&lt;br /&gt;
In addition to moving through the clusters, you can also extract compounds that you like for later viewing using the following controls. Pressing F3 will append the current compounds into a new object with the suffix '_selected'. &lt;br /&gt;
&lt;br /&gt;
F1 – Print title of currently selected molecule&lt;br /&gt;
&lt;br /&gt;
F2 – Remove most recently added compound&lt;br /&gt;
&lt;br /&gt;
'''F3 – Add currently visible compound to list''' (Most commonly used)&lt;br /&gt;
&lt;br /&gt;
F4, F12 – Print List&lt;br /&gt;
&lt;br /&gt;
== show_contacts ==&lt;br /&gt;
show_contacts is an expanded version of list_hbonds[http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/] that shows both favorable and unfavorable contacts between ligands and a protein receptor. show_contacts has been integrated into cluster_mols as a function and is executed automatically when clustering. It can also be run by itself, not in the context of cluster_mols. In the standalone case, the usage is as follows:&lt;br /&gt;
&lt;br /&gt;
	show_contacts(selection,selection2,result=&amp;quot;contacts&amp;quot;,cutoff=3.6, bigcutoff = 4.0):&lt;br /&gt;
&lt;br /&gt;
The arguments are as follows:&lt;br /&gt;
#selection -- pymol selection string for the protein&lt;br /&gt;
#selection2 -- pymol selection string for the ligands&lt;br /&gt;
#results -- prefix of the object that the distances should be shown in. (Default &amp;quot;contacts&amp;quot;)&lt;br /&gt;
#cutoff -- Distance cutoff for what is considered an ideal hydrogen bond.&lt;br /&gt;
#bigcutoff -- Distance cutoff for a non-ideal hydrogen bond.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
The output of show_contacts are a set of pymol distance objects. They are color-coded and size coded to indicate different interactions between the ligand and protein. They are controlled by the parameter indicated.&lt;br /&gt;
&lt;br /&gt;
# thin-purple lines -- all possible polar contacts (acc-acc, don-don, acc-don) -- bigcutoff&lt;br /&gt;
# thick-yellow lines -- All ideal hydrogen bonds -- cutoff&lt;br /&gt;
# thin-yellow lines -- Non ideal hydrogen bonds -- bigcutoff&lt;br /&gt;
# thick-red lines -- Polar clashes, i.e. Donor-Donor, Acceptor-Acceptor -- cutoff&lt;br /&gt;
&lt;br /&gt;
= Authors =&lt;br /&gt;
The main cluster_mols.py script was conceived of by Matthew P Baumgartner (mpb21 [at] pitt.edu) and Dr. David Koes while working in the lab of Dr. Carlos Camacho at the University of Pittsburgh. The cluster_mols.py script was implemented (and later rewritten) by MPB. The show_contacts functionality and the first version of the objectfocus.py keyboard controls was written by DK.&lt;br /&gt;
&lt;br /&gt;
Please send questions/comments/bug reports to mpb21 [at] pitt.edu.&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Mpb21</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Cluster_mols&amp;diff=12103</id>
		<title>Cluster mols</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Cluster_mols&amp;diff=12103"/>
		<updated>2014-07-25T19:08:16Z</updated>

		<summary type="html">&lt;p&gt;Mpb21: fixed some broken links and updated some of the formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:cluster_mols_py_pymol.png|450px|right]]&lt;br /&gt;
cluster_mols is a PyMOL plugin that allows the user to quickly select compounds from a virtual screen to be purchased or synthesized.&lt;br /&gt;
&lt;br /&gt;
It helps the user by automatically clustering input compounds based on their molecular fingerprints [http://openbabel.org/wiki/FP2] and loading them into the PyMOL window.  cluster_mols also highlights both good and bad polar interactions between the ligands and a user specified receptor.  Additionally there are a number of keyboard controls for selecting and extracting compounds, as well as functionality for searching online to see if there are vendors for a selected compound.&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
The basic work flow of cluster_mols.py can be broken up into three parts.&lt;br /&gt;
# Computing a similarity matrix from the input compounds&lt;br /&gt;
# Performing hierarchical clustering on the results from 1)&lt;br /&gt;
# Cutting the tree at a user-specified height and creating and sorting clusters &lt;br /&gt;
&lt;br /&gt;
The results of 1 and 2 are saved to python pickle files so you do not have to recompute them in subsequent runs.&lt;br /&gt;
&lt;br /&gt;
In addition, it also highlights both good and bad polar contacts between the ligand and a user specified protein using the 'show_contacts' module described below.&lt;br /&gt;
&lt;br /&gt;
This script also integrates keyboard controls which allows for WASD movement through the clusters as well as keyboard shortcuts for pulling out compounds.&lt;br /&gt;
See below for usage.&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
The most up to date version (recommended) of cluster_mols is available through SourceForge at: https://sourceforge.net/projects/clustermolspy/&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
This plugin has a number of dependencies that are required. And it is currently only supported on Linux and OSX. &lt;br /&gt;
&lt;br /&gt;
Python packages (install using easy_install or pip)&lt;br /&gt;
# openbabel&lt;br /&gt;
# chemfp&lt;br /&gt;
# numpy&lt;br /&gt;
# scipy&lt;br /&gt;
# Tkinter&lt;br /&gt;
# fastcluster&lt;br /&gt;
# argparse (optional: for command line only)&lt;br /&gt;
&lt;br /&gt;
Command line tools (These must be accessible through your PATH environment variable):&lt;br /&gt;
# babel -- from http://openbabel.org&lt;br /&gt;
# sdsorter -- https://sourceforge.net/projects/sdsorter/&lt;br /&gt;
&lt;br /&gt;
Once you have the required dependencies, install it through PyMOL's Plugin menu.&lt;br /&gt;
&lt;br /&gt;
PyMOL &amp;gt; Plugin &amp;gt; Install Plugin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The GUI is relatively straightforward, if you follow it from top to bottom, and then then left to right through the tabs. &lt;br /&gt;
&lt;br /&gt;
The program requires that the input be a '.sdf' or '.sdf.gz' file. If your compounds are not in that format, use the 'babel' tool from OpenBabel to convert them.&lt;br /&gt;
&lt;br /&gt;
== GUI Options ==&lt;br /&gt;
[[File:cluster_mols_screen_1_desc.png|200px|thumb]]&lt;br /&gt;
[[File:cluster_mols_screen_2_desc.png|200px|thumb]]&lt;br /&gt;
&lt;br /&gt;
In the 'Compute Similarities' tab, there are options for selecting a new ligand and for specifying how many CPUs you want to run the similarity calculation on. Clicking the 'Compute Similarity' button will start the similarity calculations. If you check the 'Ignore saved results?' box it will ignore any saved intermediate results files. This could be useful if you change the contents of the original input file while keeping the file name the same.&lt;br /&gt;
&lt;br /&gt;
Depending on how many compounds there are, the similarity calculations may take between 1 and 10 minutes.  If you launched PyMOL from the command line, you will be able to see the progress printing out in the console. The similarity results are saved to a file so if you want to re-cluster the same input file, you do not need to wait to recompute the similarities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first option on the Cluster Compounds tab defines how the clusters will be sorted. The default is to sort by the 'minimizedAffinity' which is inserted into the output sdf file after minimization with 'smina' (An enhanced version of AutoDock Vina. Available at: http://www.smina.sf.net). You can also sort the clusters by any SD tag that exists in the input file, or by the Title (alphabetically) or by the size of the cluster.&lt;br /&gt;
&lt;br /&gt;
The second option is the height at which the hierarchical clustering tree is cut. The units are arbitrary, but a higher number leads to a small number of large clusters of less similar compounds, and lower cutoffs lead to more small clusters of more similar compounds. Play around with the cutoff until you get a clustering that you like. The third option is a check box for whether to group clusters with only one compound into one ‘singletons’ cluster. The forth option enables the show_contacts tool that is described below. There is also a field to enter a PyMOL selection string to compute the hydrogen bonds to. Finally, there is a button to create the clusters and load them into PyMOL.&lt;br /&gt;
&lt;br /&gt;
== Keyboard Controls ==&lt;br /&gt;
Once you have finished the similarity calculations and clustering mentioned above, you can navigate the clusters using the keyboard. Familiar to gamers, you can move through clusters using the WASD keys, (W for up, S for down, A for left, D for right). &lt;br /&gt;
The one important caveat is that due to [[Set_Key#KEYS_WHICH_CAN_BE_REDEFINED|limitations]] in PyMOL, the WASD movement needs to be used with the Control (or Alt) key. Meaning Ctrl-W moves up. It seems weird, but you quickly get used to it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Navigation Controls&lt;br /&gt;
&lt;br /&gt;
Ctrl-W – Move up a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-S – Move down a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-A – Move to the previous compound in a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-D – Move to the next compound in the cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-F -- Check for vendors&lt;br /&gt;
&lt;br /&gt;
If you acquired your compounds from ZINCPharmer (http://zincpharmer.csb.pitt.edu/) and/or your compounds have title that start with a ZINC ID (http://www.docking.zinc.org) or a MolPort ID (http://www.molport.com), you can hit 'Ctrl-F' to see if there are any vendors available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compound selection&lt;br /&gt;
&lt;br /&gt;
In addition to moving through the clusters, you can also extract compounds that you like for later viewing using the following controls. Pressing F3 will append the current compounds into a new object with the suffix '_selected'. &lt;br /&gt;
&lt;br /&gt;
F1 – Print title of currently selected molecule&lt;br /&gt;
&lt;br /&gt;
F2 – Remove most recently added compound&lt;br /&gt;
&lt;br /&gt;
'''F3 – Add currently visible compound to list''' (Most commonly used)&lt;br /&gt;
&lt;br /&gt;
F4, F12 – Print List&lt;br /&gt;
&lt;br /&gt;
== show_contacts ==&lt;br /&gt;
show_contacts is an expanded version of list_hbonds[http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/] that shows both favorable and unfavorable contacts between ligands and a protein receptor. show_contacts has been integrated into cluster_mols as a function and is executed automatically when clustering. It can also be run by itself, not in the context of cluster_mols. In the standalone case, the usage is as follows:&lt;br /&gt;
&lt;br /&gt;
	show_contacts(selection,selection2,result=&amp;quot;contacts&amp;quot;,cutoff=3.6, bigcutoff = 4.0):&lt;br /&gt;
&lt;br /&gt;
The arguments are as follows:&lt;br /&gt;
#selection -- pymol selection string for the protein&lt;br /&gt;
#selection2 -- pymol selection string for the ligands&lt;br /&gt;
#results -- prefix of the object that the distances should be shown in. (Default &amp;quot;contacts&amp;quot;)&lt;br /&gt;
#cutoff -- Distance cutoff for what is considered an ideal hydrogen bond.&lt;br /&gt;
#bigcutoff -- Distance cutoff for a non-ideal hydrogen bond.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
The output of show_contacts are a set of pymol distance objects. They are color-coded and size coded to indicate different interactions between the ligand and protein. They are controlled by the parameter indicated.&lt;br /&gt;
&lt;br /&gt;
# thin-purple lines -- all possible polar contacts (acc-acc, don-don, acc-don) -- bigcutoff&lt;br /&gt;
# thick-yellow lines -- All ideal hydrogen bonds -- cutoff&lt;br /&gt;
# thin-yellow lines -- Non ideal hydrogen bonds -- bigcutoff&lt;br /&gt;
# thick-red lines -- Polar clashes, i.e. Donor-Donor, Acceptor-Acceptor -- cutoff&lt;br /&gt;
&lt;br /&gt;
= Authors =&lt;br /&gt;
The main cluster_mols.py script was conceived of by Matthew P Baumgartner (mpb21 [at] pitt.edu) and Dr. David Koes while working in the lab of Dr. Carlos Camacho at the University of Pittsburgh. The cluster_mols.py script was implemented (and later rewritten) by MPB. The show_contacts functionality and the first version of the objectfocus.py keyboard controls was written by DK.&lt;br /&gt;
&lt;br /&gt;
Please send questions/comments/bug reports to mpb21 [at] pitt.edu.&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Mpb21</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Cluster_mols&amp;diff=12102</id>
		<title>Cluster mols</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Cluster_mols&amp;diff=12102"/>
		<updated>2014-07-24T19:07:27Z</updated>

		<summary type="html">&lt;p&gt;Mpb21: /* show_contacts */  minor edits&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:cluster_mols_py_pymol.png|450px|right]]&lt;br /&gt;
cluster_mols is a PyMOL plugin that allows the user to quickly select compounds from a virtual screen to be purchased or synthesized.&lt;br /&gt;
&lt;br /&gt;
It helps the user by automatically clustering input compounds based on their molecular scaffolds and loading them into the PyMOL window.  cluster_mols also highlights both good and bad polar interactions between the ligands and a user specified receptor.  Additionally there are a number of keyboard controls for selecting and extracting compounds, as well as functionality for searching online to see if there are vendors for a selected compound.&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
The basic work flow of cluster_mols.py can be broken up into three parts.&lt;br /&gt;
# Computing a similarity matrix from the input compounds&lt;br /&gt;
# Performing hierarchical clustering on the results from 1)&lt;br /&gt;
# Cutting the tree at a user-specified height and creating and sorting clusters &lt;br /&gt;
&lt;br /&gt;
The results of 1 and 2 are saved to python pickle files so you do not have to recompute them in subsequent runs.&lt;br /&gt;
&lt;br /&gt;
In addition, it also highlights both good and bad polar contacts between the ligand and a user specified protein using the 'show_contacts' module described below.&lt;br /&gt;
&lt;br /&gt;
This script also integrates keyboard controls which allows for WASD movement through the clusters as well as keyboard shortcuts for pulling out compounds.&lt;br /&gt;
See below for usage.&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
The most up to date version (recommended) of cluster_mols is available through SourceForge at: https://sourceforge.net/projects/clustermolspy/&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
This plugin has a number of dependencies that are required. And it is currently only supported on Linux and OSX. &lt;br /&gt;
&lt;br /&gt;
Python packages (install using easy_install or pip)&lt;br /&gt;
# openbabel&lt;br /&gt;
# chemfp&lt;br /&gt;
# numpy&lt;br /&gt;
# scipy&lt;br /&gt;
# Tkinter&lt;br /&gt;
# fastcluster&lt;br /&gt;
# argparse (optional: for command line only)&lt;br /&gt;
&lt;br /&gt;
Command line tools (These must be accessible through your PATH environment variable):&lt;br /&gt;
# babel -- from openbabel.org&lt;br /&gt;
# sdsorter -- https://sourceforge.net/projects/sdsorter/&lt;br /&gt;
&lt;br /&gt;
Once you have the required dependencies, install it through PyMOL's Plugin menu.&lt;br /&gt;
&lt;br /&gt;
PyMOL &amp;gt; Plugin &amp;gt; Install Plugin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The GUI is relatively straightforward, if you follow it from top to bottom, and then then left to right through the tabs. &lt;br /&gt;
&lt;br /&gt;
The program requires that the input be a '.sdf' or '.sdf.gz' file. If your compounds are not in that format, use the 'babel' tool from OpenBabel to convert them.&lt;br /&gt;
&lt;br /&gt;
== GUI Options ==&lt;br /&gt;
[[File:cluster_mols_screen_1_desc.png|200px|thumb]]&lt;br /&gt;
[[File:cluster_mols_screen_2_desc.png|200px|thumb]]&lt;br /&gt;
&lt;br /&gt;
In the 'Compute Similarities' tab, there are options for selecting a new ligand and for specifying how many CPUs you want to run the similarity calculation on. Clicking the 'Compute Similarity' button will start the similarity calculations. If you check the 'Ignore saved results?' box it will ignore any saved intermediate results files. This could be useful if you change the contents of the original input file while keeping the file name the same.&lt;br /&gt;
&lt;br /&gt;
Depending on how many compounds there are, the similarity calculations may take between 1 and 10 minutes.  If you launched PyMOL from the command line, you will be able to see the progress printing out in the console. The similarity results are saved to a file so if you want to re-cluster the same input file, you do not need to wait to recompute the similarities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first option on the Cluster Compounds tab defines how the clusters will be sorted. The default is to sort by the 'minimizedAffinity' which is inserted into the output sdf file after minimization with 'smina' (An enhanced version of AutoDock Vina. Available at: smina.sf.net). You can also sort the clusters by any SD tag that exists in the input file, or by the Title (alphabetically) or by the size of the cluster.&lt;br /&gt;
&lt;br /&gt;
The second option is the height at which the hierarchical clustering tree is cut. The units are arbitrary, but a higher number leads to a small number of large clusters of less similar compounds, and lower cutoffs lead to more small clusters of more similar compounds. Play around with the cutoff until you get a clustering that you like. The third option is a check box for whether to group clusters with only one compound into one ‘singletons’ cluster. The forth option enables the show_contacts tool that is described below. There is also a field to enter a PyMOL selection string to compute the hydrogen bonds to. Finally, there is a button to create the clusters and load them into PyMOL.&lt;br /&gt;
&lt;br /&gt;
== Keyboard Controls ==&lt;br /&gt;
Once you have finished the similarity calculations and clustering mentioned above, you can navigate the Familiar to gamers, you can move through clusters using WASD, (W for up, S for down, A for left, D for right). &lt;br /&gt;
The one important caveat is that due to [[Set_Key#KEYS_WHICH_CAN_BE_REDEFINED|limitations]] in PyMOL, the WASD movement needs to be used with the Control (or Alt) key. Meaning (Ctrl-W moves up). It seems weird, but you quickly get used to it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Navigation Controls&lt;br /&gt;
&lt;br /&gt;
Ctrl-W – Move up a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-S – Move down a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-A – Move to the previous compound in a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-D – Move to the next compound in the cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-F -- Check for vendors&lt;br /&gt;
&lt;br /&gt;
If you acquired your compounds from ZINCPharmer (http://zincpharmer.csb.pitt.edu/) and/or your compounds have title that start with a ZINC ID (docking.zinc.org) or a MolPort ID (www.molport.com), you can hit 'Ctrl-F' to see if there are any vendors available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compound selection&lt;br /&gt;
&lt;br /&gt;
In addition to moving through the clusters, you can also extract compounds that you like for later viewing using the following controls.&lt;br /&gt;
&lt;br /&gt;
F1 – Print title of currently selected molecule&lt;br /&gt;
&lt;br /&gt;
F2 – Remove most recently added compound&lt;br /&gt;
&lt;br /&gt;
'''F3 – Add currently visible compound to list''' (Most commonly used)&lt;br /&gt;
&lt;br /&gt;
F4, F12 – Print List&lt;br /&gt;
&lt;br /&gt;
== show_contacts ==&lt;br /&gt;
show_contacts is a tool originally developed by Dr. David Koes for visualizing the hydrogen bond network between ligands and a protein receptor. show_contacts has been integrated into cluster_mols as a function and is executed automatically when clustering. It can also be run by itself, not in the context of cluster_mols. In the standalone case, the usage is as follows:&lt;br /&gt;
&lt;br /&gt;
	show_contacts(selection,selection2,result=&amp;quot;contacts&amp;quot;,cutoff=3.6, bigcutoff = 4.0):&lt;br /&gt;
&lt;br /&gt;
The arguments are as follows:&lt;br /&gt;
selection -- pymol selection string for the protein&lt;br /&gt;
selection2 -- pymol selection string for the ligands&lt;br /&gt;
results -- prefix of the object that the distances should be shown in. (Default &amp;quot;contacts&amp;quot;)&lt;br /&gt;
cutoff -- Distance cutoff for what is considered an ideal hydrogen bond.&lt;br /&gt;
bigcutoff -- Distance cutoff for a non-ideal hydrogen bond.&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
The output of show_contacts are a set of pymol distance objects. They are color-coded and size coded to indicate different interactions between the ligand and protein. They are controlled by the parameter indicated.&lt;br /&gt;
&lt;br /&gt;
# thin-purple lines -- all possible polar contacts (acc-acc, don-don, acc-don) -- bigcutoff&lt;br /&gt;
# thick-yellow lines -- All ideal hydrogen bonds -- cutoff&lt;br /&gt;
# thin-yellow lines -- Non ideal hydrogen bonds -- bigcutoff&lt;br /&gt;
# thick-red lines -- Polar clashes, i.e. Donor-Donor, Acceptor-Acceptor -- cutoff&lt;br /&gt;
&lt;br /&gt;
= Authors =&lt;br /&gt;
The main cluster_mols.py script was conceived of by Matthew P Baumgartner (mpb21 [at] pitt.edu) and Dr. David Koes while working in the lab of Dr. Carlos Camacho at the University of Pittsburgh. The cluster_mols.py script was implemented (and later rewritten) by MPB. The show_contacts functionality and the first version of the objectfocus.py keyboard controls was written by DK.&lt;br /&gt;
&lt;br /&gt;
Please send questions/comments/bug reports to mpb21 [at] pitt.edu.&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Mpb21</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Cluster_mols&amp;diff=12101</id>
		<title>Cluster mols</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Cluster_mols&amp;diff=12101"/>
		<updated>2014-07-24T19:05:51Z</updated>

		<summary type="html">&lt;p&gt;Mpb21: /* Keyboard Controls */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:cluster_mols_py_pymol.png|450px|right]]&lt;br /&gt;
cluster_mols is a PyMOL plugin that allows the user to quickly select compounds from a virtual screen to be purchased or synthesized.&lt;br /&gt;
&lt;br /&gt;
It helps the user by automatically clustering input compounds based on their molecular scaffolds and loading them into the PyMOL window.  cluster_mols also highlights both good and bad polar interactions between the ligands and a user specified receptor.  Additionally there are a number of keyboard controls for selecting and extracting compounds, as well as functionality for searching online to see if there are vendors for a selected compound.&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
The basic work flow of cluster_mols.py can be broken up into three parts.&lt;br /&gt;
# Computing a similarity matrix from the input compounds&lt;br /&gt;
# Performing hierarchical clustering on the results from 1)&lt;br /&gt;
# Cutting the tree at a user-specified height and creating and sorting clusters &lt;br /&gt;
&lt;br /&gt;
The results of 1 and 2 are saved to python pickle files so you do not have to recompute them in subsequent runs.&lt;br /&gt;
&lt;br /&gt;
In addition, it also highlights both good and bad polar contacts between the ligand and a user specified protein using the 'show_contacts' module described below.&lt;br /&gt;
&lt;br /&gt;
This script also integrates keyboard controls which allows for WASD movement through the clusters as well as keyboard shortcuts for pulling out compounds.&lt;br /&gt;
See below for usage.&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
The most up to date version (recommended) of cluster_mols is available through SourceForge at: https://sourceforge.net/projects/clustermolspy/&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
This plugin has a number of dependencies that are required. And it is currently only supported on Linux and OSX. &lt;br /&gt;
&lt;br /&gt;
Python packages (install using easy_install or pip)&lt;br /&gt;
# openbabel&lt;br /&gt;
# chemfp&lt;br /&gt;
# numpy&lt;br /&gt;
# scipy&lt;br /&gt;
# Tkinter&lt;br /&gt;
# fastcluster&lt;br /&gt;
# argparse (optional: for command line only)&lt;br /&gt;
&lt;br /&gt;
Command line tools (These must be accessible through your PATH environment variable):&lt;br /&gt;
# babel -- from openbabel.org&lt;br /&gt;
# sdsorter -- https://sourceforge.net/projects/sdsorter/&lt;br /&gt;
&lt;br /&gt;
Once you have the required dependencies, install it through PyMOL's Plugin menu.&lt;br /&gt;
&lt;br /&gt;
PyMOL &amp;gt; Plugin &amp;gt; Install Plugin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The GUI is relatively straightforward, if you follow it from top to bottom, and then then left to right through the tabs. &lt;br /&gt;
&lt;br /&gt;
The program requires that the input be a '.sdf' or '.sdf.gz' file. If your compounds are not in that format, use the 'babel' tool from OpenBabel to convert them.&lt;br /&gt;
&lt;br /&gt;
== GUI Options ==&lt;br /&gt;
[[File:cluster_mols_screen_1_desc.png|200px|thumb]]&lt;br /&gt;
[[File:cluster_mols_screen_2_desc.png|200px|thumb]]&lt;br /&gt;
&lt;br /&gt;
In the 'Compute Similarities' tab, there are options for selecting a new ligand and for specifying how many CPUs you want to run the similarity calculation on. Clicking the 'Compute Similarity' button will start the similarity calculations. If you check the 'Ignore saved results?' box it will ignore any saved intermediate results files. This could be useful if you change the contents of the original input file while keeping the file name the same.&lt;br /&gt;
&lt;br /&gt;
Depending on how many compounds there are, the similarity calculations may take between 1 and 10 minutes.  If you launched PyMOL from the command line, you will be able to see the progress printing out in the console. The similarity results are saved to a file so if you want to re-cluster the same input file, you do not need to wait to recompute the similarities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first option on the Cluster Compounds tab defines how the clusters will be sorted. The default is to sort by the 'minimizedAffinity' which is inserted into the output sdf file after minimization with 'smina' (An enhanced version of AutoDock Vina. Available at: smina.sf.net). You can also sort the clusters by any SD tag that exists in the input file, or by the Title (alphabetically) or by the size of the cluster.&lt;br /&gt;
&lt;br /&gt;
The second option is the height at which the hierarchical clustering tree is cut. The units are arbitrary, but a higher number leads to a small number of large clusters of less similar compounds, and lower cutoffs lead to more small clusters of more similar compounds. Play around with the cutoff until you get a clustering that you like. The third option is a check box for whether to group clusters with only one compound into one ‘singletons’ cluster. The forth option enables the show_contacts tool that is described below. There is also a field to enter a PyMOL selection string to compute the hydrogen bonds to. Finally, there is a button to create the clusters and load them into PyMOL.&lt;br /&gt;
&lt;br /&gt;
== Keyboard Controls ==&lt;br /&gt;
Once you have finished the similarity calculations and clustering mentioned above, you can navigate the Familiar to gamers, you can move through clusters using WASD, (W for up, S for down, A for left, D for right). &lt;br /&gt;
The one important caveat is that due to [[Set_Key#KEYS_WHICH_CAN_BE_REDEFINED|limitations]] in PyMOL, the WASD movement needs to be used with the Control (or Alt) key. Meaning (Ctrl-W moves up). It seems weird, but you quickly get used to it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Navigation Controls&lt;br /&gt;
&lt;br /&gt;
Ctrl-W – Move up a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-S – Move down a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-A – Move to the previous compound in a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-D – Move to the next compound in the cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-F -- Check for vendors&lt;br /&gt;
&lt;br /&gt;
If you acquired your compounds from ZINCPharmer (http://zincpharmer.csb.pitt.edu/) and/or your compounds have title that start with a ZINC ID (docking.zinc.org) or a MolPort ID (www.molport.com), you can hit 'Ctrl-F' to see if there are any vendors available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compound selection&lt;br /&gt;
&lt;br /&gt;
In addition to moving through the clusters, you can also extract compounds that you like for later viewing using the following controls.&lt;br /&gt;
&lt;br /&gt;
F1 – Print title of currently selected molecule&lt;br /&gt;
&lt;br /&gt;
F2 – Remove most recently added compound&lt;br /&gt;
&lt;br /&gt;
'''F3 – Add currently visible compound to list''' (Most commonly used)&lt;br /&gt;
&lt;br /&gt;
F4, F12 – Print List&lt;br /&gt;
&lt;br /&gt;
== show_contacts ==&lt;br /&gt;
show_contacts is a tool originally developed by Dr. David Koes for visualizing the hydrogen bond network between ligands and a protein receptor. show_contacts is integrated into cluster_mols as a function and is executed automatically . It can be run by itself, not in the context of cluster_mols. In the standalone case, the usage is as follows:&lt;br /&gt;
&lt;br /&gt;
	show_contacts(selection,selection2,result=&amp;quot;contacts&amp;quot;,cutoff=3.6, bigcutoff = 4.0):&lt;br /&gt;
&lt;br /&gt;
The arguments are as follows:&lt;br /&gt;
selection -- pymol selection string for the protein&lt;br /&gt;
selection2 -- pymol selection string for the ligands&lt;br /&gt;
results -- prefix of the object that the distances should be shown in. (Default &amp;quot;contacts&amp;quot;)&lt;br /&gt;
cutoff -- Distance cutoff for what is considered an ideal hydrogen bond.&lt;br /&gt;
bigcutoff -- Distance cutoff for a non-ideal hydrogen bond.&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
The output of show_contacts are a set of pymol distance objects. They are color-coded and size coded to indicate different interactions between the ligand and protein. They are controlled by the parameter indicated.&lt;br /&gt;
&lt;br /&gt;
# thin-purple lines -- all possible polar contacts (acc-acc, don-don, acc-don) -- bigcutoff&lt;br /&gt;
# thick-yellow lines -- All ideal hydrogen bonds -- cutoff&lt;br /&gt;
# thin-yellow lines -- Non ideal hydrogen bonds -- bigcutoff&lt;br /&gt;
# thick-red lines -- Polar clashes, i.e. Donor-Donor, Acceptor-Acceptor -- cutoff&lt;br /&gt;
&lt;br /&gt;
= Authors =&lt;br /&gt;
The main cluster_mols.py script was conceived of by Matthew P Baumgartner (mpb21 [at] pitt.edu) and Dr. David Koes while working in the lab of Dr. Carlos Camacho at the University of Pittsburgh. The cluster_mols.py script was implemented (and later rewritten) by MPB. The show_contacts functionality and the first version of the objectfocus.py keyboard controls was written by DK.&lt;br /&gt;
&lt;br /&gt;
Please send questions/comments/bug reports to mpb21 [at] pitt.edu.&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Mpb21</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Cluster_mols&amp;diff=12100</id>
		<title>Cluster mols</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Cluster_mols&amp;diff=12100"/>
		<updated>2014-07-24T19:04:48Z</updated>

		<summary type="html">&lt;p&gt;Mpb21: /* Keyboard Controls */  added link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:cluster_mols_py_pymol.png|450px|right]]&lt;br /&gt;
cluster_mols is a PyMOL plugin that allows the user to quickly select compounds from a virtual screen to be purchased or synthesized.&lt;br /&gt;
&lt;br /&gt;
It helps the user by automatically clustering input compounds based on their molecular scaffolds and loading them into the PyMOL window.  cluster_mols also highlights both good and bad polar interactions between the ligands and a user specified receptor.  Additionally there are a number of keyboard controls for selecting and extracting compounds, as well as functionality for searching online to see if there are vendors for a selected compound.&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
The basic work flow of cluster_mols.py can be broken up into three parts.&lt;br /&gt;
# Computing a similarity matrix from the input compounds&lt;br /&gt;
# Performing hierarchical clustering on the results from 1)&lt;br /&gt;
# Cutting the tree at a user-specified height and creating and sorting clusters &lt;br /&gt;
&lt;br /&gt;
The results of 1 and 2 are saved to python pickle files so you do not have to recompute them in subsequent runs.&lt;br /&gt;
&lt;br /&gt;
In addition, it also highlights both good and bad polar contacts between the ligand and a user specified protein using the 'show_contacts' module described below.&lt;br /&gt;
&lt;br /&gt;
This script also integrates keyboard controls which allows for WASD movement through the clusters as well as keyboard shortcuts for pulling out compounds.&lt;br /&gt;
See below for usage.&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
The most up to date version (recommended) of cluster_mols is available through SourceForge at: https://sourceforge.net/projects/clustermolspy/&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
This plugin has a number of dependencies that are required. And it is currently only supported on Linux and OSX. &lt;br /&gt;
&lt;br /&gt;
Python packages (install using easy_install or pip)&lt;br /&gt;
# openbabel&lt;br /&gt;
# chemfp&lt;br /&gt;
# numpy&lt;br /&gt;
# scipy&lt;br /&gt;
# Tkinter&lt;br /&gt;
# fastcluster&lt;br /&gt;
# argparse (optional: for command line only)&lt;br /&gt;
&lt;br /&gt;
Command line tools (These must be accessible through your PATH environment variable):&lt;br /&gt;
# babel -- from openbabel.org&lt;br /&gt;
# sdsorter -- https://sourceforge.net/projects/sdsorter/&lt;br /&gt;
&lt;br /&gt;
Once you have the required dependencies, install it through PyMOL's Plugin menu.&lt;br /&gt;
&lt;br /&gt;
PyMOL &amp;gt; Plugin &amp;gt; Install Plugin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The GUI is relatively straightforward, if you follow it from top to bottom, and then then left to right through the tabs. &lt;br /&gt;
&lt;br /&gt;
The program requires that the input be a '.sdf' or '.sdf.gz' file. If your compounds are not in that format, use the 'babel' tool from OpenBabel to convert them.&lt;br /&gt;
&lt;br /&gt;
== GUI Options ==&lt;br /&gt;
[[File:cluster_mols_screen_1_desc.png|200px|thumb]]&lt;br /&gt;
[[File:cluster_mols_screen_2_desc.png|200px|thumb]]&lt;br /&gt;
&lt;br /&gt;
In the 'Compute Similarities' tab, there are options for selecting a new ligand and for specifying how many CPUs you want to run the similarity calculation on. Clicking the 'Compute Similarity' button will start the similarity calculations. If you check the 'Ignore saved results?' box it will ignore any saved intermediate results files. This could be useful if you change the contents of the original input file while keeping the file name the same.&lt;br /&gt;
&lt;br /&gt;
Depending on how many compounds there are, the similarity calculations may take between 1 and 10 minutes.  If you launched PyMOL from the command line, you will be able to see the progress printing out in the console. The similarity results are saved to a file so if you want to re-cluster the same input file, you do not need to wait to recompute the similarities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first option on the Cluster Compounds tab defines how the clusters will be sorted. The default is to sort by the 'minimizedAffinity' which is inserted into the output sdf file after minimization with 'smina' (An enhanced version of AutoDock Vina. Available at: smina.sf.net). You can also sort the clusters by any SD tag that exists in the input file, or by the Title (alphabetically) or by the size of the cluster.&lt;br /&gt;
&lt;br /&gt;
The second option is the height at which the hierarchical clustering tree is cut. The units are arbitrary, but a higher number leads to a small number of large clusters of less similar compounds, and lower cutoffs lead to more small clusters of more similar compounds. Play around with the cutoff until you get a clustering that you like. The third option is a check box for whether to group clusters with only one compound into one ‘singletons’ cluster. The forth option enables the show_contacts tool that is described below. There is also a field to enter a PyMOL selection string to compute the hydrogen bonds to. Finally, there is a button to create the clusters and load them into PyMOL.&lt;br /&gt;
&lt;br /&gt;
== Keyboard Controls ==&lt;br /&gt;
Once you have finished the similarity calculations and clustering mentioned above, you can navigate the Familiar to gamers, you can move through clusters using WASD, (W for up, S for down, A for left, D for right). &lt;br /&gt;
The one important caveat is that due to [[Set_Key#KEYS_WHICH_CAN_BE_REDEFINED|limitations]] in PyMOL, the WASD movement needs to be used with the Control (or Alt) key. Meaning (Ctrl-W moves up). It seems weird, but you quickly get used to it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Navigation Controls&lt;br /&gt;
&lt;br /&gt;
Ctrl-W – Move up a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-S – Move down a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-A – Move to the previous compound in a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-D – Move to the next compound in the cluster&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compound selection&lt;br /&gt;
&lt;br /&gt;
In addition to moving through the clusters, you can also extract compounds that you like for later viewing using the following controls.&lt;br /&gt;
&lt;br /&gt;
F1 – Print title of currently selected molecule&lt;br /&gt;
&lt;br /&gt;
F2 – Remove most recently added compound&lt;br /&gt;
&lt;br /&gt;
'''F3 – Add currently visible compound to list''' (Most commonly used)&lt;br /&gt;
&lt;br /&gt;
F4, F12 – Print List&lt;br /&gt;
&lt;br /&gt;
Ctrl-F -- Check for vendors&lt;br /&gt;
&lt;br /&gt;
[Check for available vendors (ZINC)]&lt;br /&gt;
If you acquired your compounds from ZINCPharmer (http://zincpharmer.csb.pitt.edu/) and/or your compounds have title that start with a ZINC ID (docking.zinc.org) or a MolPort ID (www.molport.com), you can hit 'Ctrl-F' to see if there are any vendors listed on the ZINC website.&lt;br /&gt;
&lt;br /&gt;
== show_contacts ==&lt;br /&gt;
show_contacts is a tool originally developed by Dr. David Koes for visualizing the hydrogen bond network between ligands and a protein receptor. show_contacts is integrated into cluster_mols as a function and is executed automatically . It can be run by itself, not in the context of cluster_mols. In the standalone case, the usage is as follows:&lt;br /&gt;
&lt;br /&gt;
	show_contacts(selection,selection2,result=&amp;quot;contacts&amp;quot;,cutoff=3.6, bigcutoff = 4.0):&lt;br /&gt;
&lt;br /&gt;
The arguments are as follows:&lt;br /&gt;
selection -- pymol selection string for the protein&lt;br /&gt;
selection2 -- pymol selection string for the ligands&lt;br /&gt;
results -- prefix of the object that the distances should be shown in. (Default &amp;quot;contacts&amp;quot;)&lt;br /&gt;
cutoff -- Distance cutoff for what is considered an ideal hydrogen bond.&lt;br /&gt;
bigcutoff -- Distance cutoff for a non-ideal hydrogen bond.&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
The output of show_contacts are a set of pymol distance objects. They are color-coded and size coded to indicate different interactions between the ligand and protein. They are controlled by the parameter indicated.&lt;br /&gt;
&lt;br /&gt;
# thin-purple lines -- all possible polar contacts (acc-acc, don-don, acc-don) -- bigcutoff&lt;br /&gt;
# thick-yellow lines -- All ideal hydrogen bonds -- cutoff&lt;br /&gt;
# thin-yellow lines -- Non ideal hydrogen bonds -- bigcutoff&lt;br /&gt;
# thick-red lines -- Polar clashes, i.e. Donor-Donor, Acceptor-Acceptor -- cutoff&lt;br /&gt;
&lt;br /&gt;
= Authors =&lt;br /&gt;
The main cluster_mols.py script was conceived of by Matthew P Baumgartner (mpb21 [at] pitt.edu) and Dr. David Koes while working in the lab of Dr. Carlos Camacho at the University of Pittsburgh. The cluster_mols.py script was implemented (and later rewritten) by MPB. The show_contacts functionality and the first version of the objectfocus.py keyboard controls was written by DK.&lt;br /&gt;
&lt;br /&gt;
Please send questions/comments/bug reports to mpb21 [at] pitt.edu.&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Mpb21</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Cluster_mols&amp;diff=12099</id>
		<title>Cluster mols</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Cluster_mols&amp;diff=12099"/>
		<updated>2014-07-24T18:50:20Z</updated>

		<summary type="html">&lt;p&gt;Mpb21: moved up a section heading&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:cluster_mols_py_pymol.png|450px|right]]&lt;br /&gt;
cluster_mols is a PyMOL plugin that allows the user to quickly select compounds from a virtual screen to be purchased or synthesized.&lt;br /&gt;
&lt;br /&gt;
It helps the user by automatically clustering input compounds based on their molecular scaffolds and loading them into the PyMOL window.  cluster_mols also highlights both good and bad polar interactions between the ligands and a user specified receptor.  Additionally there are a number of keyboard controls for selecting and extracting compounds, as well as functionality for searching online to see if there are vendors for a selected compound.&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
The basic work flow of cluster_mols.py can be broken up into three parts.&lt;br /&gt;
# Computing a similarity matrix from the input compounds&lt;br /&gt;
# Performing hierarchical clustering on the results from 1)&lt;br /&gt;
# Cutting the tree at a user-specified height and creating and sorting clusters &lt;br /&gt;
&lt;br /&gt;
The results of 1 and 2 are saved to python pickle files so you do not have to recompute them in subsequent runs.&lt;br /&gt;
&lt;br /&gt;
In addition, it also highlights both good and bad polar contacts between the ligand and a user specified protein using the 'show_contacts' module described below.&lt;br /&gt;
&lt;br /&gt;
This script also integrates keyboard controls which allows for WASD movement through the clusters as well as keyboard shortcuts for pulling out compounds.&lt;br /&gt;
See below for usage.&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
The most up to date version (recommended) of cluster_mols is available through SourceForge at: https://sourceforge.net/projects/clustermolspy/&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
This plugin has a number of dependencies that are required. And it is currently only supported on Linux and OSX. &lt;br /&gt;
&lt;br /&gt;
Python packages (install using easy_install or pip)&lt;br /&gt;
# openbabel&lt;br /&gt;
# chemfp&lt;br /&gt;
# numpy&lt;br /&gt;
# scipy&lt;br /&gt;
# Tkinter&lt;br /&gt;
# fastcluster&lt;br /&gt;
# argparse (optional: for command line only)&lt;br /&gt;
&lt;br /&gt;
Command line tools (These must be accessible through your PATH environment variable):&lt;br /&gt;
# babel -- from openbabel.org&lt;br /&gt;
# sdsorter -- https://sourceforge.net/projects/sdsorter/&lt;br /&gt;
&lt;br /&gt;
Once you have the required dependencies, install it through PyMOL's Plugin menu.&lt;br /&gt;
&lt;br /&gt;
PyMOL &amp;gt; Plugin &amp;gt; Install Plugin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The GUI is relatively straightforward, if you follow it from top to bottom, and then then left to right through the tabs. &lt;br /&gt;
&lt;br /&gt;
The program requires that the input be a '.sdf' or '.sdf.gz' file. If your compounds are not in that format, use the 'babel' tool from OpenBabel to convert them.&lt;br /&gt;
&lt;br /&gt;
== GUI Options ==&lt;br /&gt;
[[File:cluster_mols_screen_1_desc.png|200px|thumb]]&lt;br /&gt;
[[File:cluster_mols_screen_2_desc.png|200px|thumb]]&lt;br /&gt;
&lt;br /&gt;
In the 'Compute Similarities' tab, there are options for selecting a new ligand and for specifying how many CPUs you want to run the similarity calculation on. Clicking the 'Compute Similarity' button will start the similarity calculations. If you check the 'Ignore saved results?' box it will ignore any saved intermediate results files. This could be useful if you change the contents of the original input file while keeping the file name the same.&lt;br /&gt;
&lt;br /&gt;
Depending on how many compounds there are, the similarity calculations may take between 1 and 10 minutes.  If you launched PyMOL from the command line, you will be able to see the progress printing out in the console. The similarity results are saved to a file so if you want to re-cluster the same input file, you do not need to wait to recompute the similarities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first option on the Cluster Compounds tab defines how the clusters will be sorted. The default is to sort by the 'minimizedAffinity' which is inserted into the output sdf file after minimization with 'smina' (An enhanced version of AutoDock Vina. Available at: smina.sf.net). You can also sort the clusters by any SD tag that exists in the input file, or by the Title (alphabetically) or by the size of the cluster.&lt;br /&gt;
&lt;br /&gt;
The second option is the height at which the hierarchical clustering tree is cut. The units are arbitrary, but a higher number leads to a small number of large clusters of less similar compounds, and lower cutoffs lead to more small clusters of more similar compounds. Play around with the cutoff until you get a clustering that you like. The third option is a check box for whether to group clusters with only one compound into one ‘singletons’ cluster. The forth option enables the show_contacts tool that is described below. There is also a field to enter a PyMOL selection string to compute the hydrogen bonds to. Finally, there is a button to create the clusters and load them into PyMOL.&lt;br /&gt;
&lt;br /&gt;
== Keyboard Controls ==&lt;br /&gt;
Once you have finished the similarity calculations and clustering mentioned above, you can navigate the Familiar to gamers, you can move through clusters using WASD, (W for up, S for down, A for left, D for right). &lt;br /&gt;
The one important caveat is that due to limitations in PyMOL, the WASD movement needs to be used with the Control (or Alt) key. Meaning (Ctrl-W moves up). It seems weird, but you quickly get used to it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Navigation Controls&lt;br /&gt;
&lt;br /&gt;
Ctrl-W – Move up a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-S – Move down a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-A – Move to the previous compound in a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-D – Move to the next compound in the cluster&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compound selection&lt;br /&gt;
&lt;br /&gt;
In addition to moving through the clusters, you can also extract compounds that you like for later viewing using the following controls.&lt;br /&gt;
&lt;br /&gt;
F1 – Print title of currently selected molecule&lt;br /&gt;
&lt;br /&gt;
F2 – Remove most recently added compound&lt;br /&gt;
&lt;br /&gt;
'''F3 – Add currently visible compound to list''' (Most commonly used)&lt;br /&gt;
&lt;br /&gt;
F4, F12 – Print List&lt;br /&gt;
&lt;br /&gt;
Ctrl-F -- Check for vendors&lt;br /&gt;
&lt;br /&gt;
[Check for available vendors (ZINC)]&lt;br /&gt;
If you acquired your compounds from ZINCPharmer (http://zincpharmer.csb.pitt.edu/) and/or your compounds have title that start with a ZINC ID (docking.zinc.org) or a MolPort ID (www.molport.com), you can hit 'Ctrl-F' to see if there are any vendors listed on the ZINC website.&lt;br /&gt;
&lt;br /&gt;
== show_contacts ==&lt;br /&gt;
show_contacts is a tool originally developed by Dr. David Koes for visualizing the hydrogen bond network between ligands and a protein receptor. show_contacts is integrated into cluster_mols as a function and is executed automatically . It can be run by itself, not in the context of cluster_mols. In the standalone case, the usage is as follows:&lt;br /&gt;
&lt;br /&gt;
	show_contacts(selection,selection2,result=&amp;quot;contacts&amp;quot;,cutoff=3.6, bigcutoff = 4.0):&lt;br /&gt;
&lt;br /&gt;
The arguments are as follows:&lt;br /&gt;
selection -- pymol selection string for the protein&lt;br /&gt;
selection2 -- pymol selection string for the ligands&lt;br /&gt;
results -- prefix of the object that the distances should be shown in. (Default &amp;quot;contacts&amp;quot;)&lt;br /&gt;
cutoff -- Distance cutoff for what is considered an ideal hydrogen bond.&lt;br /&gt;
bigcutoff -- Distance cutoff for a non-ideal hydrogen bond.&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
The output of show_contacts are a set of pymol distance objects. They are color-coded and size coded to indicate different interactions between the ligand and protein. They are controlled by the parameter indicated.&lt;br /&gt;
&lt;br /&gt;
# thin-purple lines -- all possible polar contacts (acc-acc, don-don, acc-don) -- bigcutoff&lt;br /&gt;
# thick-yellow lines -- All ideal hydrogen bonds -- cutoff&lt;br /&gt;
# thin-yellow lines -- Non ideal hydrogen bonds -- bigcutoff&lt;br /&gt;
# thick-red lines -- Polar clashes, i.e. Donor-Donor, Acceptor-Acceptor -- cutoff&lt;br /&gt;
&lt;br /&gt;
= Authors =&lt;br /&gt;
The main cluster_mols.py script was conceived of by Matthew P Baumgartner (mpb21 [at] pitt.edu) and Dr. David Koes while working in the lab of Dr. Carlos Camacho at the University of Pittsburgh. The cluster_mols.py script was implemented (and later rewritten) by MPB. The show_contacts functionality and the first version of the objectfocus.py keyboard controls was written by DK.&lt;br /&gt;
&lt;br /&gt;
Please send questions/comments/bug reports to mpb21 [at] pitt.edu.&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Mpb21</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Cluster_mols&amp;diff=12098</id>
		<title>Cluster mols</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Cluster_mols&amp;diff=12098"/>
		<updated>2014-07-24T18:49:18Z</updated>

		<summary type="html">&lt;p&gt;Mpb21: /* GUI Options */  cleaned up the language a bit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:cluster_mols_py_pymol.png|450px|right]]&lt;br /&gt;
cluster_mols is a PyMOL plugin that allows the user to quickly select compounds from a virtual screen to be purchased or synthesized.&lt;br /&gt;
&lt;br /&gt;
It helps the user by automatically clustering input compounds based on their molecular scaffolds and loading them into the PyMOL window.  cluster_mols also highlights both good and bad polar interactions between the ligands and a user specified receptor.  Additionally there are a number of keyboard controls for selecting and extracting compounds, as well as functionality for searching online to see if there are vendors for a selected compound.&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
The basic work flow of cluster_mols.py can be broken up into three parts.&lt;br /&gt;
# Computing a similarity matrix from the input compounds&lt;br /&gt;
# Performing hierarchical clustering on the results from 1)&lt;br /&gt;
# Cutting the tree at a user-specified height and creating and sorting clusters &lt;br /&gt;
&lt;br /&gt;
The results of 1 and 2 are saved to python pickle files so you do not have to recompute them in subsequent runs.&lt;br /&gt;
&lt;br /&gt;
In addition, it also highlights both good and bad polar contacts between the ligand and a user specified protein using the 'show_contacts' module described below.&lt;br /&gt;
&lt;br /&gt;
This script also integrates keyboard controls which allows for WASD movement through the clusters as well as keyboard shortcuts for pulling out compounds.&lt;br /&gt;
See below for usage.&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
The most up to date version (recommended) of cluster_mols is available through SourceForge at: https://sourceforge.net/projects/clustermolspy/&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
This plugin has a number of dependencies that are required. And it is currently only supported on Linux and OSX. &lt;br /&gt;
&lt;br /&gt;
Python packages (install using easy_install or pip)&lt;br /&gt;
# openbabel&lt;br /&gt;
# chemfp&lt;br /&gt;
# numpy&lt;br /&gt;
# scipy&lt;br /&gt;
# Tkinter&lt;br /&gt;
# fastcluster&lt;br /&gt;
# argparse (optional: for command line only)&lt;br /&gt;
&lt;br /&gt;
Command line tools (These must be accessible through your PATH environment variable):&lt;br /&gt;
# babel -- from openbabel.org&lt;br /&gt;
# sdsorter -- https://sourceforge.net/projects/sdsorter/&lt;br /&gt;
&lt;br /&gt;
Once you have the required dependencies, install it through PyMOL's Plugin menu.&lt;br /&gt;
&lt;br /&gt;
PyMOL &amp;gt; Plugin &amp;gt; Install Plugin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The GUI is relatively straightforward, if you follow it from top to bottom, and then then left to right through the tabs. &lt;br /&gt;
&lt;br /&gt;
The program requires that the input be a '.sdf' or '.sdf.gz' file. If your compounds are not in that format, use the 'babel' tool from OpenBabel to convert them.&lt;br /&gt;
&lt;br /&gt;
In the 'Compute Similarities' tab, there are options for selecting a new ligand and for specifying how many CPUs you want to run the similarity calculation on. Clicking the 'Compute Similarity' button will start the similarity calculations. If you check the 'Ignore saved results?' box it will ignore any saved intermediate results files. This could be useful if you change the contents of the original input file while keeping the file name the same.&lt;br /&gt;
&lt;br /&gt;
Depending on how many compounds there are, the similarity calculations may take between 1 and 10 minutes.  If you launched PyMOL from the command line, you will be able to see the progress printing out in the console. The similarity results are saved to a file so if you want to re-cluster the same input file, you do not need to wait to recompute the similarities.&lt;br /&gt;
&lt;br /&gt;
== GUI Options ==&lt;br /&gt;
[[File:cluster_mols_screen_1_desc.png|200px|thumb]]&lt;br /&gt;
[[File:cluster_mols_screen_2_desc.png|200px|thumb]]&lt;br /&gt;
The first option on the Cluster Compounds tab defines how the clusters will be sorted. The default is to sort by the 'minimizedAffinity' which is inserted into the output sdf file after minimization with 'smina' (An enhanced version of AutoDock Vina. Available at: smina.sf.net). You can also sort the clusters by any SD tag that exists in the input file, or by the Title (alphabetically) or by the size of the cluster.&lt;br /&gt;
&lt;br /&gt;
The second option is the height at which the hierarchical clustering tree is cut. The units are arbitrary, but a higher number leads to a small number of large clusters of less similar compounds, and lower cutoffs lead to more small clusters of more similar compounds. Play around with the cutoff until you get a clustering that you like. The third option is a check box for whether to group clusters with only one compound into one ‘singletons’ cluster. The forth option enables the show_contacts tool that is described below. There is also a field to enter a PyMOL selection string to compute the hydrogen bonds to. Finally, there is a button to create the clusters and load them into PyMOL.&lt;br /&gt;
&lt;br /&gt;
== Keyboard Controls ==&lt;br /&gt;
Once you have finished the similarity calculations and clustering mentioned above, you can navigate the Familiar to gamers, you can move through clusters using WASD, (W for up, S for down, A for left, D for right). &lt;br /&gt;
The one important caveat is that due to limitations in PyMOL, the WASD movement needs to be used with the Control (or Alt) key. Meaning (Ctrl-W moves up). It seems weird, but you quickly get used to it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Navigation Controls&lt;br /&gt;
&lt;br /&gt;
Ctrl-W – Move up a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-S – Move down a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-A – Move to the previous compound in a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-D – Move to the next compound in the cluster&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compound selection&lt;br /&gt;
&lt;br /&gt;
In addition to moving through the clusters, you can also extract compounds that you like for later viewing using the following controls.&lt;br /&gt;
&lt;br /&gt;
F1 – Print title of currently selected molecule&lt;br /&gt;
&lt;br /&gt;
F2 – Remove most recently added compound&lt;br /&gt;
&lt;br /&gt;
'''F3 – Add currently visible compound to list''' (Most commonly used)&lt;br /&gt;
&lt;br /&gt;
F4, F12 – Print List&lt;br /&gt;
&lt;br /&gt;
Ctrl-F -- Check for vendors&lt;br /&gt;
&lt;br /&gt;
[Check for available vendors (ZINC)]&lt;br /&gt;
If you acquired your compounds from ZINCPharmer (http://zincpharmer.csb.pitt.edu/) and/or your compounds have title that start with a ZINC ID (docking.zinc.org) or a MolPort ID (www.molport.com), you can hit 'Ctrl-F' to see if there are any vendors listed on the ZINC website.&lt;br /&gt;
&lt;br /&gt;
== show_contacts ==&lt;br /&gt;
show_contacts is a tool originally developed by Dr. David Koes for visualizing the hydrogen bond network between ligands and a protein receptor. show_contacts is integrated into cluster_mols as a function and is executed automatically . It can be run by itself, not in the context of cluster_mols. In the standalone case, the usage is as follows:&lt;br /&gt;
&lt;br /&gt;
	show_contacts(selection,selection2,result=&amp;quot;contacts&amp;quot;,cutoff=3.6, bigcutoff = 4.0):&lt;br /&gt;
&lt;br /&gt;
The arguments are as follows:&lt;br /&gt;
selection -- pymol selection string for the protein&lt;br /&gt;
selection2 -- pymol selection string for the ligands&lt;br /&gt;
results -- prefix of the object that the distances should be shown in. (Default &amp;quot;contacts&amp;quot;)&lt;br /&gt;
cutoff -- Distance cutoff for what is considered an ideal hydrogen bond.&lt;br /&gt;
bigcutoff -- Distance cutoff for a non-ideal hydrogen bond.&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
The output of show_contacts are a set of pymol distance objects. They are color-coded and size coded to indicate different interactions between the ligand and protein. They are controlled by the parameter indicated.&lt;br /&gt;
&lt;br /&gt;
# thin-purple lines -- all possible polar contacts (acc-acc, don-don, acc-don) -- bigcutoff&lt;br /&gt;
# thick-yellow lines -- All ideal hydrogen bonds -- cutoff&lt;br /&gt;
# thin-yellow lines -- Non ideal hydrogen bonds -- bigcutoff&lt;br /&gt;
# thick-red lines -- Polar clashes, i.e. Donor-Donor, Acceptor-Acceptor -- cutoff&lt;br /&gt;
&lt;br /&gt;
= Authors =&lt;br /&gt;
The main cluster_mols.py script was conceived of by Matthew P Baumgartner (mpb21 [at] pitt.edu) and Dr. David Koes while working in the lab of Dr. Carlos Camacho at the University of Pittsburgh. The cluster_mols.py script was implemented (and later rewritten) by MPB. The show_contacts functionality and the first version of the objectfocus.py keyboard controls was written by DK.&lt;br /&gt;
&lt;br /&gt;
Please send questions/comments/bug reports to mpb21 [at] pitt.edu.&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Mpb21</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Cluster_mols&amp;diff=12097</id>
		<title>Cluster mols</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Cluster_mols&amp;diff=12097"/>
		<updated>2014-07-24T18:45:01Z</updated>

		<summary type="html">&lt;p&gt;Mpb21: /* Usage */  removed abbreviation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:cluster_mols_py_pymol.png|450px|right]]&lt;br /&gt;
cluster_mols is a PyMOL plugin that allows the user to quickly select compounds from a virtual screen to be purchased or synthesized.&lt;br /&gt;
&lt;br /&gt;
It helps the user by automatically clustering input compounds based on their molecular scaffolds and loading them into the PyMOL window.  cluster_mols also highlights both good and bad polar interactions between the ligands and a user specified receptor.  Additionally there are a number of keyboard controls for selecting and extracting compounds, as well as functionality for searching online to see if there are vendors for a selected compound.&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
The basic work flow of cluster_mols.py can be broken up into three parts.&lt;br /&gt;
# Computing a similarity matrix from the input compounds&lt;br /&gt;
# Performing hierarchical clustering on the results from 1)&lt;br /&gt;
# Cutting the tree at a user-specified height and creating and sorting clusters &lt;br /&gt;
&lt;br /&gt;
The results of 1 and 2 are saved to python pickle files so you do not have to recompute them in subsequent runs.&lt;br /&gt;
&lt;br /&gt;
In addition, it also highlights both good and bad polar contacts between the ligand and a user specified protein using the 'show_contacts' module described below.&lt;br /&gt;
&lt;br /&gt;
This script also integrates keyboard controls which allows for WASD movement through the clusters as well as keyboard shortcuts for pulling out compounds.&lt;br /&gt;
See below for usage.&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
The most up to date version (recommended) of cluster_mols is available through SourceForge at: https://sourceforge.net/projects/clustermolspy/&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
This plugin has a number of dependencies that are required. And it is currently only supported on Linux and OSX. &lt;br /&gt;
&lt;br /&gt;
Python packages (install using easy_install or pip)&lt;br /&gt;
# openbabel&lt;br /&gt;
# chemfp&lt;br /&gt;
# numpy&lt;br /&gt;
# scipy&lt;br /&gt;
# Tkinter&lt;br /&gt;
# fastcluster&lt;br /&gt;
# argparse (optional: for command line only)&lt;br /&gt;
&lt;br /&gt;
Command line tools (These must be accessible through your PATH environment variable):&lt;br /&gt;
# babel -- from openbabel.org&lt;br /&gt;
# sdsorter -- https://sourceforge.net/projects/sdsorter/&lt;br /&gt;
&lt;br /&gt;
Once you have the required dependencies, install it through PyMOL's Plugin menu.&lt;br /&gt;
&lt;br /&gt;
PyMOL &amp;gt; Plugin &amp;gt; Install Plugin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The GUI is relatively straightforward, if you follow it from top to bottom, and then then left to right through the tabs. &lt;br /&gt;
&lt;br /&gt;
The program requires that the input be a '.sdf' or '.sdf.gz' file. If your compounds are not in that format, use the 'babel' tool from OpenBabel to convert them.&lt;br /&gt;
&lt;br /&gt;
In the 'Compute Similarities' tab, there are options for selecting a new ligand and for specifying how many CPUs you want to run the similarity calculation on. Clicking the 'Compute Similarity' button will start the similarity calculations. If you check the 'Ignore saved results?' box it will ignore any saved intermediate results files. This could be useful if you change the contents of the original input file while keeping the file name the same.&lt;br /&gt;
&lt;br /&gt;
Depending on how many compounds there are, the similarity calculations may take between 1 and 10 minutes.  If you launched PyMOL from the command line, you will be able to see the progress printing out in the console. The similarity results are saved to a file so if you want to re-cluster the same input file, you do not need to wait to recompute the similarities.&lt;br /&gt;
&lt;br /&gt;
== GUI Options ==&lt;br /&gt;
[[File:cluster_mols_screen_1_desc.png|200px|thumb]]&lt;br /&gt;
[[File:cluster_mols_screen_2_desc.png|200px|thumb]]&lt;br /&gt;
The first option on the Cluster Compounds tab defines how the clusters will be sorted. The default is to sort by the 'minimizedAffinity' which is inserted into the output sdf file after minimization with 'smina' (smina.sf.net). You can also sort the clusters by any SD tag that exists in the input file they have including the Title or the size of the cluster.&lt;br /&gt;
&lt;br /&gt;
The second option is the height at which the hierarchical clustering tree is cut. The units are arbitrary, but a higher number leads to a small number of large clusters of less similar compounds, and lower cutoffs lead to more small clusters of more similar compounds. The third option is a check box for whether to group clusters with only one compound in them into one ‘singletons’ cluster. The forth option enables the show_contacts tool that is described in the next section. There is also a field to enter the name of a PyMOL object to compute the hydrogen bonds to, it accepts PyMOL selection strings. Finally, there is a button to create the clusters and load them into PyMOL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Keyboard Controls ==&lt;br /&gt;
Once you have finished the similarity calculations and clustering mentioned above, you can navigate the Familiar to gamers, you can move through clusters using WASD, (W for up, S for down, A for left, D for right). &lt;br /&gt;
The one important caveat is that due to limitations in PyMOL, the WASD movement needs to be used with the Control (or Alt) key. Meaning (Ctrl-W moves up). It seems weird, but you quickly get used to it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Navigation Controls&lt;br /&gt;
&lt;br /&gt;
Ctrl-W – Move up a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-S – Move down a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-A – Move to the previous compound in a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-D – Move to the next compound in the cluster&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compound selection&lt;br /&gt;
&lt;br /&gt;
In addition to moving through the clusters, you can also extract compounds that you like for later viewing using the following controls.&lt;br /&gt;
&lt;br /&gt;
F1 – Print title of currently selected molecule&lt;br /&gt;
&lt;br /&gt;
F2 – Remove most recently added compound&lt;br /&gt;
&lt;br /&gt;
'''F3 – Add currently visible compound to list''' (Most commonly used)&lt;br /&gt;
&lt;br /&gt;
F4, F12 – Print List&lt;br /&gt;
&lt;br /&gt;
Ctrl-F -- Check for vendors&lt;br /&gt;
&lt;br /&gt;
[Check for available vendors (ZINC)]&lt;br /&gt;
If you acquired your compounds from ZINCPharmer (http://zincpharmer.csb.pitt.edu/) and/or your compounds have title that start with a ZINC ID (docking.zinc.org) or a MolPort ID (www.molport.com), you can hit 'Ctrl-F' to see if there are any vendors listed on the ZINC website.&lt;br /&gt;
&lt;br /&gt;
== show_contacts ==&lt;br /&gt;
show_contacts is a tool originally developed by Dr. David Koes for visualizing the hydrogen bond network between ligands and a protein receptor. show_contacts is integrated into cluster_mols as a function and is executed automatically . It can be run by itself, not in the context of cluster_mols. In the standalone case, the usage is as follows:&lt;br /&gt;
&lt;br /&gt;
	show_contacts(selection,selection2,result=&amp;quot;contacts&amp;quot;,cutoff=3.6, bigcutoff = 4.0):&lt;br /&gt;
&lt;br /&gt;
The arguments are as follows:&lt;br /&gt;
selection -- pymol selection string for the protein&lt;br /&gt;
selection2 -- pymol selection string for the ligands&lt;br /&gt;
results -- prefix of the object that the distances should be shown in. (Default &amp;quot;contacts&amp;quot;)&lt;br /&gt;
cutoff -- Distance cutoff for what is considered an ideal hydrogen bond.&lt;br /&gt;
bigcutoff -- Distance cutoff for a non-ideal hydrogen bond.&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
The output of show_contacts are a set of pymol distance objects. They are color-coded and size coded to indicate different interactions between the ligand and protein. They are controlled by the parameter indicated.&lt;br /&gt;
&lt;br /&gt;
# thin-purple lines -- all possible polar contacts (acc-acc, don-don, acc-don) -- bigcutoff&lt;br /&gt;
# thick-yellow lines -- All ideal hydrogen bonds -- cutoff&lt;br /&gt;
# thin-yellow lines -- Non ideal hydrogen bonds -- bigcutoff&lt;br /&gt;
# thick-red lines -- Polar clashes, i.e. Donor-Donor, Acceptor-Acceptor -- cutoff&lt;br /&gt;
&lt;br /&gt;
= Authors =&lt;br /&gt;
The main cluster_mols.py script was conceived of by Matthew P Baumgartner (mpb21 [at] pitt.edu) and Dr. David Koes while working in the lab of Dr. Carlos Camacho at the University of Pittsburgh. The cluster_mols.py script was implemented (and later rewritten) by MPB. The show_contacts functionality and the first version of the objectfocus.py keyboard controls was written by DK.&lt;br /&gt;
&lt;br /&gt;
Please send questions/comments/bug reports to mpb21 [at] pitt.edu.&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Mpb21</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Cluster_mols&amp;diff=12096</id>
		<title>Cluster mols</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Cluster_mols&amp;diff=12096"/>
		<updated>2014-07-24T18:13:18Z</updated>

		<summary type="html">&lt;p&gt;Mpb21: /* Keyboard Controls */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:cluster_mols_py_pymol.png|450px|right]]&lt;br /&gt;
cluster_mols is a PyMOL plugin that allows the user to quickly select compounds from a virtual screen to be purchased or synthesized.&lt;br /&gt;
&lt;br /&gt;
It helps the user by automatically clustering input compounds based on their molecular scaffolds and loading them into the PyMOL window.  cluster_mols also highlights both good and bad polar interactions between the ligands and a user specified receptor.  Additionally there are a number of keyboard controls for selecting and extracting compounds, as well as functionality for searching online to see if there are vendors for a selected compound.&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
The basic work flow of cluster_mols.py can be broken up into three parts.&lt;br /&gt;
# Computing a similarity matrix from the input compounds&lt;br /&gt;
# Performing hierarchical clustering on the results from 1)&lt;br /&gt;
# Cutting the tree at a user-specified height and creating and sorting clusters &lt;br /&gt;
&lt;br /&gt;
The results of 1 and 2 are saved to python pickle files so you do not have to recompute them in subsequent runs.&lt;br /&gt;
&lt;br /&gt;
In addition, it also highlights both good and bad polar contacts between the ligand and a user specified protein using the 'show_contacts' module described below.&lt;br /&gt;
&lt;br /&gt;
This script also integrates keyboard controls which allows for WASD movement through the clusters as well as keyboard shortcuts for pulling out compounds.&lt;br /&gt;
See below for usage.&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
The most up to date version (recommended) of cluster_mols is available through SourceForge at: https://sourceforge.net/projects/clustermolspy/&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
This plugin has a number of dependencies that are required. And it is currently only supported on Linux and OSX. &lt;br /&gt;
&lt;br /&gt;
Python packages (install using easy_install or pip)&lt;br /&gt;
# openbabel&lt;br /&gt;
# chemfp&lt;br /&gt;
# numpy&lt;br /&gt;
# scipy&lt;br /&gt;
# Tkinter&lt;br /&gt;
# fastcluster&lt;br /&gt;
# argparse (optional: for command line only)&lt;br /&gt;
&lt;br /&gt;
Command line tools (These must be accessible through your PATH environment variable):&lt;br /&gt;
# babel -- from openbabel.org&lt;br /&gt;
# sdsorter -- https://sourceforge.net/projects/sdsorter/&lt;br /&gt;
&lt;br /&gt;
Once you have the required dependencies, install it through PyMOL's Plugin menu.&lt;br /&gt;
&lt;br /&gt;
PyMOL &amp;gt; Plugin &amp;gt; Install Plugin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The GUI is relatively straight forward IMHO, if you follow it from top to bottom, and then then left to right through the tabs. &lt;br /&gt;
&lt;br /&gt;
The program requires that the input be a '.sdf' or '.sdf.gz' file. If your compounds are not in that format, use the 'babel' tool from OpenBabel to convert them.&lt;br /&gt;
&lt;br /&gt;
In the 'Compute Similarities' tab, there are options for selecting a new ligand and for specifying how many CPUs you want to run the similarity calculation on. Clicking the 'Compute Similarity' button will start the similarity calculations. If you check the 'Ignore saved results?' box it will ignore any saved intermediate results files. This could be useful if you change the contents of the original input file while keeping the file name the same.&lt;br /&gt;
&lt;br /&gt;
Depending on how many compounds there are, the similarity calculations may take between 1 and 10 minutes.  If you launched PyMOL from the command line, you will be able to see the progress printing out in the console. The similarity results are saved to a file so if you want to re-cluster the same input file, you do not need to wait to recompute the similarities.&lt;br /&gt;
&lt;br /&gt;
== GUI Options ==&lt;br /&gt;
[[File:cluster_mols_screen_1_desc.png|200px|thumb]]&lt;br /&gt;
[[File:cluster_mols_screen_2_desc.png|200px|thumb]]&lt;br /&gt;
The first option on the Cluster Compounds tab defines how the clusters will be sorted. The default is to sort by the 'minimizedAffinity' which is inserted into the output sdf file after minimization with 'smina' (smina.sf.net). You can also sort the clusters by any SD tag that exists in the input file they have including the Title or the size of the cluster.&lt;br /&gt;
&lt;br /&gt;
The second option is the height at which the hierarchical clustering tree is cut. The units are arbitrary, but a higher number leads to a small number of large clusters of less similar compounds, and lower cutoffs lead to more small clusters of more similar compounds. The third option is a check box for whether to group clusters with only one compound in them into one ‘singletons’ cluster. The forth option enables the show_contacts tool that is described in the next section. There is also a field to enter the name of a PyMOL object to compute the hydrogen bonds to, it accepts PyMOL selection strings. Finally, there is a button to create the clusters and load them into PyMOL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Keyboard Controls ==&lt;br /&gt;
Once you have finished the similarity calculations and clustering mentioned above, you can navigate the Familiar to gamers, you can move through clusters using WASD, (W for up, S for down, A for left, D for right). &lt;br /&gt;
The one important caveat is that due to limitations in PyMOL, the WASD movement needs to be used with the Control (or Alt) key. Meaning (Ctrl-W moves up). It seems weird, but you quickly get used to it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Navigation Controls&lt;br /&gt;
&lt;br /&gt;
Ctrl-W – Move up a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-S – Move down a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-A – Move to the previous compound in a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-D – Move to the next compound in the cluster&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compound selection&lt;br /&gt;
&lt;br /&gt;
In addition to moving through the clusters, you can also extract compounds that you like for later viewing using the following controls.&lt;br /&gt;
&lt;br /&gt;
F1 – Print title of currently selected molecule&lt;br /&gt;
&lt;br /&gt;
F2 – Remove most recently added compound&lt;br /&gt;
&lt;br /&gt;
'''F3 – Add currently visible compound to list''' (Most commonly used)&lt;br /&gt;
&lt;br /&gt;
F4, F12 – Print List&lt;br /&gt;
&lt;br /&gt;
Ctrl-F -- Check for vendors&lt;br /&gt;
&lt;br /&gt;
[Check for available vendors (ZINC)]&lt;br /&gt;
If you acquired your compounds from ZINCPharmer (http://zincpharmer.csb.pitt.edu/) and/or your compounds have title that start with a ZINC ID (docking.zinc.org) or a MolPort ID (www.molport.com), you can hit 'Ctrl-F' to see if there are any vendors listed on the ZINC website.&lt;br /&gt;
&lt;br /&gt;
== show_contacts ==&lt;br /&gt;
show_contacts is a tool originally developed by Dr. David Koes for visualizing the hydrogen bond network between ligands and a protein receptor. show_contacts is integrated into cluster_mols as a function and is executed automatically . It can be run by itself, not in the context of cluster_mols. In the standalone case, the usage is as follows:&lt;br /&gt;
&lt;br /&gt;
	show_contacts(selection,selection2,result=&amp;quot;contacts&amp;quot;,cutoff=3.6, bigcutoff = 4.0):&lt;br /&gt;
&lt;br /&gt;
The arguments are as follows:&lt;br /&gt;
selection -- pymol selection string for the protein&lt;br /&gt;
selection2 -- pymol selection string for the ligands&lt;br /&gt;
results -- prefix of the object that the distances should be shown in. (Default &amp;quot;contacts&amp;quot;)&lt;br /&gt;
cutoff -- Distance cutoff for what is considered an ideal hydrogen bond.&lt;br /&gt;
bigcutoff -- Distance cutoff for a non-ideal hydrogen bond.&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
The output of show_contacts are a set of pymol distance objects. They are color-coded and size coded to indicate different interactions between the ligand and protein. They are controlled by the parameter indicated.&lt;br /&gt;
&lt;br /&gt;
# thin-purple lines -- all possible polar contacts (acc-acc, don-don, acc-don) -- bigcutoff&lt;br /&gt;
# thick-yellow lines -- All ideal hydrogen bonds -- cutoff&lt;br /&gt;
# thin-yellow lines -- Non ideal hydrogen bonds -- bigcutoff&lt;br /&gt;
# thick-red lines -- Polar clashes, i.e. Donor-Donor, Acceptor-Acceptor -- cutoff&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Authors =&lt;br /&gt;
The main cluster_mols.py script was conceived of by Matthew P Baumgartner (mpb21 [at] pitt.edu) and Dr. David Koes while working in the lab of Dr. Carlos Camacho at the University of Pittsburgh. The cluster_mols.py script was implemented (and later rewritten) by MPB. The show_contacts functionality and the first version of the objectfocus.py keyboard controls was written by DK.&lt;br /&gt;
&lt;br /&gt;
Please send questions/comments/bug reports to mpb21 [at] pitt.edu.&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Mpb21</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Cluster_mols&amp;diff=12095</id>
		<title>Cluster mols</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Cluster_mols&amp;diff=12095"/>
		<updated>2014-07-24T17:51:27Z</updated>

		<summary type="html">&lt;p&gt;Mpb21: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:cluster_mols_py_pymol.png|450px|right]]&lt;br /&gt;
cluster_mols is a PyMOL plugin that allows the user to quickly select compounds from a virtual screen to be purchased or synthesized.&lt;br /&gt;
&lt;br /&gt;
It helps the user by automatically clustering input compounds based on their molecular scaffolds and loading them into the PyMOL window.  cluster_mols also highlights both good and bad polar interactions between the ligands and a user specified receptor.  Additionally there are a number of keyboard controls for selecting and extracting compounds, as well as functionality for searching online to see if there are vendors for a selected compound.&lt;br /&gt;
&lt;br /&gt;
= Description =&lt;br /&gt;
The basic work flow of cluster_mols.py can be broken up into three parts.&lt;br /&gt;
# Computing a similarity matrix from the input compounds&lt;br /&gt;
# Performing hierarchical clustering on the results from 1)&lt;br /&gt;
# Cutting the tree at a user-specified height and creating and sorting clusters &lt;br /&gt;
&lt;br /&gt;
The results of 1 and 2 are saved to python pickle files so you do not have to recompute them in subsequent runs.&lt;br /&gt;
&lt;br /&gt;
In addition, it also highlights both good and bad polar contacts between the ligand and a user specified protein using the 'show_contacts' module described below.&lt;br /&gt;
&lt;br /&gt;
This script also integrates keyboard controls which allows for WASD movement through the clusters as well as keyboard shortcuts for pulling out compounds.&lt;br /&gt;
See below for usage.&lt;br /&gt;
&lt;br /&gt;
= Download =&lt;br /&gt;
The most up to date version (recommended) of cluster_mols is available through SourceForge at: https://sourceforge.net/projects/clustermolspy/&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
This plugin has a number of dependencies that are required. And it is currently only supported on Linux and OSX. &lt;br /&gt;
&lt;br /&gt;
Python packages (install using easy_install or pip)&lt;br /&gt;
# openbabel&lt;br /&gt;
# chemfp&lt;br /&gt;
# numpy&lt;br /&gt;
# scipy&lt;br /&gt;
# Tkinter&lt;br /&gt;
# fastcluster&lt;br /&gt;
# argparse (optional: for command line only)&lt;br /&gt;
&lt;br /&gt;
Command line tools (These must be accessible through your PATH environment variable):&lt;br /&gt;
# babel -- from openbabel.org&lt;br /&gt;
# sdsorter -- https://sourceforge.net/projects/sdsorter/&lt;br /&gt;
&lt;br /&gt;
Once you have the required dependencies, install it through PyMOL's Plugin menu.&lt;br /&gt;
&lt;br /&gt;
PyMOL &amp;gt; Plugin &amp;gt; Install Plugin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The GUI is relatively straight forward IMHO, if you follow it from top to bottom, and then then left to right through the tabs. &lt;br /&gt;
&lt;br /&gt;
The program requires that the input be a '.sdf' or '.sdf.gz' file. If your compounds are not in that format, use the 'babel' tool from OpenBabel to convert them.&lt;br /&gt;
&lt;br /&gt;
In the 'Compute Similarities' tab, there are options for selecting a new ligand and for specifying how many CPUs you want to run the similarity calculation on. Clicking the 'Compute Similarity' button will start the similarity calculations. If you check the 'Ignore saved results?' box it will ignore any saved intermediate results files. This could be useful if you change the contents of the original input file while keeping the file name the same.&lt;br /&gt;
&lt;br /&gt;
Depending on how many compounds there are, the similarity calculations may take between 1 and 10 minutes.  If you launched PyMOL from the command line, you will be able to see the progress printing out in the console. The similarity results are saved to a file so if you want to re-cluster the same input file, you do not need to wait to recompute the similarities.&lt;br /&gt;
&lt;br /&gt;
== GUI Options ==&lt;br /&gt;
[[File:cluster_mols_screen_1_desc.png|200px|thumb]]&lt;br /&gt;
[[File:cluster_mols_screen_2_desc.png|200px|thumb]]&lt;br /&gt;
The first option on the Cluster Compounds tab defines how the clusters will be sorted. The default is to sort by the 'minimizedAffinity' which is inserted into the output sdf file after minimization with 'smina' (smina.sf.net). You can also sort the clusters by any SD tag that exists in the input file they have including the Title or the size of the cluster.&lt;br /&gt;
&lt;br /&gt;
The second option is the height at which the hierarchical clustering tree is cut. The units are arbitrary, but a higher number leads to a small number of large clusters of less similar compounds, and lower cutoffs lead to more small clusters of more similar compounds. The third option is a check box for whether to group clusters with only one compound in them into one ‘singletons’ cluster. The forth option enables the show_contacts tool that is described in the next section. There is also a field to enter the name of a PyMOL object to compute the hydrogen bonds to, it accepts PyMOL selection strings. Finally, there is a button to create the clusters and load them into PyMOL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Keyboard Controls ==&lt;br /&gt;
Once you have finished the similarity calculations and clustering mentioned above, you can navigate the Familiar to gamers, you can move through clusters using WASD, (W for up, S for down, A for left, D for right). &lt;br /&gt;
The one important caveat is that due to limitations in PyMOL, the WASD movement needs to be used with the Control (or Alt) key. Meaning (Ctrl-W moves up). It seems weird, but you quickly get used to it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Navigation Controls&lt;br /&gt;
Ctrl-W – Move up a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-S – Move down a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-A – Move to the previous compound in a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-D – Move to the next compound in the cluster&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compound selection.&lt;br /&gt;
In addition to moving through the clusters, you can also extract compounds that you like for later viewing using the following controls.&lt;br /&gt;
&lt;br /&gt;
F1 – Print title of currently selected molecule&lt;br /&gt;
&lt;br /&gt;
F2 – Remove most recently added compound&lt;br /&gt;
&lt;br /&gt;
'''F3 – Add currently visible compound to list''' (Most commonly used)&lt;br /&gt;
&lt;br /&gt;
F4, F12 – Print List&lt;br /&gt;
&lt;br /&gt;
Ctrl-F -- Check for vendors&lt;br /&gt;
&lt;br /&gt;
[Check for available vendors (ZINC)]&lt;br /&gt;
If you acquired your compounds from ZINCPharmer (http://zincpharmer.csb.pitt.edu/) and/or your compounds have title that start with a ZINC ID (docking.zinc.org) or a MolPort ID (www.molport.com), you can hit 'Ctrl-F' to see if there are any vendors listed on the ZINC website. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== show_contacts ==&lt;br /&gt;
show_contacts is a tool originally developed by Dr. David Koes for visualizing the hydrogen bond network between ligands and a protein receptor. show_contacts is integrated into cluster_mols as a function and is executed automatically . It can be run by itself, not in the context of cluster_mols. In the standalone case, the usage is as follows:&lt;br /&gt;
&lt;br /&gt;
	show_contacts(selection,selection2,result=&amp;quot;contacts&amp;quot;,cutoff=3.6, bigcutoff = 4.0):&lt;br /&gt;
&lt;br /&gt;
The arguments are as follows:&lt;br /&gt;
selection -- pymol selection string for the protein&lt;br /&gt;
selection2 -- pymol selection string for the ligands&lt;br /&gt;
results -- prefix of the object that the distances should be shown in. (Default &amp;quot;contacts&amp;quot;)&lt;br /&gt;
cutoff -- Distance cutoff for what is considered an ideal hydrogen bond.&lt;br /&gt;
bigcutoff -- Distance cutoff for a non-ideal hydrogen bond.&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
The output of show_contacts are a set of pymol distance objects. They are color-coded and size coded to indicate different interactions between the ligand and protein. They are controlled by the parameter indicated.&lt;br /&gt;
&lt;br /&gt;
# thin-purple lines -- all possible polar contacts (acc-acc, don-don, acc-don) -- bigcutoff&lt;br /&gt;
# thick-yellow lines -- All ideal hydrogen bonds -- cutoff&lt;br /&gt;
# thin-yellow lines -- Non ideal hydrogen bonds -- bigcutoff&lt;br /&gt;
# thick-red lines -- Polar clashes, i.e. Donor-Donor, Acceptor-Acceptor -- cutoff&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Authors =&lt;br /&gt;
The main cluster_mols.py script was conceived of by Matthew P Baumgartner (mpb21 [at] pitt.edu) and Dr. David Koes while working in the lab of Dr. Carlos Camacho at the University of Pittsburgh. The cluster_mols.py script was implemented (and later rewritten) by MPB. The show_contacts functionality and the first version of the objectfocus.py keyboard controls was written by DK.&lt;br /&gt;
&lt;br /&gt;
Please send questions/comments/bug reports to mpb21 [at] pitt.edu.&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Mpb21</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Cluster_mols&amp;diff=12094</id>
		<title>Cluster mols</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Cluster_mols&amp;diff=12094"/>
		<updated>2014-07-24T17:49:45Z</updated>

		<summary type="html">&lt;p&gt;Mpb21: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:cluster_mols_py_pymol.png|450px|right]]&lt;br /&gt;
cluster_mols is a PyMOL plugin that allows the user to quickly select compounds from a virtual screen to be purchased or synthesized.&lt;br /&gt;
&lt;br /&gt;
It helps the user by automatically clustering input compounds based on their molecular scaffolds and loading them into the PyMOL window.  cluster_mols also highlights both good and bad polar interactions between the ligands and a user specified receptor.  Additionally there are a number of keyboard controls for selecting and extracting compounds, as well as functionality for searching online to see if there are vendors for a selected compound.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The basic work flow of cluster_mols.py can be broken up into three parts.&lt;br /&gt;
# Computing a similarity matrix from the input compounds&lt;br /&gt;
# Performing hierarchical clustering on the results from 1)&lt;br /&gt;
# Cutting the tree at a user-specified height and creating and sorting clusters &lt;br /&gt;
&lt;br /&gt;
The results of 1 and 2 are saved to python pickle files so you do not have to recompute them in subsequent runs.&lt;br /&gt;
&lt;br /&gt;
In addition, it also highlights both good and bad polar contacts between the ligand and a user specified protein using the 'show_contacts' module described below.&lt;br /&gt;
&lt;br /&gt;
This script also integrates keyboard controls which allows for WASD movement through the clusters as well as keyboard shortcuts for pulling out compounds.&lt;br /&gt;
See below for usage.&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
The most up to date version (recommended) of cluster_mols is available through SourceForge at: [https://sourceforge.net/projects/clustermolspy/]&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
This plugin has a number of dependencies that are required. And it is currently only supported on Linux and OSX. &lt;br /&gt;
&lt;br /&gt;
Python packages (install using easy_install or pip)&lt;br /&gt;
# openbabel&lt;br /&gt;
# chemfp&lt;br /&gt;
# numpy&lt;br /&gt;
# scipy&lt;br /&gt;
# Tkinter&lt;br /&gt;
# fastcluster&lt;br /&gt;
# argparse (optional: for command line only)&lt;br /&gt;
&lt;br /&gt;
Command line tools (These must be accessible through your PATH environment variable):&lt;br /&gt;
# babel -- from openbabel.org&lt;br /&gt;
# sdsorter -- https://sourceforge.net/projects/sdsorter/&lt;br /&gt;
&lt;br /&gt;
Once you have the required dependencies, install it through PyMOL's Plugin menu.&lt;br /&gt;
&lt;br /&gt;
PyMOL &amp;gt; Plugin &amp;gt; Install Plugin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The GUI is relatively straight forward IMHO, if you follow it from top to bottom, and then then left to right through the tabs. &lt;br /&gt;
&lt;br /&gt;
The program requires that the input be a '.sdf' or '.sdf.gz' file. If your compounds are not in that format, use the 'babel' tool from OpenBabel to convert them.&lt;br /&gt;
&lt;br /&gt;
In the 'Compute Similarities' tab, there are options for selecting a new ligand and for specifying how many CPUs you want to run the similarity calculation on. Clicking the 'Compute Similarity' button will start the similarity calculations. If you check the 'Ignore saved results?' box it will ignore any saved intermediate results files. This could be useful if you change the contents of the original input file while keeping the file name the same.&lt;br /&gt;
&lt;br /&gt;
Depending on how many compounds there are, the similarity calculations may take between 1 and 10 minutes.  If you launched PyMOL from the command line, you will be able to see the progress printing out in the console. The similarity results are saved to a file so if you want to re-cluster the same input file, you do not need to wait to recompute the similarities.&lt;br /&gt;
&lt;br /&gt;
== GUI Options ==&lt;br /&gt;
[[File:cluster_mols_screen_1_desc.png|200px|thumb]]&lt;br /&gt;
[[File:cluster_mols_screen_2_desc.png|200px|thumb]]&lt;br /&gt;
The first option on the Cluster Compounds tab defines how the clusters will be sorted. The default is to sort by the 'minimizedAffinity' which is inserted into the output sdf file after minimization with 'smina' (smina.sf.net). You can also sort the clusters by any SD tag that exists in the input file they have including the Title or the size of the cluster.&lt;br /&gt;
&lt;br /&gt;
The second option is the height at which the hierarchical clustering tree is cut. The units are arbitrary, but a higher number leads to a small number of large clusters of less similar compounds, and lower cutoffs lead to more small clusters of more similar compounds. The third option is a check box for whether to group clusters with only one compound in them into one ‘singletons’ cluster. The forth option enables the show_contacts tool that is described in the next section. There is also a field to enter the name of a PyMOL object to compute the hydrogen bonds to, it accepts PyMOL selection strings. Finally, there is a button to create the clusters and load them into PyMOL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Keyboard Controls ==&lt;br /&gt;
Once you have finished the similarity calculations and clustering mentioned above, you can navigate the Familiar to gamers, you can move through clusters using WASD, (W for up, S for down, A for left, D for right). &lt;br /&gt;
The one important caveat is that due to limitations in PyMOL, the WASD movement needs to be used with the Control (or Alt) key. Meaning (Ctrl-W moves up). It seems weird, but you quickly get used to it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Navigation Controls&lt;br /&gt;
Ctrl-W – Move up a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-S – Move down a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-A – Move to the previous compound in a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-D – Move to the next compound in the cluster&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compound selection.&lt;br /&gt;
In addition to moving through the clusters, you can also extract compounds that you like for later viewing using the following controls.&lt;br /&gt;
&lt;br /&gt;
F1 – Print title of currently selected molecule&lt;br /&gt;
&lt;br /&gt;
F2 – Remove most recently added compound&lt;br /&gt;
&lt;br /&gt;
'''F3 – Add currently visible compound to list''' (Most commonly used)&lt;br /&gt;
&lt;br /&gt;
F4, F12 – Print List&lt;br /&gt;
&lt;br /&gt;
Ctrl-F -- Check for vendors&lt;br /&gt;
&lt;br /&gt;
[Check for available vendors (ZINC)]&lt;br /&gt;
If you acquired your compounds from ZINCPharmer (http://zincpharmer.csb.pitt.edu/) and/or your compounds have title that start with a ZINC ID (docking.zinc.org) or a MolPort ID (www.molport.com), you can hit 'Ctrl-F' to see if there are any vendors listed on the ZINC website. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== show_contacts ==&lt;br /&gt;
show_contacts is a tool originally developed by Dr. David Koes for visualizing the hydrogen bond network between ligands and a protein receptor. show_contacts is integrated into cluster_mols as a function and is executed automatically . It can be run by itself, not in the context of cluster_mols. In the standalone case, the usage is as follows:&lt;br /&gt;
&lt;br /&gt;
	show_contacts(selection,selection2,result=&amp;quot;contacts&amp;quot;,cutoff=3.6, bigcutoff = 4.0):&lt;br /&gt;
&lt;br /&gt;
The arguments are as follows:&lt;br /&gt;
selection -- pymol selection string for the protein&lt;br /&gt;
selection2 -- pymol selection string for the ligands&lt;br /&gt;
results -- prefix of the object that the distances should be shown in. (Default &amp;quot;contacts&amp;quot;)&lt;br /&gt;
cutoff -- Distance cutoff for what is considered an ideal hydrogen bond.&lt;br /&gt;
bigcutoff -- Distance cutoff for a non-ideal hydrogen bond.&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
The output of show_contacts are a set of pymol distance objects. They are color-coded and size coded to indicate different interactions between the ligand and protein. They are controlled by the parameter indicated.&lt;br /&gt;
&lt;br /&gt;
# thin-purple lines -- all possible polar contacts (acc-acc, don-don, acc-don) -- bigcutoff&lt;br /&gt;
# thick-yellow lines -- All ideal hydrogen bonds -- cutoff&lt;br /&gt;
# thin-yellow lines -- Non ideal hydrogen bonds -- bigcutoff&lt;br /&gt;
# thick-red lines -- Polar clashes, i.e. Donor-Donor, Acceptor-Acceptor -- cutoff&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Authors ==&lt;br /&gt;
The main cluster_mols.py script was conceived of by Matthew P Baumgartner (mpb21 [at] pitt.edu) and Dr. David Koes while working in the lab of Dr. Carlos Camacho at the University of Pittsburgh. The cluster_mols.py script was implemented (and later rewritten) by MPB. The show_contacts functionality and the first version of the objectfocus.py keyboard controls was written by DK.&lt;br /&gt;
&lt;br /&gt;
Please send questions/comments/bug reports to mpb21 [at] pitt.edu.&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Mpb21</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Cluster_mols&amp;diff=12093</id>
		<title>Cluster mols</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Cluster_mols&amp;diff=12093"/>
		<updated>2014-07-24T17:46:32Z</updated>

		<summary type="html">&lt;p&gt;Mpb21: Created page with &amp;quot;right cluster_mols is a PyMOL plugin that allows the user to quickly select compounds from a virtual screen to be purchased or synthesize...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:cluster_mols_py_pymol.png|450px|right]]&lt;br /&gt;
cluster_mols is a PyMOL plugin that allows the user to quickly select compounds from a virtual screen to be purchased or synthesized.&lt;br /&gt;
&lt;br /&gt;
It helps the user by automatically clustering input compounds based on their molecular scaffolds and loading them into the PyMOL window.  cluster_mols also highlights both good and bad polar interactions between the ligands and a user specified receptor.  Additionally there are a number of keyboard controls for selecting and extracting compounds, as well as functionality for searching online to see if there are vendors for a selected compound.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
The basic work flow of cluster_mols.py can be broken up into three parts.&lt;br /&gt;
# Computing a similarity matrix from the input compounds&lt;br /&gt;
# Performing hierarchical clustering on the results from 1)&lt;br /&gt;
# Cutting the tree at a user-specified height and creating and sorting clusters &lt;br /&gt;
&lt;br /&gt;
The results of 1 and 2 are saved to python pickle files so you do not have to recompute them in subsequent runs.&lt;br /&gt;
&lt;br /&gt;
In addition, it also highlights both good and bad polar contacts between the ligand and a user specified protein using the 'show_contacts' module described below.&lt;br /&gt;
&lt;br /&gt;
This script also integrates keyboard controls which allows for WASD movement through the clusters as well as keyboard shortcuts for pulling out compounds.&lt;br /&gt;
See below for usage.&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
The most up to date version (recommended) of cluster_mols is available through SourceForge at: [https://sourceforge.net/projects/clustermolspy/]&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
This plugin has a number of dependencies that are required. And it is currently only supported on Linux and OSX. &lt;br /&gt;
&lt;br /&gt;
Python packages (install using easy_install or pip)&lt;br /&gt;
# openbabel&lt;br /&gt;
# chemfp&lt;br /&gt;
# numpy&lt;br /&gt;
# scipy&lt;br /&gt;
# Tkinter&lt;br /&gt;
# fastcluster&lt;br /&gt;
# argparse (optional: for command line only)&lt;br /&gt;
&lt;br /&gt;
Command line tools (These must be accessible through your PATH environment variable):&lt;br /&gt;
# babel -- from openbabel.org&lt;br /&gt;
# sdsorter -- https://sourceforge.net/projects/sdsorter/&lt;br /&gt;
&lt;br /&gt;
Once you have the required dependencies, install it through PyMOL's Plugin menu.&lt;br /&gt;
&lt;br /&gt;
PyMOL &amp;gt; Plugin &amp;gt; Install Plugin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The GUI is relatively straight forward IMHO, if you follow it from top to bottom, and then then left to right through the tabs. &lt;br /&gt;
&lt;br /&gt;
The program requires that the input be a '.sdf' or '.sdf.gz' file. If your compounds are not in that format, use the 'babel' tool from OpenBabel to convert them.&lt;br /&gt;
&lt;br /&gt;
In the 'Compute Similarities' tab, there are options for selecting a new ligand and for specifying how many CPUs you want to run the similarity calculation on. Clicking the 'Compute Similarity' button will start the similarity calculations. If you check the 'Ignore saved results?' box it will ignore any saved intermediate results files. This could be useful if you change the contents of the original input file while keeping the file name the same.&lt;br /&gt;
&lt;br /&gt;
Depending on how many compounds there are, the similarity calculations may take between 1 and 10 minutes.  If you launched PyMOL from the command line, you will be able to see the progress printing out in the console. The similarity results are saved to a file so if you want to re-cluster the same input file, you do not need to wait to recompute the similarities.&lt;br /&gt;
&lt;br /&gt;
== GUI Options ==&lt;br /&gt;
[[File:cluster_mols_screen_1_desc.png|200px|thumb]]&lt;br /&gt;
[[File:cluster_mols_screen_2_desc.png|200px|thumb]]&lt;br /&gt;
The first option on the Cluster Compounds tab defines how the clusters will be sorted. The default is to sort by the 'minimizedAffinity' which is inserted into the output sdf file after minimization with 'smina' (smina.sf.net). You can also sort the clusters by any SD tag that exists in the input file they have including the Title or the size of the cluster.&lt;br /&gt;
&lt;br /&gt;
The second option is the height at which the hierarchical clustering tree is cut. The units are arbitrary, but a higher number leads to a small number of large clusters of less similar compounds, and lower cutoffs lead to more small clusters of more similar compounds. The third option is a check box for whether to group clusters with only one compound in them into one ‘singletons’ cluster. The forth option enables the show_contacts tool that is described in the next section. There is also a field to enter the name of a PyMOL object to compute the hydrogen bonds to, it accepts PyMOL selection strings. Finally, there is a button to create the clusters and load them into PyMOL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Keyboard Controls ==&lt;br /&gt;
Once you have finished the similarity calculations and clustering mentioned above, you can navigate the Familiar to gamers, you can move through clusters using WASD, (W for up, S for down, A for left, D for right). &lt;br /&gt;
The one important caveat is that due to limitations in PyMOL, the WASD movement needs to be used with the Control (or Alt) key. Meaning (Ctrl-W moves up). It seems weird, but you quickly get used to it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Navigation Controls&lt;br /&gt;
Ctrl-W – Move up a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-S – Move down a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-A – Move to the previous compound in a cluster&lt;br /&gt;
&lt;br /&gt;
Ctrl-D – Move to the next compound in the cluster&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compound selection.&lt;br /&gt;
In addition to moving through the clusters, you can also extract compounds that you like for later viewing using the following controls.&lt;br /&gt;
&lt;br /&gt;
F1 – Print title of currently selected molecule&lt;br /&gt;
&lt;br /&gt;
F2 – Remove most recently added compound&lt;br /&gt;
&lt;br /&gt;
'''F3 – Add currently visible compound to list''' (Most commonly used)&lt;br /&gt;
&lt;br /&gt;
F4, F12 – Print List&lt;br /&gt;
&lt;br /&gt;
Ctrl-F -- Check for vendors&lt;br /&gt;
&lt;br /&gt;
[Check for available vendors (ZINC)]&lt;br /&gt;
If you acquired your compounds from ZINCPharmer (http://zincpharmer.csb.pitt.edu/) and/or your compounds have title that start with a ZINC ID (docking.zinc.org) or a MolPort ID (www.molport.com), you can hit 'Ctrl-F' to see if there are any vendors listed on the ZINC website. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== show_contacts ==&lt;br /&gt;
show_contacts is a tool originally developed by Dr. David Koes for visualizing the hydrogen bond network between ligands and a protein receptor. show_contacts is integrated into cluster_mols as a function and is executed automatically . It can be run by itself, not in the context of cluster_mols. In the standalone case, the usage is as follows:&lt;br /&gt;
&lt;br /&gt;
	show_contacts(selection,selection2,result=&amp;quot;contacts&amp;quot;,cutoff=3.6, bigcutoff = 4.0):&lt;br /&gt;
&lt;br /&gt;
The arguments are as follows:&lt;br /&gt;
selection -- pymol selection string for the protein&lt;br /&gt;
selection2 -- pymol selection string for the ligands&lt;br /&gt;
results -- prefix of the object that the distances should be shown in. (Default &amp;quot;contacts&amp;quot;)&lt;br /&gt;
cutoff -- Distance cutoff for what is considered an ideal hydrogen bond.&lt;br /&gt;
bigcutoff -- Distance cutoff for a non-ideal hydrogen bond.&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
The output of show_contacts are a set of pymol distance objects. They are color-coded and size coded to indicate different interactions between the ligand and protein. They are controlled by the parameter indicated.&lt;br /&gt;
&lt;br /&gt;
# thin-purple lines -- all possible polar contacts (acc-acc, don-don, acc-don) -- bigcutoff&lt;br /&gt;
# thick-yellow lines -- All ideal hydrogen bonds -- cutoff&lt;br /&gt;
# thin-yellow lines -- Non ideal hydrogen bonds -- bigcutoff&lt;br /&gt;
# thick-red lines -- Polar clashes, i.e. Donor-Donor, Acceptor-Acceptor -- cutoff&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Mpb21</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Displaying_Biochemical_Properties&amp;diff=12007</id>
		<title>Displaying Biochemical Properties</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Displaying_Biochemical_Properties&amp;diff=12007"/>
		<updated>2014-06-27T17:28:35Z</updated>

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

		<summary type="html">&lt;p&gt;Mpb21: /* PYMOL API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''create''' creates a new molecule object from a selection.  It can also be used to create states in an existing object.&lt;br /&gt;
'''NOTE''': this command has not yet been throughly tested. &lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
create name, (selection) [,source_state [,target_state ] ]&lt;br /&gt;
create name = (selection) [,source_state [,target_state ] ]    # (DEPRECATED)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name = object to create (or modify)&lt;br /&gt;
* selection = atoms to include in the new object&lt;br /&gt;
* source_state (default: 0 - copy all states)&lt;br /&gt;
* target_state (default: 0)&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.create(string name, string selection, int source_state, int target_state,int discrete)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===NOTES===&lt;br /&gt;
If the source and target states are zero (default), all states will be copied.  Otherwise, only the indicated states will be copied.&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[Cmd load|load]], [[Cmd copy|copy]], [[Extract]]&lt;br /&gt;
&lt;br /&gt;
=== User Comments/Examples ===&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# merging two multi-state objects with the create command&lt;br /&gt;
# obj1 has 25 states and obj2 has 40 states &lt;br /&gt;
&lt;br /&gt;
load multi_state_obj1, obj1&lt;br /&gt;
load multi_state_obj2, obj2&lt;br /&gt;
&lt;br /&gt;
# merge the two multi-state objects back to back into obj3&lt;br /&gt;
# 0 indicates every states from obj1 should be included&lt;br /&gt;
# 1 indicates that the first state of obj3 is the first state from obj1 etc.&lt;br /&gt;
&lt;br /&gt;
create obj3, obj1, 0, 1&lt;br /&gt;
&lt;br /&gt;
# as obj1 has 25 states, the first state of obj2 must be state 26 to create a multi-state object of obj1 and obj2 back-to-back &lt;br /&gt;
# 26 indicates that the 26th state of obj3 is state nr. 1 of obj2 etc. &lt;br /&gt;
&lt;br /&gt;
create obj3, obj2, 0, 26&lt;br /&gt;
&lt;br /&gt;
# Obj3 now has 65 states (25 from obj1 and 40 from obj2)&lt;br /&gt;
# save obj3 as a multi-state pdb file&lt;br /&gt;
# use state=0 to get all states into one pdb file&lt;br /&gt;
&lt;br /&gt;
save obj3.pdb, obj3, state=0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Create]]&lt;br /&gt;
[[Category:States|Create]]&lt;br /&gt;
[[Category:Editing Module|Create]]&lt;/div&gt;</summary>
		<author><name>Mpb21</name></author>
	</entry>
</feed>