Get names of type

From PyMOLWiki
Jump to: navigation, search

get_names_of_type returns a list of object and/or selection names.

Contents

PYMOL API

cmd.get_names_of_type(string type)

NOTES

The object types are strings such as

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])

SEE ALSO

get_names, get_type, count_atoms, count_states

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox