Mouse selection tool inoperable (Windows 11 and MacOS)

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

  1. Open PDB
  2. Click on Selection Tool on the toolbar
  3. 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! :slight_smile:

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: