<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.pymol.org/index.php?action=history&amp;feed=atom&amp;title=AlphaToAll</id>
	<title>AlphaToAll - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pymol.org/index.php?action=history&amp;feed=atom&amp;title=AlphaToAll"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=AlphaToAll&amp;action=history"/>
	<updated>2026-05-04T18:38:36Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=AlphaToAll&amp;diff=14540&amp;oldid=prev</id>
		<title>Cchem: 1 revision</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=AlphaToAll&amp;diff=14540&amp;oldid=prev"/>
		<updated>2019-03-04T03:58:18Z</updated>

		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 03:58, 4 March 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Cchem</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=AlphaToAll&amp;diff=14539&amp;oldid=prev</id>
		<title>Speleo3: core command</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=AlphaToAll&amp;diff=14539&amp;oldid=prev"/>
		<updated>2019-02-25T10:45:56Z</updated>

		<summary type="html">&lt;p&gt;core command&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:45, 25 February 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'' '''alphatoall''' (all lower case) is a core command since PyMOL 1.7.2''&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Overview =&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Overview =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[AlphaToAll]] will expand the alpha-carbon property that you specify to all atoms in the residues.  For example, if you set the b-factor column to some different value for all alpha carbons, this script will propagate those values into all the atoms as well.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[AlphaToAll]] will expand the alpha-carbon property that you specify to all atoms in the residues.  For example, if you set the b-factor column to some different value for all alpha carbons, this script will propagate those values into all the atoms as well.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=AlphaToAll&amp;diff=6324&amp;oldid=prev</id>
		<title>Pyadmin: 4 revisions</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=AlphaToAll&amp;diff=6324&amp;oldid=prev"/>
		<updated>2014-03-28T01:48:51Z</updated>

		<summary type="html">&lt;p&gt;4 revisions&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:48, 28 March 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Pyadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=AlphaToAll&amp;diff=6323&amp;oldid=prev</id>
		<title>Speleo3: make multi-chain safe and support multiple properties</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=AlphaToAll&amp;diff=6323&amp;oldid=prev"/>
		<updated>2011-11-03T12:39:09Z</updated>

		<summary type="html">&lt;p&gt;make multi-chain safe and support multiple properties&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Overview =&lt;br /&gt;
[[AlphaToAll]] will expand the alpha-carbon property that you specify to all atoms in the residues.  For example, if you set the b-factor column to some different value for all alpha carbons, this script will propagate those values into all the atoms as well.&lt;br /&gt;
&lt;br /&gt;
'''In the example below, notice the color of the sticks.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&amp;lt;gallery heights=&amp;quot;200px&amp;quot; widths=&amp;quot;400px&amp;quot;&amp;gt;&lt;br /&gt;
Image:Alphac0.png|The alpha carbon here has a color property that does not match the rest of the residue.&lt;br /&gt;
Image:Alphac1.png|This script will fix that, expanding the color attribute to the rest of the atoms.&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Usage =&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# expand propertyName in objName on all the alpha carbons&lt;br /&gt;
# to every atom, for each residue&lt;br /&gt;
alphaToAll objName, propertyName&lt;br /&gt;
&lt;br /&gt;
# Example #1&lt;br /&gt;
# For all objects, for each residue, set every atom's b-column value&lt;br /&gt;
# to match that residue's alpha carbon's b-column value.&lt;br /&gt;
alphaToAll *, b&lt;br /&gt;
&lt;br /&gt;
# Example #2&lt;br /&gt;
# For selection 1qox and c. A expand the alpha carbon&lt;br /&gt;
# colors to all atoms in the selection&lt;br /&gt;
alphaToAll 1qox and c. A, color&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= The Code =&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from pymol import cmd, CmdException&lt;br /&gt;
&lt;br /&gt;
def alphaToAll(sel, col=&amp;quot;b&amp;quot;,forceRebuild=False):&lt;br /&gt;
	&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
	alphaToAll -- expand any property of the alpha carbons to all atoms in the residue&lt;br /&gt;
	&lt;br /&gt;
	PARAMS&lt;br /&gt;
		sel&lt;br /&gt;
			The selection or object (include &amp;quot;*&amp;quot; for all objects) to operate on.  This will&lt;br /&gt;
			read the alpha carbon's &amp;quot;COL&amp;quot; property and expand that down to all atoms in the&lt;br /&gt;
			given residues in sel.&lt;br /&gt;
			&lt;br /&gt;
		col&lt;br /&gt;
			Any valid PyMOL property.  For example, 'b' or 'q' or 'color', etc.&lt;br /&gt;
			DEFAULT: b, for B-factor as we most often overwrite that column&lt;br /&gt;
			&lt;br /&gt;
		forceRebuild&lt;br /&gt;
			If a color changes, this will rebuild the objects for us.  For speed, we&lt;br /&gt;
			DEFAULT this to False.&lt;br /&gt;
			&lt;br /&gt;
	RETURNS&lt;br /&gt;
		None, just epxands the properties as dicsussed above.&lt;br /&gt;
		&lt;br /&gt;
	NOTES&lt;br /&gt;
		This script is useful for instances where we update the b-factor column for the&lt;br /&gt;
		alpha carbons and then want to expand that color to all atoms for smoother looking&lt;br /&gt;
		images.&lt;br /&gt;
		&lt;br /&gt;
	AUTHOR:&lt;br /&gt;
		Jason Vertrees, 2009.&lt;br /&gt;
			&lt;br /&gt;
	&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
	col = '(' + ','.join(col.split()) + ')'&lt;br /&gt;
	space = {'props': dict()}&lt;br /&gt;
	cmd.iterate('byca (%s)' % (sel), 'props[model,segi,chain,resi] = ' + col, space=space)&lt;br /&gt;
	cmd.alter(sel, col + ' = props.get((model,segi,chain,resi), ' + col + ')', space=space)&lt;br /&gt;
	if forceRebuild != False:&lt;br /&gt;
		cmd.rebuild(sel)&lt;br /&gt;
&lt;br /&gt;
cmd.extend(&amp;quot;alphaToAll&amp;quot;, alphaToAll)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library]]&lt;br /&gt;
[[Category:ObjSel_Scripts]]&lt;/div&gt;</summary>
		<author><name>Speleo3</name></author>
	</entry>
</feed>