Select by element, residue name, solvent

Hi,

This is still one the todo wiki page. I’m working on very similar code
to select a ligand, pocket and rest atoms for the docking extention,
shall I do these as well? If yes, how would you like to see this
implemented? All as seperate actions in the manu, or one “Advanced
Select…” option with a dialog to which we could later add more
functionality.

Tim

shall I do these as well? If yes, how would you like to see this
implemented? All as seperate actions in the menu,

Well, if you’re volunteering to implement them, I’ll take you up on
the offer. :slight_smile: I intended to implement these as separate menu actions.
Certainly what you’ve described seems “easy,” not “advanced.”

I think the best thing we can do for ease of use is to implement
things, try them out and continue to refine and improve. I’m sure
we’re bound to try bad interfaces. But so far, as a group, I’ve been
impressed by the detail, polish, and shine in the interfaces.

Cheers,
-Geoff

On Dec 9, 2007 12:37 AM, Geoffrey Hutchison geoff.hutchison@gmail.com wrote:

shall I do these as well? If yes, how would you like to see this
implemented? All as seperate actions in the menu,

Well, if you’re volunteering to implement them, I’ll take you up on
the offer. :slight_smile: I intended to implement these as separate menu actions.
Certainly what you’ve described seems “easy,” not “advanced.”

I’ll add these as separate items, but I was also thinking about making
a dialog where you can manage selections. We could implement this a
QAbstractTable model, similar to the constraints. I’ll probably also
make it possible to just edit the constraints in the table. For the
selections, the columns would be Name, # Atoms, # Bonds, under the
QTable view you would have different ways to add selections, or add
the current selection (made with tool, or with selection item from
menu). A name woulde be assigned automatically “Selection 1”, and so
on…

For the element I was thinking about reusing the periodic table. The
residue name will be a simple QInputDialog and solvent all atoms
residues named HOH. (or do we want code to find these?) Do we also
want a “Select Ions”?, “Select chain”, “???”
There are so many possible items we could add here. Is there a
possibility to hide items from the menu’s so you can only display the
items you use? (or planned)

I think the best thing we can do for ease of use is to implement
things, try them out and continue to refine and improve. I’m sure
we’re bound to try bad interfaces. But so far, as a group, I’ve been
impressed by the detail, polish, and shine in the interfaces.

Yes, it all looks very nice. But are there any guidelines we should
follow, so everything has the same way of doing something. If it gets
out of hand, we could always assign a form designer :slight_smile:

Tim

On Dec 9, 2007 1:20 AM, Tim Vandermeersch tim.vandermeersch@gmail.com wrote:

On Dec 9, 2007 12:37 AM, Geoffrey Hutchison geoff.hutchison@gmail.com wrote:

shall I do these as well? If yes, how would you like to see this
implemented? All as seperate actions in the menu,

Well, if you’re volunteering to implement them, I’ll take you up on
the offer. :slight_smile: I intended to implement these as separate menu actions.
Certainly what you’ve described seems “easy,” not “advanced.”

I’ll add these as separate items, but I was also thinking about making
a dialog where you can manage selections. We could implement this a
QAbstractTable model, similar to the constraints. I’ll probably also
make it possible to just edit the constraints in the table. For the
selections, the columns would be Name, # Atoms, # Bonds, under the
QTable view you would have different ways to add selections, or add
the current selection (made with tool, or with selection item from
menu). A name woulde be assigned automatically “Selection 1”, and so
on…

It would also be possible to set the color for the selection etc…,
not sure how to do this with the engine. Here is a small video preview
for the docking extension. It would look much better if we were able
to render different selections with different engines and different
colors tough. But I think it show that it is really easy to do
certain things in avogadro, no input files with dufficult syntax, …

http://home.scarlet.be/timvdm/docking2.zip (15MB)

The create ligand from residue function allready does what we want for
the select residue action. So I can just copy it…

As a general note: I really like programming in Qt, it was a bit scary
at the beginning :-), but it allows you to implement really nice
features with ease. If avogadro continues to develop like this it will
become a very powerfull tool I think.

For the element I was thinking about reusing the periodic table. The
residue name will be a simple QInputDialog and solvent all atoms
residues named HOH. (or do we want code to find these?) Do we also
want a “Select Ions”?, “Select chain”, “???”
There are so many possible items we could add here. Is there a
possibility to hide items from the menu’s so you can only display the
items you use? (or planned)

I think the best thing we can do for ease of use is to implement
things, try them out and continue to refine and improve. I’m sure
we’re bound to try bad interfaces. But so far, as a group, I’ve been
impressed by the detail, polish, and shine in the interfaces.

Yes, it all looks very nice. But are there any guidelines we should
follow, so everything has the same way of doing something. If it gets
out of hand, we could always assign a form designer :slight_smile:

Tim

On Dec 8, 2007, at 7:20 PM, Tim Vandermeersch wrote:

solvent all atoms residues named HOH. (or do we want code to find
these?)

This will need to be written as code. You personally may be working
with residues that have nicely named HOH bits. Others (e.g, Donald or
myself) are not so lucky. Solvent molecules do not come tagged. And
solvent may be more than just water. Someone might want to pick from a
set of solvent options.

So I think the best way to handle this is to have a popup menu of
solvent options and these get translated into SMARTS, plus some code
to make sure the SMARTS matches a solvent molecule, rather than
something inside a larger molecule.

possibility to hide items from the menu’s so you can only display the
items you use? (or planned)

One of my original ideas was that you’d have “selection plugins.”
Donald convinced me that you could do this inside the Extension
framework. But I suspect we’ll want to split out multiple extensions
and let people turn them on and off.

Yes, it all looks very nice. But are there any guidelines we should
follow, so everything has the same way of doing something. If it gets
out of hand, we could always assign a form designer :slight_smile:

I don’t think we’ve gotten to the point of writing guidelines.
Sometimes it helps to work on enough functionality that you’ve tried a
few things that work and a few things that don’t work. We should write
up some guides pretty soon, though.

Cheers,
-Geoff