Chemicals as colored graphs

The interface between maths and chemistry can be tricky when it comes to terminology - sets (maths) have elements, chemistry has a different kind of element; graphs have colors which are usually just numbers, diagrams of chemicals have colors which usually relate to the element type of the atom, and so on.

So, for maximum confusion, here are two pictures of graphs (that could represent chemical connectivity) colored by equivalence class (determined by signature). The signature trees are also drawn with graphical colors, but these represent the integer colors in the signature, which are not the same as the colors used to indicate equivalence class. Firstly, a structure that the smiles algorithm is meant to have trouble with (but may not exist):

It looks quite strained, so I expect that it may not be possible to synthesise. Another multi-ring system is this one:

I don't even know what this one would be called, even if it did exist. Annoyingly, this structure triggers a bug if the two dark blue atoms are connected. This makes the graph 3-regular, but the yellow equivalence class is split, which shouldn't happen.


This comment has been removed by the author.
Gilleain, in the first graph, I do not see the equivalence of all four cyan nodes... the top two are not really equivalent to the bottom two, or are they? If so, why? To me, they seem to have different environments...
gilleain said…
Ah top marks for spatial awareness, but only half for colour comparison :)

The upper two are what Rasmol used to call "Sea green", while the lower two are cyan. The trees on the right (which are the signatures) are arranged in the same layer order as the graph.
Oh, wow... those are two different colors! Hahaha... :)

R has nice methods to create a list of colors where you pick the number of colors and it optimizes for contrast :)