Difference between revisions of "Index"

From PyMOLWiki
Jump to navigation Jump to search
Line 3: Line 3:
  
 
===PYMOL API===
 
===PYMOL API===
<source lang="python">  
+
<source lang="python">
 
list = cmd.index(string selection="(all)")
 
list = cmd.index(string selection="(all)")
 
</source>
 
</source>

Revision as of 14:51, 10 January 2006

DESCRIPTION

index returns a list of tuples corresponding to the object name and index of the atoms in the selection.

PYMOL API

list = cmd.index(string selection="(all)")

NOTE

Atom indices are fragile and will change as atoms are added or deleted. Whenever possible, use integral atom identifiers instead of indices.