Unble to find a suitable file writer

I believe this to be a bug with Avogadro

Environment Information

Avogadro version:2.0
Operating system and version:Ubuntu 20.04

Expected Behavior

I wanted to write a different PDB file(say j.pdb) from another PDB file(say i.pdb) which should be done normally via OpenBabel converter in Avogadro

Actual Behavior

When trying to actually export the molecule after building it, the screen pops up “Unable to find a suitable file writer for selected format”.sort of like this

The screen output is something like thishttps://discuss.avogadro.cc/t/avogadro-1-93-0-export-molecule-does-not-work/3177/5?u=pallavsen007

Steps to Reproduce

Install avogadro using apt-get(Ubuntu), build a methane molecule and try to export and save it in PDB format.

Please upload files if appropriate here (or via file-sharing service like Dropbox or Pastebin)

It would really help to know what version you’re using. The final 2.0 is not released, and depending on what version you installed, there are more recent versions (e.g., through debichem).

Also, do you have Open Babel installed though apt-get?

Hi @ghutchis,
It is an error on my part. The Avogadro version is 1.93 which was installed using apt-get.

No, Open Babel is installed from source code.

How does one install these recent versions in Ubuntu.
I do not come across any documentation.

Well, newer packages are available:
https://launchpad.net/ubuntu/+source/avogadrolibs/1.97.0-2/+publishinghistory

If you can’t use one of the newer Debichem packages, you can also install via AppImage:
https://two.avogadro.cc/

Presumably it’s in your path. Try upgrading.

For testing purpose, using a spare instance of Linux Xubuntu 22.04.1 LTS, I just installed avogadro “the old way” with what currently is available from the servers of Ubuntu by

sudo apt-get install avogadro

to get version 1.95.1. After 122 MB download (and asking for 706 MB platter space to install dependencies) the program is working (as in drawing molecules, export of illustrations to .png). The comfort of OpenBabel requires a separate

sudo apt-get install openbabel

(4.148 kB of download, 19.1 MB of platter space) to then yield version 3.1.1 (of obabel). Note that these numbers may drop if some libraries already are installed to support programs you already use. And obviously, the installation into the operating system is independent of the presence of any Linux AppImage (e.g., the one from the project GitHub page).

Below, a redacted log from the CLI retaining a few of the more important messages.

part.log (1.7 KB)

Hi, i had exported the path in my .rc file.

Hi Thomas,
Can you show me the same for the Ubuntu 20.04 version,
The export to png works even if I install via the AppImage version. Yet the export to other file formats such as Sylbyl isn’t working as expected.
Regards,
Pallav

Hi Thomas,
Followed the same steps as outlined by you in Ubuntu 20.04.
Whenever, I want to open a file whenever I open it using the Open Babel format, I am encountering an error message something like:

Error while reading file 'psg.pdb':
Error while reading OpenBabel-generated CML:
Error parsing XML: Start-end tags mismatch

And if I open the file using the Avogadro format, it displays the molecule and whenever I try adding hydrogen it adds it at random places. And moreover it is important as the same is the case with Open Babel, whenever i use openbabel from the terminal it adds hydrogen at places where I do not want. It is always easier to visualise and manually edit the same.

P.S: The interface of Avogadro 1 is much better to work with than that of the recent version.

install.log (4.4 KB)

No I can not.

There is the interval of about two years of the LTS releases in the Ubuntu ecosystem; at present, LTS 22.04 Jammy Jellyfish. For some applications I use, which either do not evolve quickly, or have a built-in update mechanism independent to the OSes package manager, this is fair and good enough. The additional lag of 2 years (in reference of today, 2023 to LTS 20.04 Focal Fossa) no longer fits the bill for me. For some programs with short release cycles/frequent updates, I use a Linux distribution which is more like a rolling release; an example is Linux Debian branch testing. Based on growing experience and confidence with Linux in general, this is a position I adopted gradually. Typically, I await the first point release (e.g., 22.04.1 LTS) somewhere in summer (northern hemisphere) to transition to the next Xubuntu LTS by a fresh installation of the OS.

