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

**URL:** <https://discuss.avogadro.cc/t/avogadro-1-94-win-10-insert-fragment-doesnt-work-insert-smiles-malfunctions/3544>\
**Category:** Support\
**Created:** [June 24, 2021, 11:09am UTC](https://discuss.avogadro.cc/t/avogadro-1-94-win-10-insert-fragment-doesnt-work-insert-smiles-malfunctions/3544 "2021-06-24T11:09:42Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pietro\_Amodeo](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/pietro_amodeo/32/856_2.png) [@Pietro\_Amodeo](https://discuss.avogadro.cc/u/Pietro_Amodeo)\
**Post date:** [June 24, 2021, 11:09am UTC](https://discuss.avogadro.cc/t/avogadro-1-94-win-10-insert-fragment-doesnt-work-insert-smiles-malfunctions/3544/1 "2021-06-24T11:09:42Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![ghutchis](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/ghutchis/32/456_2.png) [@ghutchis](https://discuss.avogadro.cc/u/ghutchis)\
**Post date:** [June 24, 2021, 6:17pm UTC](https://discuss.avogadro.cc/t/avogadro-1-94-win-10-insert-fragment-doesnt-work-insert-smiles-malfunctions/3544/2 "2021-06-24T18:17:12Z")

</div>

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

> [@Pietro\_Amodeo](#):
>
> “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).

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

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`

> [@Pietro\_Amodeo](#):
>
> “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.

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.

---

<div class="post-metadata">

**Author:** ![Pietro\_Amodeo](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/pietro_amodeo/32/856_2.png) [@Pietro\_Amodeo](https://discuss.avogadro.cc/u/Pietro_Amodeo)\
**Post date:** [June 25, 2021, 1:17pm UTC](https://discuss.avogadro.cc/t/avogadro-1-94-win-10-insert-fragment-doesnt-work-insert-smiles-malfunctions/3544/3 "2021-06-25T13:17:21Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ghutchis](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/ghutchis/32/456_2.png) [@ghutchis](https://discuss.avogadro.cc/u/ghutchis)\
**Post date:** [June 25, 2021, 5:16pm UTC](https://discuss.avogadro.cc/t/avogadro-1-94-win-10-insert-fragment-doesnt-work-insert-smiles-malfunctions/3544/4 "2021-06-25T17:16:51Z")

</div>

> [@Pietro\_Amodeo](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![ghutchis](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/ghutchis/32/456_2.png) [@ghutchis](https://discuss.avogadro.cc/u/ghutchis)\
**Post date:** [June 25, 2021, 5:22pm UTC](https://discuss.avogadro.cc/t/avogadro-1-94-win-10-insert-fragment-doesnt-work-insert-smiles-malfunctions/3544/5 "2021-06-25T17:22:02Z")

</div>

Glad to hear SMILES is working.

> [@Pietro\_Amodeo](#):
>
> OpenBabel minimizations occasionally require hydrogen deletion and addition to work properly.

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

> [@Pietro\_Amodeo](#):
>
> I could find the configuration file where the basic program parameters (background, Python path,…) are stored;

Settings go in the registry on Windows.

> **[QSettings Class | Qt Core | Qt 6.11.1](https://doc.qt.io/archives/qt-5.15/qsettings.html)**
>
> The QSettings class provides persistent platform-independent application settings.

> [@Pietro\_Amodeo](#):
>
> the Download Plugins window shows no plugin, but only the “Update”, “Name”, “Version” and “Description” tags, and the (ineffective) “Downoload Selected” button.

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

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

---

<div class="post-metadata">

**Author:** ![ghutchis](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/ghutchis/32/456_2.png) [@ghutchis](https://discuss.avogadro.cc/u/ghutchis)\
**Post date:** [June 25, 2021, 11:04pm UTC](https://discuss.avogadro.cc/t/avogadro-1-94-win-10-insert-fragment-doesnt-work-insert-smiles-malfunctions/3544/6 "2021-06-25T23:04:19Z")

</div>

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](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. 🙂

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

---

<div class="post-metadata">

**Author:** ![Pietro\_Amodeo](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/pietro_amodeo/32/856_2.png) [@Pietro\_Amodeo](https://discuss.avogadro.cc/u/Pietro_Amodeo)\
**Post date:** [June 26, 2021, 12:25am UTC](https://discuss.avogadro.cc/t/avogadro-1-94-win-10-insert-fragment-doesnt-work-insert-smiles-malfunctions/3544/7 "2021-06-26T00:25:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ghutchis](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/ghutchis/32/456_2.png) [@ghutchis](https://discuss.avogadro.cc/u/ghutchis)\
**Post date:** [June 26, 2021, 2:08am UTC](https://discuss.avogadro.cc/t/avogadro-1-94-win-10-insert-fragment-doesnt-work-insert-smiles-malfunctions/3544/8 "2021-06-26T02:08:22Z")

</div>

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

> [@Pietro\_Amodeo](#):
>
> However, now SMILES strings always result in overlapped atoms, although Open Babel minimization of fragments or molecules works.

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

> [@Pietro\_Amodeo](#):
>
> However I hope to be helpful in debugging the Windows version of Avogadro.

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…

---

<div class="post-metadata">

**Author:** ![Pietro\_Amodeo](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/pietro_amodeo/32/856_2.png) [@Pietro\_Amodeo](https://discuss.avogadro.cc/u/Pietro_Amodeo)\
**Post date:** [June 26, 2021, 7:40am UTC](https://discuss.avogadro.cc/t/avogadro-1-94-win-10-insert-fragment-doesnt-work-insert-smiles-malfunctions/3544/9 "2021-06-26T07:40:37Z")

</div>

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.
