UI Feedback => Import Molecules

There are a bunch of ways to import full molecules in Avogadro.

With the template tool and “click to add functional groups”, the menu item for Build => Insert => Fragment is probably poorly named.

But should we move it anyway?

Should it be under File => Import => Molecule… much like File => Import => Crystal…

Thoughts? Suggestions?

I think the move makes sense, with some caveats.

My personal feeling would be that under File > Import the user would expect to find only complete objects, and under Build parts of objects, things to add, methods to edit and generate structures. The DNA generator definitely belongs under Build for example.

With that as a guiding principle I think the answer is it depends.

Currently, Insert > Fragment/Molecule adds it to the current molecule, which is something that makes sense under Build.

I would say this isn’t ideal though as it often overlaps with any structure that has already been built, and the user doesn’t have any control where it gets placed. So in my opinion, if the current view is not empty then the inserted molecule should instead be placed in a new view under “Molecules” (as in, the pane next to Layers), akin to when a file is opened. With that (imo improved) behaviour, it would make most sense to have it under File > Insert > Molecule.

This would be, as you said, by analogy with Insert > Crystal, which doesn’t add to the current view, it replaces whatever is in it.

How about then also adding a fourth tab to the Template tool next to Centers, Ligands, and Groups – for discrete Molecules?

The available structures could simply be the same as under Insert > Molecule, but the molecule would be added rather than replace/start a new view. They would work like Centers i.e. only appear when the user clicks on the 3D view, and the new molecule would be placed with its centre at the location of the click.

This would allow for really nice, speedy addition of e.g. solvent molecules as the user could just click multiple times at the desired locations!

I think that’s better suited for a different feature, either through CREST or AutoSolvate or a new tool.

I want to be really careful about stuffing too many features into one tool. When you look at graphics programs or Blender, etc. … they have lots of tools.

I agree with you, tools below File → Import are a search (in a database) and subsequent replace of a current structure by a new one. The provision of a functional group aims to further modify an already existing structure, to retain the result of (continued) building of a molecule. I equally support the idea it were an approach welcome if eventually one could include discrete molecules (e.g., .sdf format) which will not enter the official template set. In a way like “join (user defined) fragments” in ChemDraw.

With e.g. a pdb already generated by Avogadro, there would be external tools like blendmol, or atomic blender the manual may cross-reference. I speculate a note in the documentation is sufficient, and an additional implementation into the program is not necessary.

My point wasn’t that we need “export to Blender” because there are already a few tools, and export to VRML works fairly well.

My point was that Avogadro has tended to have few tools that somehow attempt to do many things. But other programs might have a few different selection tools (e.g., select by atom, select rectangle, select lasso, etc.)

So I’d like to be careful about jamming in “click to insert a bunch of solvent molecules” into the new template tool. To me, it sounds like a new tool, even though it’s similar.

I guess I’m not sure what you mean. You want to add a set of “my favorite molecules” beyond the official set? Probably easier to add this as a separate command “Insert => My Library” or something like that.

I mean I just meant that since it is possible to select a functional group and then place it wherever the user clicks, and it is also possible to do that with metal centres, why not also have it for molecules that don’t attach to an existing structure, since the set of cjson files is already built in.

The solvent thing was purely an example, not an idea for a whole new feature – an example of the sort of situation in which a user might want to add the same molecule twice, and therefore a situation in which doing the sequence Build > Insert > Molecule > (find molecule in menu) > Insert > (move to desired location) would become tedious.

The creation of any ensemble of multiple copies of a common molecule would be quicker this way than building the structure manually followed by repeated copy and paste, as every new copy has to be moved after creation.

I understand the use case. I’m just pointing out that stuffing it into an existing tool doesn’t feel like a great idea, IMHO. I’m not thrilled by separating “groups” into a separate tab because I actually hate tabbed UI. It makes a bit of sense though.

Here’s ChemDraw … note that several of these tools actually bring up a few options.

“Click to insert molecule” seems great. And it’s similar to the template tool in terms of action. But it doesn’t need to be stuffed into the same tool.

Right now, we have 10 tools on the toolbar (vs. ~36 for ChemDraw)

I can see an “Insert Molecule” (or solvent) tool… Or having the template tool = metals / ligands and having a new tool that’s functional groups and separate molecules.

I’m just saying if anything, I’d rather have more tools than jamming features into the same tools.

I see, fair enough. Not sure I share your hate of tabs, but yeah, maybe splitting them into a complex tool and a molecular tool would make more sense than making the scope of the current tool too broad.

In any case, for the original question, I feel importing a molecule belongs under File, and that it shouldn’t be added to the view, it should replace it or open a new view. Ideally opening a file, importing a crystal, or importing a molecule would all open new entries in the molecule “dock”.