While various models and computational tools have been proposed for structure and property analysis of molecules, generating molecules that conform to all desired structures and properties remains a challenge. Here, we introduce a multi-constraint molecular generation large language model, TSMMG, which, akin to a student, incorporates knowledge from various small models and tools, namely, the 'teachers'. To train TSMMG, we construct a large set of text-molecule pairs by extracting molecular knowledge from these 'teachers', enabling it to generate novel molecules that conform to the descriptions through various text prompts. We experimentally show that TSMMG remarkably performs in generating molecules meeting complex, natural language-described property requirements across two-, three-, and four-constraint tasks, with an average molecular validity of over 99% and success ratio of 88.08%, 65.27%, and 61.44%, respectively. The model also exhibits adaptability through zero-shot testing, creating molecules that satisfy combinations of properties that have not been encountered. It can comprehend text inputs with various language styles, extending beyond the confines of outlined prompts, as confirmed through empirical validation. Additionally, the knowledge distillation feature of TSMMG contributes to the continuous enhancement of small models, while the innovative approach to dataset construction effectively addresses the issues of data scarcity and quality, which positions TSMMG as a promising tool in the domains of drug discovery and materials science. Code is available at https://github.com/HHW-zhou/TSMMG.
翻译:尽管已有多种模型和计算工具被提出用于分子的结构与性质分析,但生成同时满足所有期望结构和性质的分子仍是一项挑战。本文提出了一种多约束分子生成大语言模型TSMMG,该模型类似于学生角色,整合了来自多种小模型和工具(即“教师”)的知识。为训练TSMMG,我们通过从这些“教师”中提取分子知识构建了一个大规模的文本-分子配对数据集,使其能够根据各种文本提示生成符合描述的新颖分子。实验表明,TSMMG在二约束、三约束和四约束任务中,生成符合复杂自然语言描述性质要求的分子方面表现卓越,平均分子有效性超过99%,成功率分别为88.08%、65.27%和61.44%。该模型还通过零样本测试展现了适应性,能够生成满足未经训练的未知性质组合的分子。实验验证进一步证实,模型可理解多种语言风格的文本输入,突破了预设提示的限制。此外,TSMMG的知识蒸馏特性有助于小模型的持续优化,而创新的数据集构建方法有效解决了数据稀缺与质量问题,使其成为药物发现和材料科学领域极具前景的工具。代码开源地址:https://github.com/HHW-zhou/TSMMG。