{"id":26,"date":"2012-10-09T09:52:01","date_gmt":"2012-10-09T08:52:01","guid":{"rendered":"http:\/\/nextmovesoftware.com\/blog\/?p=26"},"modified":"2015-06-22T17:10:44","modified_gmt":"2015-06-22T16:10:44","slug":"visualising-a-hierarchy-of-substructures","status":"publish","type":"post","link":"https:\/\/nextmovesoftware.com\/blog\/2012\/10\/09\/visualising-a-hierarchy-of-substructures\/","title":{"rendered":"Visualising a hierarchy of substructures"},"content":{"rendered":"<p>Given a set of chemical structures as SMILES, how can you visualise the substructure\/superstructure relationship between them?<\/p>\n<p>For example, the following picture shows the relationship between members of a set of structures containing several benzene derivatives and monosaccharides:<a href=\"http:\/\/nextmovesoftware.com\/blog\/wp-content\/uploads\/2012\/10\/blog.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-27\" title=\"Substructure Hierarchy\" src=\"\/\/nextmovesoftware.com\/blog\/wp-content\/uploads\/2012\/10\/blog.png\" alt=\"\" width=\"615\" height=\"347\" srcset=\"https:\/\/nextmovesoftware.com\/blog\/wp-content\/uploads\/2012\/10\/blog.png 615w, https:\/\/nextmovesoftware.com\/blog\/wp-content\/uploads\/2012\/10\/blog-300x169.png 300w\" sizes=\"(max-width: 615px) 100vw, 615px\" \/><\/a><br \/>\nThis was created using the following Python script, which iteratively looks for the structure that matches the largest number of molecules in the set, building up a tree as it does so. The output is the tree in a form suitable for depiction using Graphviz&#8217;s dot program. The Python script uses Open Babel, but could easily be adapted for other toolkits.<br \/>\n<script type=\"text\/javascript\" src=\"https:\/\/gist.github.com\/3857443.js?file=substructure_hierarchy.py\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Given a set of chemical structures as SMILES, how can you visualise the substructure\/superstructure relationship between them? For example, the following picture shows the relationship between members of a set of structures containing several benzene derivatives and monosaccharides: This was created using the following Python script, which iteratively looks for the structure that matches the &hellip; <a href=\"https:\/\/nextmovesoftware.com\/blog\/2012\/10\/09\/visualising-a-hierarchy-of-substructures\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Visualising a hierarchy of substructures<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/nextmovesoftware.com\/blog\/wp-json\/wp\/v2\/posts\/26"}],"collection":[{"href":"https:\/\/nextmovesoftware.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nextmovesoftware.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nextmovesoftware.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/nextmovesoftware.com\/blog\/wp-json\/wp\/v2\/comments?post=26"}],"version-history":[{"count":9,"href":"https:\/\/nextmovesoftware.com\/blog\/wp-json\/wp\/v2\/posts\/26\/revisions"}],"predecessor-version":[{"id":1484,"href":"https:\/\/nextmovesoftware.com\/blog\/wp-json\/wp\/v2\/posts\/26\/revisions\/1484"}],"wp:attachment":[{"href":"https:\/\/nextmovesoftware.com\/blog\/wp-json\/wp\/v2\/media?parent=26"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nextmovesoftware.com\/blog\/wp-json\/wp\/v2\/categories?post=26"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nextmovesoftware.com\/blog\/wp-json\/wp\/v2\/tags?post=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}