Hacker News new | comments | show | ask | jobs | submit login
Avogadr.io – Molecular Wallpaper Generator (avogadr.io)
157 points by gus_massa 9 days ago | hide | past | web | 43 comments | favorite





That's pretty neat. I think a couple improvements would be:

- Some kind of feedback over whether the compound name is valid or not

- Validation on the SMILES input

- Whether it's working on building the picture or not

- Autocomplete for the compound name

- Different colors for each element

- Preset color pallettes

- List of "cool-looking" or "most often used" compounds


Some great suggestions here, really appreciate you taking the time to list them out!

Nice Service!

Would also suggest adding the ability to set the size of the rendered image. Especially for picking sizes for devices.

Also, if you want to make some pocket change from this, link it to cafepress and let me self-print molecules on a bunch of things (stickers!).


And perhaps call it "image generator" rather than "wallpaper generator". I thought it was going to do something special that was suited specifically suited for a wallpaper.


Anyone have the SMILE representation of their genome?


Since you mentioned it, THC and tetrahydrocannabinol are the same... but different. I don't know enough about these kinds of diagrams to know what the differences are - but surely they should be the same?

It looks like "THC" and "tetrahydrocannabinol" resolve to different isomers. One has wedges (stereo information) and they have different double bond positions (the double lines).

The problem here is naming compounds - a name like "THC" is not precise enough to distinguish between these isomers. A more exact name could be "(–)-trans-Δ⁹-tetrahydrocannabinol" (from wikipedia).


Ah, interesting - thanks. I'll be honest chemistry never really was my strong point (I much preferred the more practical aspect of physics in school) - I try to pick up what I can from creators such as codyslab, nilered, nurdrage, etc, but I guess my attention to it falls in the "interesting but not interested" category, for lack of a better term.

This poor site is now experiencing the HN hug of death...

Hey, it's me, avogadr.io guy. The first thing to give out seemed to be the molecule rendering server Sourire (running locally) which is a Clojure webserver wrapper around a cheminformatics toolkit (see GitHub for more info). The molecule rendering server process was crashing for some reason under the load (physical memory, disk space, jury's still out I'm honestly not sure at this point) so the site itself was being served but any requests to Sourire were failing (hence the lack of a molecule in the UI during the hug of death). More RAM/disk space seems to have sorted it out for now and it's holding steady. I guess it comes down to a question of how many molecule renders are possible concurrently on the hardware (including any temp file/cache/RAM cleanup time).

I'm sure you've thought about moving the renderer clientside in JS - what's blocking it? Have you played with ClojureScript before?

It's certainly crossed my mind, and it'd be great to implement something like that, but the Clojure is just a wrapper around a large and complicated cheminformatics toolkit. Porting the actual rendering library (Java/C++?) would probably be a substantial undertaking.

If it's pure java, it's possible to compile using GWT to JavaScript for use on the client side.

If it's C++, then emscripten might be a possible choice.

If it's a mixture, then that's a much harder problem...


It's probably a hard one:

https://github.com/cryos/avogadro/

Mostly C++, then the clojure wrappers in java? There do exist pure javascript molecule drawers, though.


Great work :) Je souris aussi

I'm curious as to what type of hardware these sites that can't handle HN traffic are running on? I've had a project go front page before, and it was nothing a $10 droplet couldn't handle. A few hundred concurrent users is nothing for a webserver/database.

It also depends on what one runs on it. This website seems to dynamically generate images (3D, maybe?), and send them to clients.

I'll give to this one in particular, but blogs have had the same effect. It's bizarre when commodity hardware is so powerful these days.

It's a 2D monochromatic PNG of the chemical drawing. The body's style links to the background image URL like 'https://www.avogadr.io/api/name/1440/900/38ce5d/caffeine' or 'https://www.avogadr.io/api/name/1440/900/38ce5d/LSD'.

Does making a chemical drawing usually take that much time?


Just because people know how to write for a blog doesn't mean they know how to scale a web server.

I had 10000 concurrent users on a front page blog post once. I think time of day had a big effect.

What day/time did you achieve 10,000 concurrent?


PCP looks as evil as it really is. The one drug that everything the government tells you about it is true.

https://www.youtube.com/watch?v=tFUvmZWf4hI




oO that's so awesome!


Interesting. But it lacks a lot of simple compounds. For instance it doesn't recognize ethyne or acetylene only ethylene. These are all different names for the same thing but ethyne is the systematic name. Similarly it recognizes propane and propene but not propyne, but does recognize methyl ethylene.

This is a bit odd because all of those names are regular constructions that indicate the composition in formally defined ways.

Still fun though!



why does "caffeine" look different to "caffiene"?

(I wanted to see how it would handle typos)


-iene suffix denotes the presence of a particular kind of electronic bond within the molecule, with different properties to typical electron bonds.

Any source for SMILES of molecules?

My methane is crazy. https://www.avogadr.io/?background=5f0000&foreground=ce3838&...


While I can't explain your result (does this give another meaning to metal umlauts? Edit: Phosphorus isn't a metal :/), it looks like canonical SMILES representation for methane is C (not CH4 as one might naïvely expect, as I did):

https://pubchem.ncbi.nlm.nih.gov/compound/297#section=Canoni...

https://www.avogadr.io/?background=5f0000&foreground=ce3838&...


Notice it says BaCKUP. I think it's just a placeholder.

Nice. I didn't notice that.


This is super cool! However, I notice that the generated PNG isn't high enough resolution for Retina or other High-DPI displays. It would be great if this gave the option to export different sizes.

Nice! I love the visualization for dihydrogen monoxide.

That's really scary stuff. http://www.dhmo.org/facts.html /s

Nice! I love the visualization for Crystal Meth.



Applications are open for YC Winter 2018

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: