Structural annotation of small molecules in tandem mass spectrometry has always been a central challenge in mass spectrometry analysis, especially using a miniaturized mass spectrometer for on-site testing. Here, we propose the Transformer enabled Fragment Tree (TeFT) method, which combines various types of fragmentation tree models and a deep learning Transformer module. It is aimed to generate the specific structure of molecules de novo solely from mass spectrometry spectra. The evaluation results on different open-source databases indicated that the proposed model achieved remarkable results in that the majority of molecular structures of compounds in the test can be successfully recognized. Also, the TeFT has been validated on a miniaturized mass spectrometer with low-resolution spectra for 16 flavonoid alcohols, achieving complete structure prediction for 8 substances. Finally, TeFT confirmed the structure of the compound contained in a Chinese medicine substance called the Anweiyang capsule. These results indicate that the TeFT method is suitable for annotating fragmentation peaks with clear fragmentation rules, particularly when applied to on-site mass spectrometry with lower mass resolution.
The drug detection technology plays a pivotal role in the domains of pharmaceutical regulation and law enforcement. In this study, we introduce a method that combines thermal desorption corona discharge ionization (TD-CDI) with mass spectrometry for efficient drug detection. The TD-CDI module, characterized by its compact and simple design, enables the separation of analytes within seconds and real-time presentation of one or two analyte peaks on the mass spectrum most of the time, which reduces matrix interference and improves detection performance. Through experimental investigation, we studied the characteristics of TD-CDI for analyte separation and detection, even with the same mass number, and optimized the TD-CDI approach. TD-CDI-MS was employed for the rapid detection of drugs in various traditional medicine, food products, and human samples. Additionally, by utilizing TD-CDI for segmented hair direct analysis, it becomes possible to trace the drug usage cycle of individuals. This underscores the feasibility of the proposed analytical method within the realm of drug detection.