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.
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.
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).
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.
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.
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):
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.
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.
46 comments
[ 2.8 ms ] story [ 115 ms ] thread- 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
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!).
you're all idiots.
Does making a chemical drawing usually take that much time?
If it's C++, then emscripten might be a possible choice.
If it's a mixture, then that's a much harder problem...
https://github.com/cryos/avogadro/
Mostly C++, then the clojure wrappers in java? There do exist pure javascript molecule drawers, though.
Caffeine: https://avogadr.io/?background=3C2923&foreground=E5B273&comp... Wintergreen: https://avogadr.io/?background=1E5454&foreground=D6DCC2&comp... Codeine: https://avogadr.io/?background=350D30&foreground=D0ACE2&comp... Acetone: https://avogadr.io/?background=A03129&foreground=FF9800&comp... THC: https://avogadr.io/?background=113617&foreground=A6BC74&comp... Oxytocin (large molecule): https://avogadr.io/?background=3a0000&foreground=ffc7c7&comp... Ethanol: https://avogadr.io/?background=4B98BC&foreground=D7E5FF&comp...
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).
https://www.youtube.com/watch?v=tFUvmZWf4hI
(I wanted to see how it would handle typos)
My methane is crazy. https://www.avogadr.io/?background=5f0000&foreground=ce3838&...
https://pubchem.ncbi.nlm.nih.gov/compound/297#section=Canoni...
https://www.avogadr.io/?background=5f0000&foreground=ce3838&...
Also, I found this: https://cactus.nci.nih.gov/chemical/structure which can convert a chemical name to SMILES notation.
The Wikipedia entry for SMILES has lots of links to software utilities at the end of the article: https://en.wikipedia.org/wiki/Simplified_molecular-input_lin...
https://www.avogadr.io/?background=5f0000&foreground=ce3838&...
https://www.avogadr.io/?background=5f0000&foreground=ce3838&...
This is a bit odd because all of those names are regular constructions that indicate the composition in formally defined ways.
Still fun though!