Ubuntu 20.04 - file writers - plugin - errors

Hello,

I have Ubuntu 20.04. I installed Avogadro2 using the command #sudo apt-get install avogadro. I opened a .pdb file of a molecule, I added Hydrogens and the I needed to save the molecule in .mol2 extension.

**"unable to find a suitable file writer for the selected format"** (It happens with all formats)

In addition, I tried to download plugins in the section plugin downloader, but It was impossible for me to download the plugins even if I read that the extraction was successfull.

I read that someone else had the same problem, but I didn’t understand how they fixed it. Can you provide me with very detailed instructions?

I’m also trying to run the command git clone –recursive git://github.com/OpenChemistry/openchemistry.git git://github.com/OpenChemistry/openchemistry.git after disinstalling the software but the terminal remains stacked this way:

name: ~/ PATH $ git clone –recursive \ ```git://github.com/OpenChemistry/openchemistry.git git://github.com/OpenChemistry/openchemistry.git

Thank you

Environment Information

Avogadro version: 1.93
Operating system and version: Linux Ubuntu 20.04

At least some of Avogadro’s format conversions get in touch with openbabel . Can you ascertain you have a working installation of this converter by a test like

$ obabel -v
No input file or format spec or possibly a misplaced option.
Most options must come after the input files. (-i -o -O -m can be anywhwere.)

Open Babel 3.1.1 -- Jan  4 2023 -- 09:58:24
Usage:
obabel [-i<input-type>] <infilename> [-o<output-type>] -O<outfilename> [Options]
Try  -H option for more information.

- maybe with a different version reported - and

$ obabel -:"O" -h --gen3d -omol2
@<TRIPOS>MOLECULE
*****
 3 2 0 0 0
SMALL
GASTEIGER

@<TRIPOS>ATOM
      1 O           0.9850   -0.0756    0.0481 O.3     1  HOH1       -0.4105
      2 H           1.9529   -0.0704    0.0943 H       0  HOH0        0.2052
      3 H           0.7062    0.0269    0.9704 H       0  HOH0        0.2052
@<TRIPOS>BOND
     1     1     2    1
     2     1     3    1
1 molecule converted

(or $ obabel -:"O" -h --gen3d -O water.mol2 which should write a permanent record) in first place?

Thank you for your reply.
By running these commands my outputs are exactly the same, with the only exception of openbabel version which is 3.0.0.

Three options at hand: i) Avogadro2 and openbabel installed with sudo apt, ii) Avogadro2 as AppImage for Linux, iii) plain command line with openbabel.

i) On a spare partition of Xubuntu 22.04.1 LTS, I run the installation of Avogadro synaptic lists as Avogadro2 - just to ascertain to be in the path leading to a contemporary version. This currently offers Avogadro 1.95-1, though not the most recent version (vide infra), it emerges from the branch to Avogadro2. The export of the molecules (the molecule with arrow button, top rim of the frame) is considerably constrained, .xyz format is possible bu reads e.g. as

8
XYZ file generated by Avogadro.
C      0.09854   -2.66053   -0.00000
H      0.89853   -2.90891    0.66574
C      0.42114   -1.89620   -0.67574
H     -0.18675   -3.52988   -0.55475
H     -0.73877   -2.30715    0.56475
H      1.25844   -2.24959   -1.24049
H     -0.37886   -1.64783   -1.34149
H      0.70643   -1.02686   -0.12099

(a not optimized model of ethane). The export to other file formats, including .mol2, is available only after installing openbabel7 (again with the package manager’s frontend synaptic) and restart of Avogadro. For the Python-based plugins to work, maybe you did not yet indicate the Python3 interpreter (Extensions → Set Python Path) - if not in /usr/bin/python3, a call which python3 provides you a prompt.

ii) I removed Avogadro and openbabel as installed via synaptic completely. The project’s landing page on GitHub has an AppImage for Linux. Download the archive, decompress the .zip; from the command line, you enter the new folder. By

$ chmod u+x ./Avogadro2-x86_64.AppImage

you provide the application the executable bit. Still in this folder, you can now launch the program from the CLI by ./Avogadro2-x86_64.AppImage &. File I/O to many formats (including writing to .mol2) was working then. Because the Linux AppImage doesn’t “nest” into the operation system, it is invisible to apt - hence, the watch for updates of the program is then your responsibility.

iii) Only use openbabel. This starts again with a clean slate - without installation, nor appimage of avogadro, nor openbabel. Installation with sudo apt-get install openbabel. Staying on the command line, an individual .pdb file would be given hydrogens reasonable for pH = 7.4 on idealized positions and exported as .mol2 by

obabel -ipdb input.pdb -h -omol2 -O output.mol2  # the verbose form of the command
obabel input.pdb -h -O output.mol2  # the shortened command

The shortened form of the command can be used because the file extensions .pdb and .mol2 are unique among formats openbabel reads & writes. (obabel -ipdb input.pdb -h -omol2 -O output.txt would describe the same molecule in mol2 syntax, the output file only has a different file extension.)

With sudo apt-get install openbabel-gui you can install an optional GUI for openbabel (call sign on the command line obgui). Its use, as well as the one of openbabel in general is described in the manual on readthedocs.io as indexed .html (a search requires JavaScript enabled) one equally can download as pdf as an offline reference.

This is the main problem. You’re using a really old version of Avogadro.

As @Thomas mentioned above, you can install 1.97 as an AppImage, or download packages from DebiChem.