# OpenBioMed **Repository Path**: os-share/OpenBioMed ## Basic Information - **Project Name**: OpenBioMed - **Description**: 生物医药智能体开发平台。OpenBioMed是一个面向生命科学研究和药物研发的Python深度学习工具包。OpenBioMed为小分子结构、蛋白质结构、单细胞转录组学数据、知识图谱和生物医学文本等多模态数据提供了灵活的数据处理接口。OpenBioMed构建了20余个计算工具。此外,为研究者提供了一套易用的工作流构建界面,支持以拖拽形式对接多个模型,并构建基于大语言模型的智能体以解决复杂的科研问题。 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: drugfm - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-03-20 - **Last Updated**: 2025-03-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README

DrugFM

This repository mainly holds **DrugFM** (🤖[Model](https://pan.baidu.com/s/1iAMBkuoZnNAylhopP5OgEg?pwd=7a6b#list/path=%2F)), a multi-modal molecular foundation model jointly developed by Institute of AI Industry Research (AIR) and Beijing Academy of Artificial Intelligence, BAAI. DrugFM comprises **1.06B** parameters. It leverages a MoE gate to jointly incorporate molecular representations from GraphMVP, UniMAP and UniMol based on text features. It leverages a multi-modal encoder and a multi-modal decoder for jointly comprehending molecules and texts. DrugFM achieves SOTA on cross-modal retrieval and generation. ## Installation 1. (Optional) Creating conda environment: ```bash conda create -n drugfm python=3.9 conda activate drugfm ``` 2. Install required packages: ``` pip install -r requirements.txt ``` 3. Install Pyg dependencies: ```bash pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-(your_torch_version)+(your_cuda_version).html pip install torch-geometric # If you have issues installing the above PyTorch-related packages, instructions at https://pytorch.org/get-started/locally/ and https://github.com/pyg-team/pytorch_geometric may help. You may find it convenient to directly install PyTorch Geometric and its extensions from wheels available at https://data.pyg.org/whl/. ``` 4. Install packages for cross-modal generation ```bash pip install spacy pip install rouge_score pip install Levenshtein pip install nltk python >>> import nltk >>> nltk.download('wordnet') >>> nltk.download('omw-1.4') ``` ## Quick Start For cross-modal retrieval, run the following script: ```bash bash scripts/multimodal/mtr/test_pcdes.sh drugfm cuda:0 # switch to your own cuda device or cpu ``` For molecule captioning, run the following script: ```bash bash scripts/multimodal/molcap/train.sh drugfm cuda:0 # switch to your own cuda device or cpu ``` For molecule captioning, run the following script: ```bash bash scripts/multimodal/text2smi/train.sh drugfm cuda:0 # switch to your own cuda device or cpu ``` ## Cite DrugFM ``` @misc{DrugFM_code, author={Luo, Yizhen and Yang, Kai and Hong, Massimo and Liu, Xing Yi and Zhao, Suyuan and Zhang, Jiahuan and Wu, Yushuai and Nie, Zaiqing}, title={Code of DrugFM}, year={2023}, howpublished={\url{https://github.com/Pharmolix/OpenBioMed.git}} } ```