Aligning molecules and dummy atoms

Some useful features to implement would be making it easier to add dummy atoms to specific positions for geometry optimizations and scans. Currently the only one to do it in avo1 (to the best of my knowledge) is to add a He atom, then use the measure tool, and drag the atom around until every angle and distance is correct. What could make it alot easier is the ability to select an atom and reset it to have xyz coordinates 0,0,0. and a second atom and align directly to a specific axis. This can be done when building a molecule with the cartesian editor, but after performing a geometry optimization alot times the atoms get moved off of the axis and i want to be able to add further dummy atoms without changing any of the internal coordinates. An additional small note, in avo2 the measurements from the measure tool dissappear when switching to the manipulation tool, which is not ideal, I like the way avo1 kept them.

An additonal tool that I would love is the ability to add atoms to specific positions relative to other atoms. To be able to select two atoms and place a third such that its at a certain angle and distance using one of the atoms as a vertex. Or select three atoms to define a plane and add a fourth using a plane and a vertex from the selected three atoms.

Sure all of this is possible with the cartesian editor, but that means doing alot of trig and that is more tedious than I would like haha.

Final idea. To be able to click on the red-gren-blue axis arrows in the bottom left to align an axes vertically and horizontally so it is possible to make clean 90 degree rotations as well as a dummy atom or nucleus only atom to the periodic table.

This is exactly the align tool: Align Tool - Avogadro

Interesting idea. This sounds more like a menu command than a tool, but I definitely see the use case. At one point, we had an idea for a “z-matrix tool” that worked a bit like this.

I’m not sure I quite understand. You want to click the arrows to align the camera view… how does that connect with making rotations? If you want to make specific angle rotations, you can do that in the manipulate tool:

I recently wrote a python script that takes in an XYZ file for a molecule along with two atoms for alignment, and then aligns the molecule (sets the two atoms exactly on the Z axis, the rest of the molecule is moved to preserve the coordinates). After that my program creates a duplicate of the original molecule and reflects it along with a 180 degree rotation. This code was written to specifically make input files for NEB calculations of proton transfer, but I imagine that the core principles are similar to the sort of thing you’re asking for. If you want I can look into making the code a bit more generalized, and perhaps send over a copy of it for you to play around with. (It is all in python, and currently there are only a handful of lines that don’t have comments explaining what they do. If you do want me to send it over then I can work on finishing my documentation for that program!)

1 Like

And actually, it’d be pretty easy to take a program like this and make it into a plugin :wink:

Just add boxes for selecting the atoms for alignment:
https://two.avogadro.cc/develop/scripts/interface.html