<?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=Jkrausuwc</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=Jkrausuwc"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php/Special:Contributions/Jkrausuwc"/>
	<updated>2026-08-23T16:45:35Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Alter&amp;diff=737</id>
		<title>Alter</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Alter&amp;diff=737"/>
		<updated>2008-04-22T20:07:00Z</updated>

		<summary type="html">&lt;p&gt;Jkrausuwc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===DESCRIPTION===&lt;br /&gt;
'''alter''' changes one or more atomic properties over a selection using the python evaluator with a separate name space for each atom.  The symbols defined in the name space, which are are explained in [[Iterate]] are:&lt;br /&gt;
 name, resn, resi, chain, alt, elem, q, b, segi,&lt;br /&gt;
 type (ATOM,HETATM), partial_charge, formal_charge,&lt;br /&gt;
 text_type, numeric_type, ID, vdw&lt;br /&gt;
&lt;br /&gt;
All strings must be explicitly quoted.  This operation typically takes several seconds per thousand atoms altered.&lt;br /&gt;
&lt;br /&gt;
'''WARNING''': You should always issue a '''sort''' command on an object&lt;br /&gt;
after modifying any property which might affect canonical atom&lt;br /&gt;
ordering (names, chains, etc.).  Failure to do so will confound&lt;br /&gt;
subsequent &amp;quot;create&amp;quot; and &amp;quot;byres&amp;quot; operations.&lt;br /&gt;
&lt;br /&gt;
===USAGE===&lt;br /&gt;
 alter (selection),expression&lt;br /&gt;
&lt;br /&gt;
===EXAMPLES===&lt;br /&gt;
&lt;br /&gt;
* Change chain label and residue index&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
 alter (chain A),chain='B'&lt;br /&gt;
 alter (all),resi=str(int(resi)+100)&lt;br /&gt;
 sort&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Change van der Waals radius of a given atom&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
alter (name P), vdw=1.90&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Note that is if dots, spheres, mesh or surface representation is used. You have to refresh the view with&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
rebuild&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Renumber the amino acids in a protein, so that it starts from 0 instead of its offset as defined in the structure file.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# The first residue in the structure file for 1cll is 4.  To change this to 0, maybe to match scripts&lt;br /&gt;
# outputted from other programs, just remove the offset of 4 from each atom&lt;br /&gt;
alter 1cll, resi=str(int(resi)-4)&lt;br /&gt;
# refresh (turn on seq_view to see what this command does).&lt;br /&gt;
sort&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SEE ALSO===&lt;br /&gt;
[[Alter_State]], [[iterate]], [[Iterate_State]], [[sort]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|alter]]&lt;/div&gt;</summary>
		<author><name>Jkrausuwc</name></author>
	</entry>
</feed>