I believe this to be a bug with Avogadro
Environment Information
Avogadro version: Official Version 1.100 (Win 11 and Mac) and Windows Nightly build 1.100.0-7-gac3f38f
Operating system and version: Win 11 and Mac OS 14 Sanoma
Expected Behavior
The Mouse click and drag selection tool should capture only the atoms within the drawn area.
Actual Behavior
Using the atom selection tool from the tool bar, left-click drag a subset of atoms. One of the following happens:
- faisl to select any atoms
- select all atoms within a chain rather than the subset of atoms within the drawn area.
I managed to get it working once, on the first open immediately after installation. Subsequent uses of Avogadro have resulted in the strange selection behaviour noted above.
Steps to Reproduce
- Open PDB
- Click on Selection Tool on the toolbar
- Left-click drag a selection ārectangleā over a subset of atoms.
Thanks. Itās a great tool. I appreciate the hard work and support.
Even though you only mention it in the steps section I assume this is only after opening a PDB?
In which case, can you please upload an example PDB file that the bug definitely occurs with?
I double-checked, and when selecting part of the structure, the whole structure was selected. It also happens that none of the structure is selected. Iāve tried several PDB files, and the behaviour is the same. Iāve added a file Iām keen to work on. Please let me know if you have access issues:
Thanks, I always appreciate the support.
Thanks. On Linux I canāt reproduce the issue, selection works as expected with that file. I donāt have the ability to test on Windows or Mac right now unfortunately.
If you could upload your Avogadro config file it might be useful, to see if anything in there is playing a role?
Thanks for looking into this. Iāve uploaded the Avogadro2.log file if that helps; donāt know if this is the same as a config file - I went looking for one, and couldnāt find it.
Youāll notice in the log file Avogadro2 is complaining about a missing python interpreter. Itās definitely there, and it definitely works! I even made a āpython3.exeā copy of the installed āpython.exeā, but that made no difference. Python is in the Windows PATH environment variable.
It would appear Avogadro2 is not reading the Python from the Windows Path environment variable.
So I recreated the directory structure āC:/hostedtoolcache/windows/Python/3.11.9/x64/python3.exeā which is part of the warning in the log file. Then, Avogadro2 boots, runs, and there is no longer a complaint of a missing python interpreter.
Despite Avogadro2 on Windows now seeing the Python interpreter (by recreating what might be a hardcoded directory location), itās made no changes to my original issues, and the mouse selection is still not working.
I hope that helps! 
Thanks for the log, thatās also helpful (though it doesnāt afford any insight here).
Iām not 100% sure where the config file is on non-Linux systems but I imagine it is at either
C:/Users/<USER>/AppData/Local/OpenChemistry/Avogadro.conf
or
C:/Users/<USER>/AppData/Local/OpenChemistry/Avogadro/Avogadro.conf
For reference the default is pretty bare and contains only
[MainWindow]
BallStick=true
Cartoons=true
CloseContacts=false
Dipole=false
Force=false
Label=false
Licorice=false
Meshes=false
NonCovalent=false
VanDerWaals=false
Wireframe=false
[overlayAxes]
enabled=true
[templatetool]
ligandType=0
I canāt find the thread now but I believe someone else had a similarly spurious warning message popping up when they also had Python working perfectly fine. I wouldnāt worry about it unless something Python-related isnāt working. (You can check this a few ways, for example by seeing how many items are in the Input
menu ā when Python is correctly set up with Python it should have 15+ by default, otherwise there are only a handful.)
In any case, Python is only relevant for plugins, which the tools have nothing to do with, so your issue isnāt to do with that.
Thanks for the reply. Iām using Windows and a Mac. I am travelling today, so I only have access to my Mac. The issue with the selection tool applies to both operating systems. Iāll continue looking for the conf file on my Windows machine when Iām back home. Meanwhile, I understand you are using Linux, but by any chance might you know where the file is on a Mac? Iāve run several āfindā commands, but the file is not making itself known!
For example:
find / -type f -name āvogadro.confā 2>/dev/null
Should be in the location provided by QStandardPaths::AppConfigLocation
(or possibly QStandardPaths::ConfigLocation
) which according to the Qt documentation points to ~/Library/Preferences/<APPNAME>
.
It might just be at the top level ~/Library/Preferences/Avogadro.conf
, it might be in an Avogadro
folder there, it might be under OpenChemistry
, I donāt know exactly.
Thanks for the reply. Iāve had a look. Sadly, that location contains ācom.apple/microsoftā¦plistā files. Not a single conf file or any files related to Avogadro or OpenChemistry. I appreciate you are using Linux.
Iām returning home shortly. I will have a look at the Windows machine. Providing one of these works, Iāll be happy. Iām building denovo structures, and Iāve found Avogadroās protein manipulation and minimisation functionality indispensable for some tasks.
1 Like
Not sure why you think you need to remove the settings on a Mac. Itās in ~/Library/Preferences/org.openchemistry.Avogadro.plist
Hi Ghutchis; thanks for posting. Iām not sure who you are replying to regarding removing settings on the Mac. I might have missed a detail in this thread.
Iām a structural biologist and not a software dev. Iām not sure what information you need for me to get to the bottom of the selection tool not working in either Windows or Mac.
I found the *.plist buried deep within my Mac. Thank you for the exact file name. The Mac Finder search wasnāt finding it, but the terminal āfindā command did. Unfortunately, I canāt link the file here; I was notified that my post had been flagged as āspamā when I tried. Are you able to āacceptā the post from your side?
Thank you.
I asked to see the config file, the intention is not to remove it. I was just interested to see if there were any non-default settings in play that might be causing the behaviour.
It might be that Windows and Mac has the issue on all machines and Linux doesnāt (which might be due to Qt5 vs Qt6), but until someone else checks if they can reproduce the issue on a Windows or Mac machine I was just trying to identify other potential things that might be common to both of @Anthony_Nashās systems but are different to othersā.
What projection are you using? Under View ā Projection is it Orthographic or Perspective?
Orthographic has a camera bug related to selection, but Perspective should work fine.
I tried both and the result is the same.
Perhaps this might be of interest: dragged-mouse selection behaviour changes depending on the number of chains in the system. For example, if the PDB file contains one chain (A), any dragged-mouse selection of that chain causes the complete chain to be selected (rather than the desired subset). Second scenario, load in a PDB file with two chains (A and B). A subset selection of e.g., chain A, causes the complete chain A to be selected, and vice-versa. A subset selection of a bit of chain A and a bit of chain B, causes the complete selection of both chains.
Hang onā¦ a separate question. What render options are you using right now?
If you turn off the cartoon rendering, does it work? (Since the cartoon renders the whole chain, Iām thinking itās āselectingā the ribbon)
I went through the different render options to test whether there was a graphical bounding box error of sorts. Iāve only been trying ribbon and ball and stick, both fail to make a different in term of mouse-drag selection - itās either the whole chain or nothing.
Iām having a real hard time duplicating this with Projection ā Perspective (on any file including what you posted). Yes, thereās a selection bug with Orthographic. But you said this happens for both projections?
You can see that I dragged a rectangular region of the molecule: