Molecules -- Periodic Table -- cont

Hey, perhaps we should talk. I’ve been slowly working on this: Chemistry — periodic table and related tools. Next up: a list of molecules, and a reactor that lets you drag some elements into it and lets you know which of the molecules can be made from (some number of copies of) exactly those elements.

It sounds as if there may be some synergy.

1 Like

I’ve been following your project with interest and it’s looking good. I’ve also been meaning to provide some links to resources so I’ll try to do that in the main thread about the project.

Sounds interesting… but I’m not sure this will be quite as easy. Maybe I don’t fully understand your intentions but the number of possible structures for a particular molecular formula increases very rapidly (although not exponentially) as the number of atoms increases. So for example, in the case of alkanes (CnH2n+2), for n=10 there are 75 isomers, n=15 it’s 4,347, n=20 it’s 366,319, n=30 it’s 4,111,846,763 and for n=187 I’ve read the number of isomers is greater than the number of ‘particles’ in the known universe… you get the picture! And that’s excluding stereoisomers. There are algorithms to calculate this sort of thing (see A000602 - OEIS and A000628 - OEIS for ignoring stereoisomers and including them, respectively and also List of straight-chain alkanes - Wikipedia). Additionally, there isn’t a single algorithm for everthing – e.g. cycloalkanes need to be treated differently.

Anyway, this is getting tl;dr and maybe should be split into a new thread (I don’t know how to do that and maybe only those with rights can) if we want to continue.

Thanks for the contact and take care.

As @Ant says the number of compounds/molecules is “infinite”.

You could create the basic molecules, but then you would need to understand some basic Chemistry, for example, Valence (and Electronegativity). The Lewis structure could give you a basic idea of how it works.

Maybe if there is some list of “most common compounds”, that could be used to limit the number of results. But I agree that if number of each element isn’t specified, you will get a lot of results from C H O…

Yes, I’m looking at something much simpler. If you drag Hydrogen, Oxygen, and Carbon to the reactor, the outputs would include “Aspirin (C9H8O4)”, since that requires some number of copies of exactly those three elements. If you then removed Hydrogen, Aspirin would be removed, but “Carbon Dioxide (CO2)” and “Carbon Monoxide (CO)” would be added, since those are made of copies of Carbon and Oxygen.

I was planning on starting with ISBN 9780313337581 - The 100 Most Important Chemical Compounds: A Reference Guide and later adding some additional chemical reagents from the back of a printed periodic table. The initial list is in this tiddler: compoundNames.json (3.8 KB).

And I can easily choose matches just by looking for those tiddlers tagged Compound and whose formula field has all of those element symbols, and no others.

I understand that this is over-simplistic. But I think it might still be at least somewhat useful.

5 Likes

Ah, okay… I thought I was misunderstanding.

Sounds to be an interesting project again… maybe once you’ve proved the concept with the 100 MICC list you could link it to chemicals on Wikipedia. Again, I think there’s a list somewhere but they should be accessible via a SPARQL query of Wikidata.

I think the approach to have a top 100 molecules is fine if you allow any desired one to be added as needed. The user can add molecules according to a project or area of interest. Basing them on tiddlers we can then have a repository of formulae that when someone add a set they can package and submit them.

  • If I am not wrong many individual molecules formula will not need many bytes each.
  • In another wiki we added 60,000 words from Esperanto, there are various tips to make such large wikis perform well, even without using a server, external tiddlers or moving them into a data tiddler.
  • I suggest don’t worry about capacity and performance issues until you experience or are approaching it. There are many ways to improve later, I am speaking from Experience.

Yes, that was the goal. There are only a few fields in common among the compounds I’ve seen so far, and I will probably only include the most common those and require only title and formula (in the most simple form) allowing others such as density, boiling-point, molar-mass, and probably eventually something like a wikipedia link, to remain optional.

That’s something I haven’t figured out yet. I’m thinking of two different paths, and am not clear on which will be better for this project:

  1. Supporting multiple editions, each with its own collection of tools, and with some interdependencies managed on building these editions, containing no project-specific plugins at all.

  2. An organization into plugins, in which the equivalent of such multiple editions would involve embedding some subset of the available plugins (again with dependency tracking). With this, adding new features to a smaller wiki would usually be done just by importing additional plugins.

In either of these models, adding additional compounds should be simple enough. But to package them together and offer, say, the Organic Chemistry 101 molecules, the second model would be a more natural fit.

(And of course there’s a hybrid model, where some baseline editions have much of the shared functionality, but plugins are offered for the advanced stuff.)

I think you’re right, and I don’t expect users to be adding thousands of them. This is not ever going to take the place of online compound databases.

I’m not worried about performance, in general. The only thing that concerns me at the moment is how quickly the various versions of the periodic table render. I’ve not seen anything terrible yet, but it’s already a little slower than I’d like for the one I’m building now. Still, it’s not bad enough that I’m spending much mental effort on that; I just know that if it’s not faster once I get the full functionality, I may take a pass at that. As to capacity, I’ve had no concerns so far.

Thank you for the advice.

1 Like

I found out about a special subset of molecules which would be interesting to explore. Supprisingly there are only around 50 for which we have absorption spectra that can be used for astrometry in studying exoplants and interstellar mediums.

I will edit this reply and add some references soon.

https://www.exomol.com/data/molecules/

This was from Juan who spoke at this I attended last night;

Guest Speakers - Maria Pettyjohn and Juan Camilo Zapata Trujillo – UNSW

Thursday 06 April 2023, 07:30pm - 09:30pm

Hits : 181

How chemists and astronomers work together to find molecules on exoplanets and in the Interstellar Medium

Maria Pettyjohn and Juan Camilo Zapata Trujillo, PhD students at UNSW

Both being PhD students in Chemistry, Maria and Juan will be discussing how chemists and astronomers work together to identify molecules in exoplanet atmospheres.

Juan is a PhD student in the School of Chemistry at UNSW. He uses computational molecular spectroscopy to help astronomers identify molecules related to signs of alien life in outer space. Originally from Colombia, Juan enjoys cooking authentic Colombian food and is always happy to give approximate translations from Aussie to Colombian slang. The one thing that Juan loves the most about Australia is TimTams - literally, the best chocolate biscuits ever made in human history, so he says.

Maria is a PhD student in the School of Chemistry at UNSW. She uses computational molecular spectroscopy to identify molecules that can tell us about the process of star and planet formation. She credits Star Trek partly for her love of astronomy and molecules—maybe there is coffee in some star-forming cloud? Being from Canada and a 12-hour drive from the closest ocean, she plans on utilising Sydney’s proximity to the ocean to take up snorkelling.

Location of Event: Green Point Observatory

That’s very cool. I can easily see either including these from the start or making it a group to pull in. I haven’t had much time to work on this lately, but I’m hoping to get the next phase done this weekend. I don’t know if I’ll try anything with these right away, but they’ll definitely go on the TODO list. Thank you!

Hi @Scott_Sauyet, you know the three.js molecules demo ?

http://rboue.tiddlyspot.com/#Three.js%2FDemos%2Fmolecules:Three.js%2FDemos%2Fmolecules%20Welcome

1 Like

No, I didn’t. That’s fantastic! At some point, I’ll have to reach out to the author…