This is a read-only mirror of pymolwiki.org
Difference between revisions of "Get names of type"
Jump to navigation
Jump to search
(update object types (from ExecutiveGetType)) |
m (1 revision) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 18: | Line 18: | ||
* object:group | * object:group | ||
* object:volume | * object:volume | ||
− | |||
=== EXAMPLES === | === EXAMPLES === |
Latest revision as of 18:49, 14 October 2019
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
- object:map
- object:mesh
- object:slice
- object:surface
- object:measurement
- object:cgo
- object:group
- object:volume
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])