The following combines the target-defining functions of Chimera1 namesel and alias (the action-defining function of alias will be split off into a separate command).
It's written up as alias below, but in Oct 2015 discussions it was decided it should be namespec instead, with currentonly option (default false).
The alias command defines a convenient target-name to be used as a synonym for spec (typically a longer specification string) in subsequent commands. Alternatively, the current keyword can be used to define target-name as the contents of the current selection. I chose current since I imagine the spec could contain sel, selected, or picked. Subsequent occurrences of target-name (space- and/or semicolon-delimited) in commands will be translated to the corresponding items. See also: macro
Definition with the current keyword includes only the selection contents, not the process by which the selection was generated, and is not affected by subsequent changes in what is selected. For example, if a selection of all protein oxygens in a particular structure is defined as a target, that target will not include the oxygens of other proteins, nor will it include anything else that is later selected. To always assign target-name as protein oxygens, a spec (e.g., protein&O) should be used instead. Further, a spec could even include sel, selected or picked to track the changing selection.
Aliases (user-defined target names) are saved in sessions. The alias command without arguments shows the expansions of all spec-defined aliases, and the expansion of any individual alias of that type can be shown with alias target-name. I was guessing you couldn't show the definitions of the named selections.
The command ~alias without arguments deletes all aliases, whereas a specific alias can be deleted with ~alias target-name.
Avoid inadvertently embedding semicolons in an alias. For example, the following will not do anything because the entire line is interpreted as simply creating the alias:
alias others ligand | ions | solvent; color others redIn this example, the alias and color commands should be on separate lines.