Hi Virginia, The Selector Construction panel could probably stand some interface improvements for sure. "Existing Selection" has nothing to do with what's selected in the Chimera window as you construct the selector. "Existing Selection" grabs whatever is selected in the Chimera window when the selector is used (either by choosing the selector from Chimera's Select menu, of invoking it from the Select region of the construction panel) -- so it can be a different selection every time it is used. Anyway, you can ignore that because it doesn't really help you with your problem. There is no easy way to select all lysines within 8 angstroms of another lysine in Chimera, so you were on the right track with trying to construct a selector, but it requires actually putting some custom Python code in your selector since you need to loop over lysine residues individually in order to get what you want. So open the Selector Construction panel, pick "Show workbench selector contents" in the Panels menu, and paste in: from chimera import specifier sel.merge(selection.REPLACE, specifier.evalSpec(":LYS")) nearRes = [] sel2 = selection.ItemizedSelection() for r in sel.residues(): sel2.clear() sel2.add(r) sel2.merge(selection.REPLACE, specifier.zone(sel2, specifier.ATOM, None, 8.0, models)) selRes = [sr for sr in sel2.residues() if sr.type == "LYS"] selRes.remove(r) nearRes.extend(selRes) sel.clear() sel.add(nearRes) Since the remailer for this list may break long lines, I've also attached the above as a file. If you are using the X11 version of Chimera for the Mac, pasting in the text is tricky -- if you're using that let me know and I can send instructions about how to get the pasting to work. --Eric  On Oct 30, 2007, at 10:50 AM, Virginia Pett wrote:
Eric, Yes, my ultimate goal is more complicated than the examples that I gave. I would like to find all the Lys residues in the structure that are less than 8 Å apart from each other. After several hours of frustration with the Selector Construction Panel, I decided to try a simpler question in order to test whether I was using the Workbench correctly and to test whether any information was being saved.
I may not have understood your reply correctly. Here is what I tried just now. I selected all atoms NZ (@NZ). THEN I invoked the Selector Construction Panel. (In my previous experiments, the Construction Panel had been invoked before I made the selection in the main window.) Then I proceeded as before, in the Selector Construction Panel: Workbench, Load from current. The Status panel shows workbench content: Existing Selection. Then Workbench, Save, as All NZ atoms, for example. However, as before, when I go back to the main window, Select, Clear Selection and then Select All NZ atoms, there is nothing selected.
Virginia
On 10/25/07 7:56 PM, "Eric Pettersen" <pett@cgl.ucsf.edu> wrote:
Hi Virginia, Perhaps you could describe what your ultimate goal here is -- there may be an easier way to achieve it than by constructing a custom selector. But in regards to your problem, for the purposes of selector construction the "Existing Selection" isn't what is selected at that instant -- it's what's selected at the time the selector is invoked from Chimera's Select menu. This allows you to build selectors that intersect the peptide backbone with the current selection for example. If you want to make a selector that simply holds what's currently selected, use the Name Selection... entry in Chimera's Select menu. That creates a selector under Named Selections in the Select menu, and will also be remembered in saved sessions.
--Eric
Eric Pettersen
UCSF Computer Graphics Lab
pett@cgl.ucsfedu
On Oct 25, 2007, at 2:22 PM, Virginia Pett wrote:
Hello, There is a difficulty with the Selector Construction Panel. I make a selection in the main window, such as chain A or atom @NZ. The Inspect Selection panel shows that I have made a selection. Then in the Selector Construction Panel: Workbench, Load from current. The Status panel shows workbench content: Existing Selection. Then Workbench, Save, as chain A, for example. However, when I go back to the main window, Select, Clear Selection and then Select, chain A, there is nothing selected.
I downloaded the latest version of Chimera for Mac OS X a few days ago (chimera-1.2422-osx_x11.dmg). I’m running it on a PowerBook G4 with Mac OS X (10.4.10). Virginia _____________________________________________________
Virginia B. Pett Professor of Chemistry Department of Chemistry, The College of Wooster 943 College Mall, Wooster, OH 44691 Telephone: 330-263-2114 Fax: 330-263-2386
_______________________________________________ Chimera-users mailing list Chimera-users@cgl.ucsf.edu http://wwwcgl.ucsf.edu/mailman/listinfo/chimera-users
_____________________________________________________
Virginia B. Pett Professor of Chemistry Department of Chemistry, The College of Wooster 943 College Mall, Wooster, OH 44691 Telephone: 330-263-2114 Fax: 330-263-2386