<?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=Get_chains</id>
	<title>Get chains - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pymol.org/index.php?action=history&amp;feed=atom&amp;title=Get_chains"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Get_chains&amp;action=history"/>
	<updated>2026-05-05T03:54:20Z</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=Get_chains&amp;diff=7413&amp;oldid=prev</id>
		<title>Pyadmin: 5 revisions</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Get_chains&amp;diff=7413&amp;oldid=prev"/>
		<updated>2014-03-28T02:00:48Z</updated>

		<summary type="html">&lt;p&gt;5 revisions&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
This command will return a python list of chains for the given selection.&lt;br /&gt;
&lt;br /&gt;
Proteins structures often have more than one chain of residues present in a structure file.  This command will fetch the names of each chain present.  Because of the lack of standards, sometimes chain A will also be blank &amp;quot;&amp;quot;.  This isn't a problem for PyMOL, but be warned sometimes you may get back, [&amp;quot;&amp;quot;].&lt;br /&gt;
&lt;br /&gt;
= Syntax =&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# using get_chains for the object or selection called objSel&lt;br /&gt;
get_chains objSel&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# examples&lt;br /&gt;
fetch 1cll&lt;br /&gt;
print &amp;quot;1CLL has the following chains:&amp;quot;, cmd.get_chains(&amp;quot;1cll&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# list all chains in all proteins loaded in PyMOL:&lt;br /&gt;
for x in cmd.get_names():&lt;br /&gt;
  for ch in cmd.get_chains(x):&lt;br /&gt;
    print x, &amp;quot; has chain &amp;quot;, ch&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
[[Get_Names]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Get chains]]&lt;/div&gt;</summary>
		<author><name>Pyadmin</name></author>
	</entry>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Get_chains&amp;diff=7411&amp;oldid=prev</id>
		<title>Vinnyrose at 13:34, 20 June 2009</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Get_chains&amp;diff=7411&amp;oldid=prev"/>
		<updated>2009-06-20T13:34:13Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Overview =&lt;br /&gt;
This command will return a python list of chains for the given selection.&lt;br /&gt;
&lt;br /&gt;
Proteins structures often have more than one chain of residues present in a structure file.  This command will fetch the names of each chain present.  Because of the lack of standards, sometimes chain A will also be blank &amp;quot;&amp;quot;.  This isn't a problem for PyMOL, but be warned sometimes you may get back, [&amp;quot;&amp;quot;].&lt;br /&gt;
&lt;br /&gt;
= Syntax =&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# using get_chains for the object or selection called objSel&lt;br /&gt;
get_chains objSel&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# examples&lt;br /&gt;
fetch 1cll&lt;br /&gt;
print &amp;quot;1CLL has the following chains:&amp;quot;, cmd.get_chains(&amp;quot;1cll&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# list all chains in all proteins loaded in PyMOL:&lt;br /&gt;
for x in cmd.get_names():&lt;br /&gt;
  for ch in cmd.get_chains(x):&lt;br /&gt;
    print x, &amp;quot; has chain &amp;quot;, ch&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
[[Get_Names]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands|Get chains]]&lt;/div&gt;</summary>
		<author><name>Vinnyrose</name></author>
	</entry>
</feed>