Avogadro 1.94 (Win 10): "Insert fragment" doesn't work ,"Insert SMILES" malfunctions

I believe this to be a bug with Avogadro: unable to correctly process Fragments or SMILES strings

Environment Information

Avogadro version: 1.94.0
Operating system and version:
Windows 10 (64-bit):
Edition: Windows 10 Home - Version: 20H2
Installed on:14/‎03/‎202 - OS Build: 19042.1052
Windows Feature Experience Pack 120.2212.2020.0

Expected Behavior

Inserting a fragment from a library or from a SMILES string

Actual Behavior

“Insert Fragment”: the corresponding dialog window opens but it is not functional (neither lists/menus appear nor text to be searched can be written in the corresponding form field).
“Insert SMILES”: dialog window opens the string is read, but it is translated into a set of n overlapped atoms, where n is the total number of atoms included in the SMILES string.

Steps to Reproduce

  1. Use Build->Insert Fragment (or Insert SMILES) into either a new window or a window already containing a molecule.
  2. Try writing or interacting with either
    2a) the “Insert Fragment” windows (nothing happens) or
    2b) the “Insert SMILES” window (apparently works but all atoms specified in the SMILES string are overlapped).
1 Like

Thanks - I’ve spent the last few days fixing up some Mac packaging issues, so I appreciate knowing about Windows issues.

This seems like the fragments aren’t included in the Windows package. :thinking:

First off, if you use the “Plugin Downloader” and grab the “Molecules,” you should be able to get a working fragment feature.

I’d still like to figure out what happened… If you’re willing to poke around, the Windows data files should be installed to something like:

C:/ProgramData/OpenChemistry or C:/ProgramData/Avogadro or c:/Program Files/OpenChemistry etc.

We’re looking for subdirectories like avogadro2/molecules

Hmm. This implies Open Babel is having trouble creating a geometry. That’s going to be harder to debug. But if you find the avogadro2/molecules directory, there should also be an openbabel/3.1.0 directory in the same spot.

If the data files aren’t there, it might be an easy fix.

Thank you for the reply and your precious suggestions.
In my (unfortunately scarce) spare time I could check some (other) issues under Windows 10 (and NVidia GPU).
“Insert SMILES”:
“Insert SMILES” and other OpenBabel-related operations work with several issues. Insert SMILES works correctly (even when applied multiple times possibly intercalated with manual drawing) if it was the first drawing/build operation after launching Avogadro. OpenBabel minimizations occasionally require hydrogen deletion and addition to work properly.

“Insert Fragment”:
1) I was neither able to find any program data directory in ProgramData or Program Files folders (or even in User/ or User//AppData folders) nor I could find the configuration file where the basic program parameters (background, Python path,…) are stored;
2) the Download Plugins window shows no plugin, but only the “Update”, “Name”, “Version” and “Description” tags, and the (ineffective) “Downoload Selected” button.

Just another unrelated issue: initially (soon after the first installation) the main window background was fully transparent. After setting an opaque bg, the blue halo for selected atoms makes them transparent (I can see the content of underlying windows through the selected atoms). Please, let me know if you prefer a new thread for this issue.

Yes, that would be great.

Glad to hear SMILES is working.

Yes, right now, it will not add / change hydrogens before running minimization.

Settings go in the registry on Windows.

Huh. It should access the network to grab the most recent plugin list at https://avogadro.cc/plugins.json

I’ll have to find a Windows machine to check the installer.

I think this new build should include the molecule fragments. (At least I see them in the installers - I don’t have a Windows machine or VM at home.)

https://github.com/OpenChemistry/avogadroapp/suites/3089254306/artifacts/70566049

I don’t see where the Open Babel bits are, but if you tell me that SMILES (and optimize geometry) work, I’ll trust you. :slight_smile:

Thanks for the help - it’s clear there aren’t many Windows users downloading 1.94 yet…

Thank you for the new build. Fragments now are included and work flawlessly (at least the three I’ve just tested!). They are in Program Files/Avogadro2/share/avogadro2/molecules.
However, now SMILES strings always result in overlapped atoms, although Open Babel minimization of fragments or molecules works.
In the new build minimization worked all the times I used it, while in the 1.94 version sometimes it did nothing at all, or got stuck apparently forever.

I’m still unable to find where working files and configuration file(s) are!

Being a Linux user since its first releases, I only recently switched to Windows as my main laptop OS because of compatibility/interchange issues with my colleagues. However I hope to be helpful in debugging the Windows version of Avogadro.

1 Like

Thanks! Based on your message (and realizing I could examine the Windows installer as a 7zip archive) it was an obvious problem.

Okay, that may be a Windows Open Babel issue. I’ll look into that - might take a while.

That would be tremendously useful.

As far as configuration, I’ll look into it. The Qt documentation is a little bit short on the subject. IIRC there’s a way to force Qt to use a file even on Windows, but I’ll need to check on that…

Insert SMILES: For the sake of completeness, only (overlapped) heavy atoms and corresponding bonds are created. After manually editing coordinates and adding hydrogens, the system is correctly minimized.

Open Babel minimization: when overlapped atoms or other anomalies (heavily distorted geometries, bad hydrogen distributions) are present, the minimization get stuck for seconds to forever, producing no change in geometry.