This is a read-only mirror of pymolwiki.org
Difference between revisions of "Get Names"
Jump to navigation
Jump to search
m |
|||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
===DESCRIPTION=== | ===DESCRIPTION=== | ||
| − | + | '''get_names''' returns a list of object and/or selection names. | |
| − | + | ||
===PYMOL API=== | ===PYMOL API=== | ||
| − | + | <source lang="python"> | |
| − | + | cmd.get_names( [string: "objects"|"selections"|"all"] ) | |
| − | + | </source> | |
| − | + | ||
===NOTES=== | ===NOTES=== | ||
| − | + | The default behavior is to return only object names. | |
| − | + | ||
| + | === EXAMPLES === | ||
| + | Multiple alignments | ||
| + | <source lang="python"> | ||
| + | # structure align all proteins in PyMOL to the protein named "PROT". Effectively a | ||
| + | # poor multiple method for multiple structure alignment. | ||
| + | for x in cmd.get_names("*"): cealign( "PROT", x) | ||
| + | </source> | ||
| + | |||
===SEE ALSO=== | ===SEE ALSO=== | ||
| − | + | [[Cmd get_type]], [[Cmd count_atoms]], [[Cmd count_states]] | |
| − | + | ||
| − | [[Category:Commands| | + | [[Category:Commands|Get Names]] |
Revision as of 14:02, 20 June 2009
DESCRIPTION
get_names returns a list of object and/or selection names.
PYMOL API
cmd.get_names( [string: "objects"|"selections"|"all"] )
NOTES
The default behavior is to return only object names.
EXAMPLES
Multiple alignments
# structure align all proteins in PyMOL to the protein named "PROT". Effectively a
# poor multiple method for multiple structure alignment.
for x in cmd.get_names("*"): cealign( "PROT", x)