Thus no, I no longer have an installed instance of (X)ubuntu 20.04 LTS Focal Fossa to probe/replicate your findings.


With the Linux AppImage downloaded today

$ md5sum Avogadro2.AppImage.zip 
d6a3b577e01f36a1e0b95aa389f982c5  Avogadro2.AppImage.zip

running in Xubuntu 22.04.1 Jammy * I did not experience a problem to export a molecule sketched in Avogadro as Sybyl .mol2 file.

* The next point release of Jammy Jellyfish 22.04.2 is scheduled for February 2023.

Based on the log, you no longer use the AppImage. If I use today’s Linux AppImage I do not face a particular problem to read a .pdb written by OpenBabel either by Avogadro’s reader, nor by the alternative MDL molreader OpenBabel the intermediate widget offers. Both options yielded a reasonable visualization, independent if the underlying OS was Linux Debian 12/bookworm (at present branch testing), nor Linux Xubuntu 22.04.1 LTS.

By the way, the instance of Xubuntu checked neither has an installation of Avogadro, nor OpenBabel installed via the OSes package manager synaptic. Because the release cycle of Avogadro is considerably shorter than the one of Ubuntu LTS, and on occasion there might be an idea to improve the program further, I prefer Avogadro as an AppImage over the version provided with synaptic.

A test file below; remove the .txt extension is present only to share the file with you here:
ether.pdb.txt (2.4 KB)

It might be helpful if you gave some specific comments / suggestions in a new thread. Based on your comments here, I strongly suspect you’ve been using 1.93 … a lot of development can happen in ~2 years.

This is the log if i use an Appimage file

