Giter Club home page Giter Club logo

Comments (5)

sgitkene avatar sgitkene commented on June 21, 2024

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

from avogadrio.

lambdacasserole avatar lambdacasserole commented on June 21, 2024

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?

from avogadrio.

lambdacasserole avatar lambdacasserole commented on June 21, 2024

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.

from avogadrio.

lambdacasserole avatar lambdacasserole commented on June 21, 2024

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.

from avogadrio.

lambdacasserole avatar lambdacasserole commented on June 21, 2024

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.

from avogadrio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.