Home   Manual

Doesn't read .xyz files properly?

Using avogadro2, trying to open .xyz files from the terminal, e.g.

avogadro geometry.xyz

opens up avogadro with all of the atoms as dummy atoms.

Also pasting geometries into the coordinate editor yields the error message:
“Could not parse geometry specification. Fix the highlighted errors and try again.”
with no highlighted errors.

Thanks

To answer this, I’d need to see the file. Can you post it somewhere? (Google Drive, Dropbox, Pastebin, GitHub Gist, etc.)

Here is a google drive link to the .xyz file:

https://drive.google.com/file/d/1HMohhJftMlxnPNS4CF-p09KU8ugiEWF-/view?usp=sharing

Thanks

I’m not sure if it is my set up, however observe Google Drive’s note

Access denied/You need access
Ask for access, or switch to an account with access.

which possibly may be adjusted by you. Maybe pasting the .xyz to pastebin (an example about 2,6-lutidine) to grant access to the data in question is an alternative suitable for you.

Thanks, here it is on pastebin:

I can’t tell for Avogadro2 (problems installing/running repackaged version 1.95.1-2 as provided for Linux Debian 12/bookworm testing [tracker]) but an old installation of Avogadro 1.2.0 in Xubuntu 18.04 LTS reads the chloromethane/water model you pasted without problem.

What could be a hurdle – here it becomes a speculation – is the number of decimals about the coordinates or/and the alignment of these columns. Say, your model is saved in file model_input.xyz and you run OpenBabel on the terminal like

obabel model_input.xyz -O reformat_output.xyz

then these entries are rounded to five decimals. This precision might be good enough for your work. Perhaps then the model is understood.

If you aim for an illustration of the model, and old Avogadro is not accessible for you, an other viewer e.g., Jmol may be an alternative. If you want to set up an additional computation e.g., Gabedit equally offers assistance for a couple of programs.

None of this matters. The parsers split on whitespace and don’t care about alignment, number of decimals, anything like that.

@bge6 - it would definitely help to know what version of Avogadro2 you’re using. It works just fine for me on the latest version (and GitHub HEAD).

@ghutchis Good to know.

Version 1.94.0-1 running on ubuntu 21.10

Please try 1.95.x. There are some known bugs, but I’m quite sure that was fixed in the 1.95 development.

e.g. the nightly AppImage build: https://nightly.link/OpenChemistry/avogadrolibs/workflows/build_cmake/master/Avogadro2.AppImage.zip

Running the AppImage gives the same issue. Also the molecules won’t display on screen - I can only see the molecule in the coordinate editor.

If a pristine session was started successfully, the left hand pane «Display types» has options like wireframe, licorice, ball & stick, etc. To see the visualization of the molecule, at least one of them has to be enabled by a single click.

Note, ExtensionsSet Python Path in the GUI allows you to (re)set the path to your python interpreter; for some reasons, the AppImage already assumes Python 3.10 however outside the anticipated path /usr/bin. Though RAM apparently was/is not the limiting factor on the computer I just use (at least by reading of htop), Avogadro lost a bit of the snappiness I was used to enjoy (Avogadro 1.2.0 in Xubuntu 18.04 LTS vs. the AppImage in Debian 12/bookworm).