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

Uranium hexafluoride invalid compound name #21

Closed
sgitkene opened this issue Aug 25, 2017 · 5 comments
Closed

Uranium hexafluoride invalid compound name #21

sgitkene opened this issue Aug 25, 2017 · 5 comments
Assignees
Labels

Comments

@sgitkene
Copy link

I've stumbled across some molecules that don't work. Uranium hexafluoride is apparently an invalid compound name, uranyl nitrate leads to the "backup" molecule.

@sgitkene
Copy link
Author

sgitkene commented Aug 25, 2017

https://en.wikipedia.org/wiki/Heme also doesn't work ("backup")
https://en.wikipedia.org/wiki/Porphin is displayed rather weirdly (see screenshot)
grafik

@lambdacasserole
Copy link
Owner

Hi there, thank you very much for making me aware of this. Heme and uranyl nitrate don't seem to be rendering properly because for whatever reason the service at https://cactus.nci.nih.gov/chemical/structure is giving back vertical pipe characters | when converting the compound name to SMILES. For example, uranyl nitrate gives:

O(|[U](|O[N+]([O-])=O)(=O)=O)[N+]([O-])=O

Adding some code to strip vertical pipe characters results a render for both uranyl nitrate and heme, but both are pretty messed up.

I didn't think | appeared in valid SMILES. Any idea what it signifies @sgitkene?

@lambdacasserole
Copy link
Owner

Uranium hexafluoride appears to just be straight up missing from the online chemical database. Might be worth just adding a local database full of these exceptional cases or maybe integrating another lookup service to fall back on. Or both.

@lambdacasserole
Copy link
Owner

Yep, got an idea about how to proceed with this. Gonna add a chain of responsibility against several compound name-SMILES lookup services until one of them gives us back valid SMILES. I've added one that scrapes SMILES from Wikipedia as a last resort, but hasn't been tested enough to merge in. Efforts ongoing.

@lambdacasserole lambdacasserole self-assigned this Aug 27, 2017
@lambdacasserole
Copy link
Owner

Alrighty, fix (for most of the issues you described) is live as of #22 merge:

Uranium hexafluoride: https://avogadr.io/?background=000000&foreground=ffffff&compound=uranium%20hexafluoride

Heme B: https://avogadr.io/?background=000000&foreground=ffffff&compound=heme%20b

Uranyl nitrate: https://avogadr.io/?background=000000&foreground=ffffff&compound=uranyl%20nitrate

Porphin is still a bit of a mystery. Seems like something on the rendering side might need a bit of a tweak. I'll pop it in a separate issue.

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

No branches or pull requests

2 participants