This is a read-only mirror of pymolwiki.org
Difference between revisions of "Get Names"
Jump to navigation
Jump to search
m (moved Get Names to Get Names of Type) |
|||
Line 17: | Line 17: | ||
===SEE ALSO=== | ===SEE ALSO=== | ||
− | [[get_type]], [[count_atoms]], [[count_states | + | [[get_type]], [[count_atoms]], [[count_states]] |
[[Category:Commands|Get Names]] | [[Category:Commands|Get Names]] |
Revision as of 18:16, 1 March 2012
get_names_of_type returns a list of object and/or selection names.
PYMOL API
cmd.get_names_of_type( [string: "type"] )
NOTES
The object types are strings such as "object:molecule" for a molecule type and "object:map" for a map.
EXAMPLES
Truncate names of all molecules
# Get names for all molecules.
for x in cmd.get_names_of_type("object:molecule"): cmd.set_name(x,x[:5])