./Avogadro2-x86_64.AppImage 
Using locale:  "en_IN"
Extension plugins dynamically found… 44
OBProcess::executeObabel: Running "/tmp/.mount_AvogadZlrnF0/usr/bin/obabel" "-L formats read"
OBProcess::executeObabel: Running "/tmp/.mount_AvogadZlrnF0/usr/bin/obabel" "-L formats write"
OBProcess::executeObabel: Running "/tmp/.mount_AvogadZlrnF0/usr/bin/obabel" "-L forcefields"
OBProcess::executeObabel: Running "/tmp/.mount_AvogadZlrnF0/usr/bin/obabel" "-L charges"
OBProcess::executeObabel: Running "/tmp/.mount_AvogadZlrnF0/usr/bin/obabel" "-V"
"/tmp/.mount_AvogadZlrnF0/usr/bin/obabel"  found:  "/tmp/.mount_AvogadZlrnF0/usr/bin/obabel: Open Babel 3.1.1 -- Jul 21 2022 -- 19:12:36"
Checking for  "commands"  scripts in "/home/ps004/.local/share/OpenChemistry/Avogadro/commands"
Checking for  "commands"  scripts in "/usr/share/ubuntu/OpenChemistry/Avogadro/commands"
Checking for  "commands"  scripts in "/usr/local/share/OpenChemistry/Avogadro/commands"
Checking for  "commands"  scripts in "/usr/share/OpenChemistry/Avogadro/commands"
Checking for  "commands"  scripts in "/var/lib/snapd/desktop/OpenChemistry/Avogadro/commands"
Checking for  "commands"  scripts in "/tmp/.mount_AvogadZlrnF0/usr/bin/../lib/avogadro2/scripts/commands"
Checking for  "inputGenerators"  scripts in "/home/ps004/.local/share/OpenChemistry/Avogadro/inputGenerators"
Checking for  "inputGenerators"  scripts in "/usr/share/ubuntu/OpenChemistry/Avogadro/inputGenerators"
Checking for  "inputGenerators"  scripts in "/usr/local/share/OpenChemistry/Avogadro/inputGenerators"
Checking for  "inputGenerators"  scripts in "/usr/share/OpenChemistry/Avogadro/inputGenerators"
Checking for  "inputGenerators"  scripts in "/var/lib/snapd/desktop/OpenChemistry/Avogadro/inputGenerators"
Checking for  "inputGenerators"  scripts in "/tmp/.mount_AvogadZlrnF0/usr/bin/../lib/avogadro2/scripts/inputGenerators"
Checking for  "formatScripts"  scripts in "/home/ps004/.local/share/OpenChemistry/Avogadro/formatScripts"
Checking for  "formatScripts"  scripts in "/usr/share/ubuntu/OpenChemistry/Avogadro/formatScripts"
Checking for  "formatScripts"  scripts in "/usr/local/share/OpenChemistry/Avogadro/formatScripts"
Checking for  "formatScripts"  scripts in "/usr/share/OpenChemistry/Avogadro/formatScripts"
Checking for  "formatScripts"  scripts in "/var/lib/snapd/desktop/OpenChemistry/Avogadro/formatScripts"
Checking for  "formatScripts"  scripts in "/tmp/.mount_AvogadZlrnF0/usr/bin/../lib/avogadro2/scripts/formatScripts"
Checking for  "charges"  scripts in "/home/ps004/.local/share/OpenChemistry/Avogadro/charges"
Checking for  "charges"  scripts in "/usr/share/ubuntu/OpenChemistry/Avogadro/charges"
Checking for  "charges"  scripts in "/usr/local/share/OpenChemistry/Avogadro/charges"
Checking for  "charges"  scripts in "/usr/share/OpenChemistry/Avogadro/charges"
Checking for  "charges"  scripts in "/var/lib/snapd/desktop/OpenChemistry/Avogadro/charges"
Checking for  "charges"  scripts in "/tmp/.mount_AvogadZlrnF0/usr/bin/../lib/avogadro2/scripts/charges"
ScriptLoader::queryProgramName: Unable to retrieve program name for "/tmp/.mount_AvogadZlrnF0/usr/lib/avogadro2/scripts/charges/antechamber.py" ; "Error running script '/usr/bin/python3 /tmp/.mount_AvogadZlrnF0/usr/lib/avogadro2/scripts/charges/antechamber.py --display-name --lang en_IN': Abnormal exit status 1 (Unknown error.: Unknown error)\n\nOutput:\nTraceback (most recent call last):\n  File \"/tmp/.mount_AvogadZlrnF0/usr/lib/avogadro2/scripts/charges/antechamber.py\", line 151, in <module>\n    raise RuntimeError(\"antechamber is unavailable\")\nRuntimeError: antechamber is unavailable\n"
ScriptLoader::queryProgramName: Unable to retrieve program name for "/tmp/.mount_AvogadZlrnF0/usr/lib/avogadro2/scripts/charges/xtb.py" ; "Error running script '/usr/bin/python3 /tmp/.mount_AvogadZlrnF0/usr/lib/avogadro2/scripts/charges/xtb.py --display-name --lang en_IN': Abnormal exit status 1 (Unknown error.: Unknown error)\n\nOutput:\nTraceback (most recent call last):\n  File \"/tmp/.mount_AvogadZlrnF0/usr/lib/avogadro2/scripts/charges/xtb.py\", line 100, in <module>\n    raise RuntimeError(\"xtb is unavailable\")\nRuntimeError: xtb is unavailable\n"
Error starting RPC server: "QLocalServer::listen: Address in use"
Starting new server.
Open Babel formats ready:  146

and if I draw a molecule and want to export it I get something like:

Although I can export the molecule as a graphic image i.e png file.
Regards,
Pallav

Hi @ghutchis,
yes it is 1.93 which comes along with Ubuntu 20.04.

Well, what did you attempt to name the file? The error message only comes up if you try to name the file “methane” with no extension.

Do I need to mention the extension explicitly such as “methane.pdb”?

Sorry - didn’t see your reply. Yes. You need to mention an extension. In most cases, picking a format from the menu will add it, however, some Linux setups don’t seem to do that.