Abstract
Identification and control of impurities play a critical role in chemical process development for drug substance synthesis. Most chemical reactions result in a number of by-products and side-products, along with the intended major product. While chemists can predict many of the main process impurities, it remains challenging to enumerate the possible minor impurities and even more of a challenge to track and propagate impurities derived from raw materials or from step to step. Further, in the absence of a systematic means for listing out possible-low-level impurities and performing impurity propagation, inverse structure elucidation -- that is, identifying unknown impurities post hoc from analytical data, such as mass spectrometry data -- presents a significant challenge. In this work, impurity prediction was established by developing an AI-based reaction predictor that takes as input the main reactants, and reagents, solvents, and impurities in these materials. Further, the predictor was run iteratively to track impurity propagation in multi-step reactions. For inverse structure elucidation, a chemistry-informed language model was developed to translate mass spectrometry data to potential molecular structures, which can then be checked for matches against the predicted chemical reaction products. The impurity prediction tool was applied to synthesis of common small molecule drugs –- paracetamol and ibuprofen. The inverse structure elucidation tool was used for the identification of chemical structures from publicly available electrospray ionization mass spectrometry data.