Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does not import from PQR #1489

Closed
drew-parsons opened this issue Dec 3, 2023 · 13 comments
Closed

does not import from PQR #1489

drew-parsons opened this issue Dec 3, 2023 · 13 comments

Comments

@drew-parsons
Copy link
Contributor

drew-parsons commented Dec 3, 2023

Avogadro version: (please complete the following information from the About box):

  • Avogadrolibs: 1.98.1
  • Qt: 5.15.10

Desktop version: (please complete the following information):

  • OS: Linux (debian unstable)
  • Version 6.5.13
  • Compiler g++ 13.2.0

Describe the bug
I am trying to load the a molecule from PQR. The PQR search engine does find them, for instance searching "benzene" by name, there is only one entry, the PQR search box finds it and displays the preview image for the molecule. But when I click on Download, the screen remains blank. The molecule is not imported.

Molecules do import successfully via the "Download by Name" search box. Actually there's something weird going on there. It was working, but after testing a few different molecules while writing this bug report, it stopped importing too. But with no error message written to console (the PQR error is consistent, see below) so it's probably a different issue.

I couldn't import anything from PDB but that I think that's a separate issue (I might not be using the right search term for pdb).

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'File' menu
  2. Click on 'Import'-'Search PQR...'
  3. Search by "benzene" (name).
  4. Click 'Search'
  5. Click on the found molecule, wait for the preview image to appear
  6. Click 'Download'
  7. See error

Expected behavior
Molecule should import successfully from PQR without an obabel error.

Screenshots
An error is printed to console

Reading to format:  "cjson" cjson
OBProcess::executeObabel: Running "obabel" "-imol2 -ocjson"
"obabel"  stderr:
 "obabel: cannot write output format!\n"

Additional context
Openbabel version is 3.1.1

@ghutchis
Copy link
Member

ghutchis commented Dec 4, 2023

Sounds like there might be an OpenSSL issue? Does the "Download Plugins" work show anything?

There's definitely an issue in some cases in which the OpenSSL version for Qt doesn't match the installed version of OpenSSL.

@drew-parsons
Copy link
Contributor Author

drew-parsons commented Dec 4, 2023

I don't think OpenSSL is the problem. Certainly "Download Plugins" shows all the plugins (20 or so of them). I could, for instance, download nanocar-avogadro and Glycans_to_SMILES_script. Not sure what they do exactly or how to use them (I couldn't see any change to the UI), but I can see that they were downloaded into ~/.local/share/OpenChemistry/Avogadro/other/

Given the message "cannot write output format", I thought maybe the PQR problem was a permissions error, e.g. trying to download the file to /usr/bin or some such (I haven't checked where the downloaded data would be written)

@ghutchis
Copy link
Member

ghutchis commented Dec 4, 2023

Oh, okay. I'm trying to switch to using obabel support for CJSON by default. In principle, the Avogadro code should detect that your obabel doesn't support CJSON and use CML instead.

That's definitely a bug.

@ghutchis
Copy link
Member

ghutchis commented Dec 4, 2023

And I'll look at downloading into "other" .. that's also a bug. Sigh.

@drew-parsons
Copy link
Contributor Author

True, cjson is not in the list

$ obabel -L formats | grep -i cml
cml -- Chemical Markup Language
cmlr -- CML Reaction format
$ obabel -L formats | grep -i json
cdjson -- ChemDoodle JSON
pcjson -- PubChem JSON

@ghutchis
Copy link
Member

ghutchis commented Dec 4, 2023

Yes. It's in obabel HEAD but not a released version. I will release a 3.2 fairly soon.

@ghutchis
Copy link
Member

ghutchis commented Dec 5, 2023

Wait - you said you can't use PDB download either? That should directly read through native Avogadro code (MMTF) not Open Babel.

@drew-parsons
Copy link
Contributor Author

I'm not certain that I'm using the right search term with PDB. If I enter lysozyme, for instance, it tells me "Could not read the PDB molecule: lysozyme"

@ghutchis
Copy link
Member

ghutchis commented Dec 5, 2023

Yeah, at the moment, I'm not aware of a generic search API for PDB -- would be nice.

Try 1CRN or 6vxx as PDB codes.

@drew-parsons
Copy link
Contributor Author

Alas, 1CRN and 6vxx aren't found by the PDB search either.

@avo-bot
Copy link

avo-bot commented Feb 5, 2024

This issue has been mentioned on Avogadro Discussion. There might be relevant details there:

https://discuss.avogadro.cc/t/timing-a-1-99-release-urgent-fixes-features-etc/5256/3

@drew-parsons
Copy link
Contributor Author

PQR import is now working in v1.99 (imports benzene), but PDB import is still not working.

@ghutchis
Copy link
Member

I'm going to close this. Please open a new issue for PDB import and we can debug that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants