This is a read-only mirror of pymolwiki.org

Difference between revisions of "Index"

From PyMOL Wiki
Jump to navigation Jump to search
 
m
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
===DESCRIPTION===
 
===DESCRIPTION===
+
'''index''' returns a list of tuples corresponding to the object name and index of the atoms in the selection.
  "index" returns a list of tuples corresponding to the
+
 
  object name and index of the atoms in the selection.
 
 
 
===PYMOL API===
 
===PYMOL API===
<source lang="python">  
+
<source lang="python">
  list = cmd.index(string selection="(all)")
+
list = cmd.index(string selection="(all)")
</source>
+
</source>
  
 
===NOTE===
 
===NOTE===
+
Atom indices are fragile and will change as atoms are added or deleted.  Whenever possible, use integral atom identifiers instead of indices.  
  Atom indices are fragile and will change as atoms are added
 
  or deleted.  Whenever possible, use integral atom identifiers
 
  instead of indices.  
 
  
[[Category:Commands|index]]
+
[[Category:Commands|Index]]

Revision as of 14:06, 20 June 2009

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.