Tree trunk molecules

There are (at least) two reasons one might want to coarse-grain a molecular structure:

1) — Interested parties often wish to know the structure before judging whether it's worth pursuing. Showing an image of the structure is enough to give away the secret. If it is patented then it's already public knowledge - if it's not patented, showing a picture without coarse-grainig is almost equivalent to giving it away.
2) — Scaffold analysis requires some automated definition of 'scaffold', which typically means removing 'cabbage' such as terminal atoms, and could include removing atom type and bond order.

The first reason is described on Ant's Rants, discussing Andrew Grant's use of Gaussians fit to molecules:
The best use we ever envisioned, and actually published upon, was as an anonymization technique: i.e., you could obscure what the underlying molecular structure was but keep the shape. I hope this, or some other use, one day catches on as I know it was Andy’s favorite piece of work.
The second reason is demonstrated by Lipkus et al. from CAS:
The diversity is characterized using the framework content of the compounds; the framework of a molecule is the scaffold consisting of all its ring systems and all the chain fragments connecting them.
This code performs the second (FYI the first can be achieved with GMMFit), but could be used for both. The full molecule can be thought of as a Christmas tree with all the decorations. Successively removing the decorations - yielding Murcko - then the leaves - yielding Generic Murcko - and all the branches results in just the tree trunk, aka framework aka anonymized scaffold: