As the chemical industry continues to produce considerable quantities of waste chemicals1,2, it is essential to devise 'circular chemistry'3-8 schemes to productively back-convert at least a portion of these unwanted materials into useful products. Despite substantial progress in the degradation of some classes of harmful chemicals9, work on 'closing the circle'-transforming waste substrates into valuable products-remains fragmented and focused on well known areas10-15. Comprehensive analyses of which valuable products are synthesizable from diverse chemical wastes are difficult because even small sets of waste substrates can, within few steps, generate millions of putative products, each synthesizable by multiple routes forming densely connected networks. Tracing all such syntheses and selecting those that also meet criteria of process and 'green' chemistries is, arguably, beyond the cognition of human chemists. Here we show how computers equipped with broad synthetic knowledge can help address this challenge. Using the forward-synthesis Allchemy platform16, we generate giant synthetic networks emanating from approximately 200 waste chemicals recycled on commercial scales, retrieve from these networks tens of thousands of routes leading to approximately 300 important drugs and agrochemicals, and algorithmically rank these syntheses according to the accepted metrics of sustainable chemistry17-19. Several of these routes we validate by experiment, including an industrially realistic demonstration on a 'pharmacy on demand' flow-chemistry platform20. Wide adoption of computerized waste-to-valuable algorithms can accelerate productive reuse of chemicals that would otherwise incur storage or disposal costs, or even pose environmental hazards.
© 2022. The Author(s), under exclusive licence to Springer Nature Limited.