Feature request: interactively modify bond length, bond angle and dihedral angle

Other editors like GaussView have a very nice feature which lets you select up to four atoms and modify the associated bond property in a popup window using a slider and/or numerical input field. Since I haven’t found a way to do this in Avogadro2, this would be a great addition to the measurement tool.

If you select two (not necessarily bonded) atoms, and right click / shift click, etc, a popup window should appear with which you are able to adjust the atomic distance interactively. The popup consists of two drop down menues, a slider, a numerical input field, and an OK / Cancel button pair. The left drop down menu is for the 1st atom(ic fragment), the right drop down for the 2nd atom(ic fragment). Both drop down lists consist of the entries “fix atom / fragment”, “move atom” and “move fragment”. If you change the slider (default range 0.5 to 5 Angstrom, initially set to the current atomic distance) or enter a numerical value, the two fragments are interactively moved apart to the specified distance, obeying the settings in the drop down menus. (If both parts are set to move, they move symmetrically.) Once OK is clicked, the popup closes and the new coordinates are applied permanently. If Cancel is clicked, changes are discarded and the previous molecular coordinates are restored.

Analogously, if you select three atoms, a nearly identical dialogue appears in which you can interactively change the angle between the (not neccessarily bonded) three atoms. Which of the fragments move is determined by the drop down menus as before. Naturally, the slider defaults to a range of 0° to 180°, initially set to the value of the current angle.

Similarly, if you select four atoms, the dihedral / torsional angle can be interactively modified. Atoms 2 and 3 specify the atomic axis to rotate around. Which atoms move is again specified by the same drop down menus. The slider defaults to a range of -180° to 180° and is set to the initial value.

@ghutchis BTW: Happy birthday.

You can edit bond distance, angle, and torsion values manually in the Properties tables - as you click on particular rows, the atoms highlight and you can edit as you see fit.

You can similarly interactively adjust these with the bond-centric manipulate tool. What you describe sounds like it might be a better tweak to that tool - rather than dragging to change a torsion or bond length, typing numbers to edit the specific measurements:

You do raise a good point in terms of selecting and editing non-bonded atoms.

Thank you for this explanation.
I would have never searched for this in Analysis->Properties.
Even when displayed, I wouldn’t have guessed, the values are editable.

Still, I know from experience how valueable the described tool is in GaussView, especially given that up to four arbitrary atoms can be used to define the geometry.

With regards to your answer, I am not sure if the suggestion in my 1st post was made exactly clear: By dragging the slider, the geometry is updated immediately and interactively. It is only reverted to its original value once you click Cancel.

So, the sliders are very helpful if you want to explore or visualize the conformational space, want to shape / fold your molecule, or want to position / orient molecules in molecular clusters. Entering a numeric value is fine if you know exactly what you want, but sometimes chemical intuition needs some guidance via look-and-feel and trial-and-error, which is especially true in teaching.

Meanwhile (and based on your suggestion) I had another look at the bond centric manipulation tool. I didn’t notice one can use it to modify (3-atom-)angles, too, by dragging bonds just the right way. To be honest, I had a hard time to figure out how to use it from the tooltip of the symbol alone. Or maybe my train of thought was just blocked. For me it works okay-ish, maybe it just needs some getting-used-to-it, but I still think the popup solution is a) more elegant, b) more precise, c) more general, and d) more intuitive.

Of course, one could use all three methods. Maybe in some cases, bond-centric manipulation feels more natural, and in others the freedom of change via the measure tool is prefered.

At least, now I know how to use the bond centric manipulation tool properly. :smiley:

A way to type a value for a specific bond length or angle while using the bond-centric manipulation tool would not be a bad idea, but for now I’ve also added a tip box to the tool’s page in the docs to point people in the direction of the properties dialogs for setting exact values.

Yes, I can see the benefit of that (e.g., changing the distance between fragments). Let me think if there’s a good way to have the values displayed in the Measure tool become editable (e.g., detect a click down there or type Tab or something).

I’m less sold on the particular popup menu UI in GaussView.

My concern there would be that it adds editing functionality to a tool that doesn’t currently have it, and “Measure Tool” doesn’t give any indication that it would have that functionality.

Here’s an idea for the non-bonded atoms: what about adding the ability to click and drag between two atoms with the Bond-Centric Manipulation Tool to create a sort of “virtual” ghost bond between them?

The same controls could then be used to adjust the bond length, angles etc. as with the tool normally. Most of the same code could be reused because the ghost bond would then act like any other selected bond. The logic of how the fragments at each end act would be the same so would be nice and predictable. It would ideally be translucent or dotted or otherwise distinguished from the real bonds.

And then the ability to set the values to exact numbers can be added to the bond-centric tool as a “tweak”, as suggested, but kills two birds with one stone.

Can the values for the currently selected bond simply be shown in editable boxes in the bond-centric manipulation tool’s tool pane? There’s currently nothing shown in it.