Inspiration

We thought openstreetmaps would be something pretty cool to use for "unintended" behaviour, and since molecules and roads are both examples of graphs, we thought they were a perfect match!

What it does

Takes a molecule, maps its atoms to road intersections in Albuquerque (chosen because of breaking bad, of course), and maps its bonds to road routes so that, if you wanted, you could drive it and create a strava of meth, or cocaine, or whatever your favourite molecule is!

How we built it

Used C# to build the UI which lets the user search for a molecule and then passes that molecule into python scripts. The first python script gets the molecular structure from the PubChem database, the second use the Hungarian algorithm (built into scipy) to try and find points in Albuquerque that best map the shape of the molecule, and then the third uses the A* algorithm with the metric being how close the route is to the ideal straight line of the bond to make the road routes look like bonds! Finally we have a simple bit of HTML plotting all of this onto openstreetmaps.

Challenges we ran into

A* was very tough to get working, with a lot of bugs involved in it. Finding points in Albuquerque to represent the molecule was also tricky, namely because it started off very unoptimised and with large amounts of error.

Accomplishments that we're proud of

Getting everything working in such a short amount of time, making a nice UI for the project, and managing to sort out all the technical details with A* and the Hungarian algorithm.

Built With

Share this project:

Updates