[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-LPDI-EPFL--masif":3,"tool-LPDI-EPFL--masif":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",160411,2,"2026-04-18T23:33:24",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",109154,"2026-04-18T11:18:24",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":76,"owner_email":76,"owner_twitter":76,"owner_website":76,"owner_url":77,"languages":78,"stars":95,"forks":96,"last_commit_at":97,"license":98,"difficulty_score":10,"env_os":99,"env_gpu":100,"env_ram":101,"env_deps":102,"category_tags":116,"github_topics":117,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":121,"updated_at":122,"faqs":123,"releases":159},9447,"LPDI-EPFL\u002Fmasif","masif","MaSIF- Molecular surface interaction fingerprints. Geometric deep learning to decipher patterns in molecular surfaces.","MaSIF（分子表面相互作用指纹）是一款利用几何深度学习技术，专门用于解析蛋白质分子表面特征模式的开源工具。它主要解决了传统方法难以高效识别和预测蛋白质表面关键生物分子相互作用位点的难题，例如配体结合口袋预测、蛋白 - 蛋白相互作用位点判定以及复合物结构的超快速扫描。\n\n该工具的核心工作流程是将复杂的蛋白质表面分解为重叠的径向补丁，为每个点赋予几何与化学特征，并通过神经网络生成独特的“指纹”描述符。这些描述符能够灵活适配不同的训练目标，从而在多种生物计算任务中实现高精度分类。相比早期版本，MaSIF 已全面采用 Python 和 TensorFlow 重构，大幅简化了安装部署流程，并提供了 PyMOL 插件和 Docker 容器支持，提升了易用性。\n\nMaSIF 特别适合生物信息学研究人员、计算生物学开发者以及从事药物发现领域的科学家使用。对于希望探索深度学习在结构生物学中应用的研究者而言，它不仅复现了发表于《Nature Methods》的前沿成果，更提供了一个可扩展的代码框架，便于在此基础上开发新的蛋白质表面学习应用。","\n![MaSIF banner and concept](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLPDI-EPFL_masif_readme_a14ac957da1f.png)\n\n## MaSIF- Molecular Surface Interaction Fingerprints: Geometric deep learning to decipher patterns in protein molecular surfaces.\n\n[![bioRxiv shield](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FbioRxiv-1709.01233-green.svg?style=flat)](https:\u002F\u002Fwww.biorxiv.org\u002Fcontent\u002F10.1101\u002F606202v1)\n[![DOI](https:\u002F\u002Fzenodo.org\u002Fbadge\u002FDOI\u002F10.5281\u002Fzenodo.2625420.svg)](https:\u002F\u002Fdoi.org\u002F10.5281\u002Fzenodo.2625420)\n\n\n## Table of Contents: \n\n- [Description](#description)\n- [System and hardware requirements](#system-and-hardware-requirements)\n- [Software prerequisites](#software-prerequisites)\n- [Installation](#Installation)\n- [Method overview](#Method-overview)\n     * [MaSIF data preparation](#MaSIF-data-preparation)\n- [MaSIF applications](#MaSIF-proof-of-concept-applications)\n     * [MaSIF-ligand](#MaSIF-ligand)\n     * [MaSIF-site](#MaSIF-site)\n     * [MaSIF-search](#MaSIF-search)\n- [PyMOL plugin](#PyMOL-plugin)\n- [Docker container](#Docker-container)\n- [License](#License)\n- [Reference](#Reference)\n## Description\n\nMaSIF is a proof-of-concept method to decipher patterns\nin protein surfaces important for specific biomolecular interactions. \nTo achieve this, MaSIF exploits techniques from the field of geometric deep learning.\nFirst, MaSIF decomposes a surface into overlapping radial patches with a fixed geodesic radius, wherein each \npoint is assigned an array of geometric and chemical features. MaSIF then computes a descriptor \nfor each surface patch, a vector that encodes a description of the features present in the patch. \nThen, this descriptor can be processed in a set of additional layers where different interactions \ncan be classified. The features \nencoded in each descriptor and the final output depend on the application-specific training data and the \noptimization objective, meaning that the same architecture can be repurposed for various tasks.\n\nThis repository contains a protocol to prepare protein structure files into feature-rich surfaces \n(with both geometric and chemical features),\nto decompose these into patches, and tensorflow-based neural network code\nto identify patterns in these using deep geometric learning.\nTo show the potential of the approach, we showcase three proof-of-concept applications: \na) ligand prediction for protein binding pockets (MaSIF-ligand); b) protein-protein interaction \n(PPI) site prediction in protein surfaces, to predict which surface patches on a protein are more \nlikely to interact with other proteins (MaSIF-site); c) ultrafast scanning of surfaces, where we use \nsurface fingerprints from binding partners to predict the structural configuration of protein-protein complexes (MaSIF-search). \n\nThis repository should closely reproduce the experiments of: \n\nGainza, P., Sverrisson, F., Monti, F., Rodola, E., Boscaini, D Bronstein, M. M., & Correia, B. E. (2019).\nDeciphering interaction fingerprints from protein molecular surfaces using geometric deep learning.\nNat Methods 17, 184–192 (2020). https:\u002F\u002Fdoi.org\u002F10.1038\u002Fs41592-019-0666-6\n\n\u003Cspan style=\"color:red\">Note: Since Feb 2020, we have greatly simplified the installation of MaSIF by replacing all Matlab code with Python code. However, this slightly changes the results from the paper. To reproduce the results for the paper exactly as published (with the pretrained neural networks) you can obtain it at: https:\u002F\u002Fgithub.com\u002Fpablogainza\u002Fmasif_paper \u003C\u002Fspan>.\n\nMaSIF is distributed under an [Apache License](https:\u002F\u002Fraw.githubusercontent.com\u002FLPDI-EPFL\u002Fmasif\u002Fmaster\u002FLICENSE). This \ncode is meant to serve as a tutorial, and the basis for researchers to exploit MaSIF in protein-surface learning tasks. \n\n## System and hardware requirements\n\nMaSIF has been tested on both Linux (Red Hat Enterprise Linux Server release 7.4, with a Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz \nprocessesor and 16GB of memory allotment) and Mac OS environments (macOS High Sierra, processor 2.8 GHz Intel Core i7, 16GB memory). \nTo reproduce the experiments in the paper, the entire datasets for all proteins consume about 1.4 terabytes.\n\nCurrently, MaSIF takes about 2 minutes to preprocess every protein. For this reason, we recommend a distributed cluster to \npreprocess the data for large datasets of proteins. Once data has been preprocessed, we strongly recommend using a GPU to \ntrain or evaluate the trained models as it can be up to 100 times faster than a CPU. \n\n## Software prerequisites \nMaSIF relies on external software\u002Flibraries to handle protein databank files and surface files, \nto compute chemical\u002Fgeometric features and coordinates, and to perform neural network calculations. \nThe following is the list of required libraries and programs, as well as the version on which it was tested (in parenthesis).\n* [Python](https:\u002F\u002Fwww.python.org\u002F) (3.6)\n* [reduce](http:\u002F\u002Fkinemage.biochem.duke.edu\u002Fsoftware\u002Freduce.php) (3.23). To add protons to proteins. \n* [MSMS](http:\u002F\u002Fmgltools.scripps.edu\u002Fpackages\u002FMSMS\u002F) (2.6.1). To compute the surface of proteins. \n* [BioPython](https:\u002F\u002Fgithub.com\u002Fbiopython\u002Fbiopython) (1.66) . To parse PDB files. \n* [PyMesh](https:\u002F\u002Fgithub.com\u002FPyMesh\u002FPyMesh) (0.1.14). To handle ply surface files, attributes, and to regularize meshes.\n* PDB2PQR (2.1.1), multivalue, and [APBS](http:\u002F\u002Fwww.poissonboltzmann.org\u002F) (1.5). These programs are necessary to compute electrostatics charges.\n* [open3D](https:\u002F\u002Fgithub.com\u002FIntelVCL\u002FOpen3D) (0.5.0.0). Mainly used for RANSAC alignment.\n* [Tensorflow](https:\u002F\u002Fwww.tensorflow.org\u002F) (1.9). Use to model, train, and evaluate the actual neural networks. Models were trained and evaluated on a NVIDIA Tesla K40 GPU.\n* [StrBioInfo](https:\u002F\u002Fpypi.org\u002Fproject\u002FStrBioInfo\u002F). Used for parsing PDB files and generate biological assembly for MaSIF-ligand.\n* [Dask](https:\u002F\u002Fdask.org\u002F) (2.2.0). Run function calls on multiple threads (Optional for reproducing some benchmarks).\n* [Pymol](https:\u002F\u002Fpymol.org\u002F2\u002F). This optional plugin allows one to visualize surface files in PyMOL.\n \nAlternatively you can use the Docker version, which is the easiest to install (See [Docker container](#Docker-container))\n## Installation \nAfter preinstalling dependencies, add the following environment variables to your path, changing the appropriate directories:\n\n```\nexport APBS_BIN=\u002Fpath\u002Fto\u002Fapbs\u002FAPBS-1.5-linux64\u002Fbin\u002Fapbs\nexport MULTIVALUE_BIN=\u002Fpath\u002Fto\u002Fapbs\u002FAPBS-1.5-linux64\u002Fshare\u002Fapbs\u002Ftools\u002Fbin\u002Fmultivalue\nexport PDB2PQR_BIN=\u002Fpath\u002Fto\u002Fapbs\u002Fapbs\u002Fpdb2pqr-linux-bin64-2.1.1\u002Fpdb2pqr\nexport PATH=$PATH:\u002Fpath\u002Fto\u002Freduce\u002F\nexport REDUCE_HET_DICT=\u002Fpath\u002Fto\u002Freduce\u002Freduce_wwPDB_het_dict.txt\nexport PYMESH_PATH=\u002Fpath\u002Fto\u002FPyMesh\nexport MSMS_BIN=\u002Fpath\u002Fto\u002Fmsms\u002Fmsms\nexport PDB2XYZRN=\u002Fpath\u002Fto\u002Fmsms\u002Fpdb_to_xyzrn\n```\n\nClone masif to a local directory\n\n```\ngit clone https:\u002F\u002Fgithub.com\u002Flpdi-epfl\u002Fmasif\ncd masif\u002F\n```\n\nSince MaSIF is written in Python, no compilation is required.\n\n## Method overview \n\nFrom a protein structure MaSIF computes a molecular surface discretized as a mesh according to the solvent \nexcluded surface (computed using MSMS), and assigns geometric and chemical features to every point (vertex) \nin the mesh. \nAround each vertex of the mesh, we extract a patch with geodesic radius of r=9 Å or r=12 Å.\nThen, MaSIF applies a geometric deep neural network to these patches. \nThe neural network consists of one or more layers applied sequentially; a key component \nof the architecture is the geodesic convolution, generalizing the classical convolution \nto surfaces and implemented as an operation on local patches. \n\n![MaSIF conceptual framework and method](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLPDI-EPFL_masif_readme_6d31b65ee26a.png)\n\nThe procedure is repeated for different patch locations \nsimilarly to a sliding window operation on images, producing the surface fingerprint descriptor\nat each point, in the form of a vector that stores information about the surface patterns \nof the center point and its neighborhood. The parameter set minimizes \na cost function on the training dataset, which is specific to each application that we \npresent here. \n\n\n### MaSIF data preparation\n\nFor each application, MaSIF requires a preprocessing of data. This entails a running a scripted protocol, \nwhich performs the following steps: \n\n1. Download the PDB. \n2. Protonate the PDB, extract the desired chains, triangulate the surface (using MSMS), and compute chemical features. \n3. Extract all patches, with features and coordinates, for each protein.\n\nMaSIF's main speed bottleneck lie in these three steps. The main performance bottlenecks are computing the angular coordinates using MDS, computing the Poisson-Boltzmann electrostatics and regularizing the mesh after computing the MSMS surface.\n\nEach application data directory (under masif\u002Fdata\u002Fmasif\\*) contains a script to precompute the data.\n\nTo run this protocol for a single protein, (e.g. chain A of PDB id code 1MBN ) run: \n\n```\n.\u002Fdata_prepare_one.sh 1MBN_A_\n```\n\nTo run it on a pair of interacting protein domains (chains A,B, of PDB id 1AKJ form the first domain and chains D,E form the second domain): \n\n```\n.\u002Fdata_prepare_one.sh 1AKJ_AB_DE\n```\n\nIf you have access to a cluster (strongly recommended), then this process can be run in parallel. If your cluster supports slurm files, we provide a slurm file under each application data directory. which can be run using sbatch: \n\n```\nsbatch data_prepare.slurm\n```\n\nMost of the PDBs that were used for the paper, and their corresponding surfaces (with precomputed chemical features) are available at: https:\u002F\u002Fdoi.org\u002F10.5281\u002Fzenodo.2625420 . The unbound proteins are available in this repository under [data\u002Fmasif_ppi_search_ub\u002Fdata_preparation\u002F00-raw_pdbs\u002F](https:\u002F\u002Fgithub.com\u002FLPDI-EPFL\u002Fmasif\u002Ftree\u002Fmaster\u002Fdata\u002Fmasif_ppi_search_ub\u002Fdata_preparation\u002F00-raw_pdbs).\n\nNote that the preparation of the data can consume a large amount of space for large protein databases. This is due to the fact that the preprocessing step decomposes protein surfaces into overlapping patches, which results in a large amount of duplicated data. In upcoming versions we hope to optimize this process to perform patch-decomposition operations on-the-fly, eliminating the need for large amounts of disk space.\n\n## MaSIF proof-of-concept applications\n\nMaSIF was tested on three proof-of-concept applications. For each application we provide the trained neural network model that was used for the main experiments in the paper.\n\n![MaSIF proof-of-concept applications](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLPDI-EPFL_masif_readme_33dd08907947.png)\n\n### MaSIF-ligand\n\n```\ncd data\u002Fmasif_site\u002F\n```\n\nThe lists of pdb ids and chains used in the training and test sets are located, in numpy format, under: \n\n```\ndata\u002Fmasif_ligand\u002Flists\u002Ftest_pdbs_sequence.npy\ndata\u002Fmasif_ligand\u002Flists\u002Ftrain_pdbs_sequence.npy\ndata\u002Fmasif_ligand\u002Flists\u002Fval_pdbs_sequence.npy\n```\n\nEach of these files can be read using the numpy.load function.\n\nPrecompute the datasets (see [MaSIF data preparation](#MaSIF-data-preparation)), ideally using slurm:\n\n```\nsbatch prepare_data.slurm\n```\n\nBe sure you have enough disk space, about 400GB.\n\nOnce the data has been precomputed, MaSIF-ligand requires the generation of Tensorflow \n[TFRecords](#https:\u002F\u002Fwww.tensorflow.org\u002Ftutorials\u002Fload_data\u002Ftf_records) for training.\nFor this, either run slurm or execute the command present in the make_tfrecord.slurm file:\n\n```\nsbatch make_tfrecord.slurm\n```\n\nOnce the tfrecords have been precomputed, the training for the network can start, where we strongly recommend a GPU\n(run the commands in the slurm file one by one if you do not have slurm):\n\n```\nsbatch train_model.slurm\n```\n\nTo evaluate the neural network run: \n```\nsbatch evaluate_test.slurm\n```\n\nThe output of the evaluation is placed under the data\u002Fmasif_ligand\u002Ftest_set_predictions\u002F directory, with two numpy files per input protein databank structure, e.g.: \n\n```\n5LXM_AD_labels.npy\n5LXM_AD_logits.npy\n```\nwhere the labels file contains the ground truth, and the logits file contains the prediction logits.\n\n### MaSIF-site\n\nChange to the masif-site data directory. \n\n```\ncd data\u002Fmasif_site\u002F\n```\n\nThe lists of pdb ids and chains used in the training and test sets are located under: \n\n```\ndata\u002Fmasif_site\u002Fdata\u002Flists\u002Ffull_list.txt\ndata\u002Fmasif_site\u002Fdata\u002Flists\u002Ftraining.txt\ndata\u002Fmasif_site\u002Fdata\u002Flists\u002Ftesting.txt\n```\n\nPrecompute the datasets (see [MaSIF data preparation](#MaSIF-data-preparation)), ideally using slurm:\n\n```\nsbatch prepare_data.slurm\n```\n\nBe sure you have enough disk space, about 400GB.\n\nOnce the data has been precomputed, the training for the network can start:\n\n```\n.\u002Ftrain_nn.sh\n```\n\nFor the experiments in the paper we trained MaSIF-site for 40 hours. \n\nOnce a network has been trained, specific proteins can be evaluated. For example to evaluate\nthe selected subset of transient interactions: \n\n```\n.\u002Fpredict_site.sh\n```\n\nThe predictions for each vertex in each protein are stored in the directory data\u002Fmasif_site\u002Foutput\u002Fall_feat_3l\u002Fpred_data\u002F. \nThe surfaces of the predicted sites can be colored according to the site prediction: \n\n```\n.\u002Fcolor_site.sh\n```\n\nand saved to a ply file, under the directory: data\u002Fmasif_site\u002Foutput\u002Fall_feat_3l\u002Fpred_surfaces\u002F\n\nThese surfaces can then be visualized using our [PyMOL plugin](#PyMOL-plugin-installation).\n\nA jupyter notebook with code to compare the prediction on the transient interactiosn of this test set \nto the program [SPPIDER](#http:\u002F\u002Fsppider.cchmc.org\u002F) can be found at:\n\n```\nmasif\u002Fcomparison\u002Fmasif_site\u002Fmasif_vs_sppider\u002Fmasif_sppider_comp.ipynb\n```\n\n### MaSIF-search\n\nChange to the masif-search data directory. \n\n```\ncd data\u002Fmasif_ppi_search\u002F\n```\n\nThe lists of pdb ids and chains used in the training and test sets are located under: \n\n```\ndata\u002Fmasif_ppi_searhc\u002Fdata\u002Flists\u002Ffull_list.txt\ndata\u002Fmasif_site\u002Fdata\u002Flists\u002Ftraining.txt\ndata\u002Fmasif_site\u002Fdata\u002Flists\u002Ftesting.txt\n```\n\nPrecompute the datasets (see [MaSIF data preparation](#MaSIF-data-preparation)), ideally using slurm:\n\n```\nsbatch prepare_data.slurm\n```\n\nBe sure you have enough disk space, about 400GB. \n\nFor speed reasons, the actual data that will be used by the neural network is cached in a separate directory. This data consists of the pairs of patches that pass a shape complementarity threshold and an equal number of random patches. This process is run by executing: \n\n```\n.\u002Fcache_nn.sh nn_models.sc05.custom_params\n```\n\nOnce the data has been cached, the training for the network can start:\n\n.\u002Ftrain.sh nn_models.sc05.custom_params\n\nFor the paper we trained for about 40 hours. The neural network model is saved  in the nn_models\u002Fsc05\u002Fall_feat\u002Fmodel_data directory whenever the validation ROC AUC improves over the previously saved model's validation ROC AUC. \n\nOnce the neural network has been trained and saved, descriptors for specific proteins can be computed using the command: \n\n```\n.\u002Fcompute_descriptors.sh lists\u002Ftesting.txt\n```\n\nThese descriptors are saved under the descriptors\u002F directory.\n\nTo evaluate the second stage ransac protocol, go to the masif\u002Fcomparison\u002Fmasif_ppi_search directory: \n\n```\ncd $masif_root\u002Fcomparison\u002Fmasif_ppi_search\u002Fmasif_descriptors\u002F\n.\u002Fsecond_stage.sh\n```\n\nTo reproduce the large PD-L1:PD1 benchmark presented in the paper: \n\n```\ncd data\u002Fmasif_ppi_search\u002Fpdl1_benchmark\n.\u002Frun_benchmark.sh\n```\n\n\n## PyMOL plugin\n\nA PyMOL plugin to visualize protein surfaces is provided in the source\u002Fpymol subdirectory. We used this plugin for all the structural figures \nshown in our paper. This plugin requires PyMOL to be installed in your local computer.\n\nPlease see the following tutorial on how to install it:\n\n[Pymol plugin installation](pymol_plugin_installation.md)\n\nTo load a protein surface file, run this command inside PyMOL: \n\n```\nloadply ABCD_E.ply\n```\n\nExample:\n![MaSIF PyMOL plugin example](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLPDI-EPFL_masif_readme_835ad119387e.png)\n\n## Docker container\n\nThe easiest way to test MaSIF is through a Docker container. Please see our tutorial on reproducing the paper results here:\n\n[Docker container](docker_tutorial.md)\n\n\n## License\n\nMaSIF is released under an [Apache v2.0 license](LICENSE).\n\n## Reference\nIf you use this code, please use the bibtex entry in [citation.bib](citation.bib)\n","![MaSIF 横幅与概念图](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLPDI-EPFL_masif_readme_a14ac957da1f.png)\n\n## MaSIF - 分子表面相互作用指纹：基于几何深度学习解析蛋白质分子表面模式\n\n[![bioRxiv 标志](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FbioRxiv-1709.01233-green.svg?style=flat)](https:\u002F\u002Fwww.biorxiv.org\u002Fcontent\u002F10.1101\u002F606202v1)\n[![DOI](https:\u002F\u002Fzenodo.org\u002Fbadge\u002FDOI\u002F10.5281\u002Fzenodo.2625420.svg)](https:\u002F\u002Fdoi.org\u002F10.5281\u002Fzenodo.2625420)\n\n\n## 目录：\n\n- [描述](#description)\n- [系统及硬件要求](#system-and-hardware-requirements)\n- [软件前提条件](#software-prerequisites)\n- [安装](#Installation)\n- [方法概述](#Method-overview)\n     * [MaSIF 数据准备](#MaSIF-data-preparation)\n- [MaSIF 应用](#MaSIF-proof-of-concept-applications)\n     * [MaSIF-ligand](#MaSIF-ligand)\n     * [MaSIF-site](#MaSIF-site)\n     * [MaSIF-search](#MaSIF-search)\n- [PyMOL 插件](#PyMOL-plugin)\n- [Docker 容器](#Docker-container)\n- [许可证](#License)\n- [参考文献](#Reference)\n## 描述\n\nMaSIF 是一种用于解析蛋白质表面中与特定生物分子相互作用相关模式的概念验证方法。为此，MaSIF 利用了几何深度学习领域的技术。首先，MaSIF 将表面分解为具有固定测地线半径的重叠径向补丁，并为每个点分配一组几何和化学特征。随后，MaSIF 为每个表面补丁计算一个描述符，该描述符是一个编码了补丁中特征信息的向量。然后，这些描述符可以在一系列额外的层中进行处理，以对不同的相互作用进行分类。每个描述符中编码的特征以及最终输出取决于特定应用的训练数据和优化目标，这意味着相同的架构可以被重新用于各种任务。\n\n本仓库包含一个协议，用于将蛋白质结构文件转换为富含特征的表面（同时包含几何和化学特征），并将这些表面分解为补丁，以及基于 TensorFlow 的神经网络代码，以利用几何深度学习识别这些表面中的模式。为了展示该方法的潜力，我们展示了三个概念验证应用：a) 蛋白质结合口袋中的配体预测（MaSIF-ligand）；b) 蛋白质-蛋白质相互作用 (PPI) 位点预测，用于预测蛋白质表面哪些补丁更有可能与其他蛋白质发生相互作用（MaSIF-site）；c) 超快速表面扫描，我们使用结合伙伴的表面指纹来预测蛋白质-蛋白质复合物的结构构型（MaSIF-search）。\n\n本仓库应能紧密复现以下研究的实验结果：\n\nGainza, P., Sverrisson, F., Monti, F., Rodola, E., Boscaini, D Bronstein, M. M., & Correia, B. E. (2019).\n利用几何深度学习从蛋白质分子表面解密相互作用指纹。\nNat Methods 17, 184–192 (2020). https:\u002F\u002Fdoi.org\u002F10.1038\u002Fs41592-019-0666-6\n\n\u003Cspan style=\"color:red\">注：自 2020 年 2 月以来，我们通过用 Python 代码替换所有 MATLAB 代码，极大地简化了 MaSIF 的安装过程。然而，这会略微改变论文中的结果。若要完全按照已发表论文中的结果（包括预训练的神经网络）进行复现，可访问：https:\u002F\u002Fgithub.com\u002Fpablogainza\u002Fmasif_paper \u003C\u002Fspan>。\n\nMaSIF 采用 [Apache 许可证](https:\u002F\u002Fraw.githubusercontent.com\u002FLPDI-EPFL\u002Fmasif\u002Fmaster\u002FLICENSE) 发布。此代码旨在作为教程，为研究人员在蛋白质表面学习任务中使用 MaSIF 提供基础。\n\n## 系统及硬件要求\n\nMaSIF 已在 Linux（Red Hat Enterprise Linux Server release 7.4，配备 Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz 处理器及 16GB 内存）和 Mac OS 环境（macOS High Sierra，处理器为 2.8 GHz Intel Core i7，内存为 16GB）上进行了测试。为复现论文中的实验，所有蛋白质的数据集总共占用约 1.4 TB。\n\n目前，MaSIF 处理每条蛋白质大约需要 2 分钟。因此，对于大型蛋白质数据集，我们建议使用分布式集群来预处理数据。一旦数据预处理完成，我们强烈建议使用 GPU 来训练或评估训练好的模型，因为其速度可能比 CPU 快达 100 倍。\n\n## 软件前提条件\nMaSIF 依赖于外部软件\u002F库来处理蛋白质数据库文件和表面文件，计算化学\u002F几何特征和坐标，以及执行神经网络计算。以下是所需库和程序的列表，以及经过测试的版本（括号内）：\n* [Python](https:\u002F\u002Fwww.python.org\u002F) (3.6)\n* [reduce](http:\u002F\u002Fkinemage.biochem.duke.edu\u002Fsoftware\u002Freduce.php) (3.23)。用于为蛋白质添加质子。\n* [MSMS](http:\u002F\u002Fmgltools.scripps.edu\u002Fpackages\u002FMSMS\u002F) (2.6.1)。用于计算蛋白质表面。\n* [BioPython](https:\u002F\u002Fgithub.com\u002Fbiopython\u002Fbiopython) (1.66)。用于解析 PDB 文件。\n* [PyMesh](https:\u002F\u002Fgithub.com\u002FPyMesh\u002FPyMesh) (0.1.14)。用于处理 ply 格式的表面文件、属性，并对网格进行规整。\n* PDB2PQR (2.1.1)、multivalue 和 [APBS](http:\u002F\u002Fwww.poissonboltzmann.org\u002F) (1.5)。这些程序是计算静电荷所必需的。\n* [open3D](https:\u002F\u002Fgithub.com\u002FIntelVCL\u002FOpen3D) (0.5.0.0)。主要用于 RANSAC 配准。\n* [Tensorflow](https:\u002F\u002Fwww.tensorflow.org\u002F) (1.9)。用于构建、训练和评估实际的神经网络。模型是在 NVIDIA Tesla K40 GPU 上训练和评估的。\n* [StrBioInfo](https:\u002F\u002Fpypi.org\u002Fproject\u002FStrBioInfo\u002F)。用于解析 PDB 文件并为 MaSIF-ligand 生成生物学组装。\n* [Dask](https:\u002F\u002Fdask.org\u002F) (2.2.0)。用于在多个线程上运行函数调用（可选，用于复现部分基准测试）。\n* [Pymol](https:\u002F\u002Fpymol.org\u002F2\u002F)。此可选插件允许用户在 PyMOL 中可视化表面文件。\n\n或者，您也可以使用 Docker 版本，这是最易于安装的方式（参见 [Docker 容器](#Docker-container)）。\n## 安装\n在预先安装好依赖项后，请将以下环境变量添加到您的路径中，并根据实际情况更改目录：\n\n```\nexport APBS_BIN=\u002Fpath\u002Fto\u002Fapbs\u002FAPBS-1.5-linux64\u002Fbin\u002Fapbs\nexport MULTIVALUE_BIN=\u002Fpath\u002Fto\u002Fapbs\u002FAPBS-1.5-linux64\u002Fshare\u002Fapbs\u002Ftools\u002Fbin\u002Fmultivalue\nexport PDB2PQR_BIN=\u002Fpath\u002Fto\u002Fapbs\u002Fapbs\u002Fpdb2pqr-linux-bin64-2.1.1\u002Fpdb2pqr\nexport PATH=$PATH:\u002Fpath\u002Fto\u002Freduce\u002F\nexport REDUCE_HET_DICT=\u002Fpath\u002Fto\u002Freduce\u002Freduce_wwPDB_het_dict.txt\nexport PYMESH_PATH=\u002Fpath\u002Fto\u002FPyMesh\nexport MSMS_BIN=\u002Fpath\u002Fto\u002Fmsms\u002Fmsms\nexport PDB2XYZRN=\u002Fpath\u002Fto\u002Fmsms\u002Fpdb_to_xyzrn\n```\n\n将 masif 克隆到本地目录：\n\n```\ngit clone https:\u002F\u002Fgithub.com\u002Flpdi-epfl\u002Fmasif\ncd masif\u002F\n```\n\n由于 MaSIF 是用 Python 编写的，因此无需编译。\n\n## 方法概述\n\nMaSIF 从蛋白质结构出发，基于溶剂可及表面（使用 MSMS 计算得到）构建一个离散化的分子表面网格，并为网格中的每个顶点分配几何和化学特征。在网格的每个顶点周围，我们提取一个测地半径为 r=9 Å 或 r=12 Å 的局部区域。随后，MaSIF 对这些局部区域应用几何深度神经网络。该神经网络由一个或多个层顺序堆叠而成；其架构中的关键组件是测地卷积，它将经典的卷积操作推广到曲面上，并以局部区域上的运算形式实现。\n\n![MaSIF 概念框架与方法](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLPDI-EPFL_masif_readme_6d31b65ee26a.png)\n\n这一过程会针对不同的局部区域位置重复进行，类似于图像上的滑动窗口操作，从而在每个点生成表面指纹描述符——一个向量，用于存储中心点及其邻域的表面模式信息。模型参数通过在训练数据集上最小化特定于本文所介绍的每种应用的损失函数来确定。\n\n\n### MaSIF 数据准备\n\n对于每种应用，MaSIF 需要对数据进行预处理。这包括运行一个脚本化的流程，具体步骤如下：\n\n1. 下载 PDB 文件。\n2. 对 PDB 进行质子化处理，提取所需的链段，利用 MSMS 对表面进行三角剖分，并计算化学特征。\n3. 提取每条蛋白质的所有局部区域，包括其特征和坐标。\n\nMaSIF 的主要性能瓶颈在于上述三个步骤。其中，使用 MDS 计算角度坐标、计算泊松-玻尔兹曼静电势，以及在完成 MSMS 表面计算后对网格进行规整，是主要的性能瓶颈所在。\n\n每个应用的数据目录（位于 masif\u002Fdata\u002Fmasif\\* 下）都包含一个用于预计算数据的脚本。\n\n若要为单个蛋白质运行此流程（例如，PDB ID 代码为 1MBN 的 A 链），可执行以下命令：\n\n```\n.\u002Fdata_prepare_one.sh 1MBN_A_\n```\n\n若要对一对相互作用的蛋白质结构域运行此流程（例如，PDB ID 1AKJ 中的 A 和 B 链构成第一个结构域，D 和 E 链构成第二个结构域），则执行：\n\n```\n.\u002Fdata_prepare_one.sh 1AKJ_AB_DE\n```\n\n如果您可以访问集群（强烈推荐），则可以并行运行此流程。如果您的集群支持 Slurm 作业提交文件，我们会在每个应用的数据目录下提供一个 Slurm 文件，可通过 sbatch 命令运行：\n\n```\nsbatch data_prepare.slurm\n```\n\n论文中使用的大多数 PDB 文件及其对应的表面（已预先计算好化学特征）可在以下网址获取：https:\u002F\u002Fdoi.org\u002F10.5281\u002Fzenodo.2625420 。未结合状态的蛋白质则可在该仓库的 [data\u002Fmasif_ppi_search_ub\u002Fdata_preparation\u002F00-raw_pdbs\u002F](https:\u002F\u002Fgithub.com\u002FLPDI-EPFL\u002Fmasif\u002Ftree\u002Fmaster\u002Fdata\u002Fmasif_ppi_search_ub\u002Fdata_preparation\u002F00-raw_pdbs) 目录下找到。\n\n需要注意的是，对于大型蛋白质数据库而言，数据预处理可能会占用大量存储空间。这是因为预处理步骤会将蛋白质表面分解为重叠的局部区域，从而导致大量数据冗余。在未来的版本中，我们希望优化这一流程，实现在需要时动态进行局部区域分解，从而避免对大量磁盘空间的需求。\n\n## MaSIF 概念验证应用\n\nMaSIF 在三个概念验证应用上进行了测试。对于每个应用，我们都提供了用于论文中主要实验的训练好的神经网络模型。\n\n![MaSIF 概念验证应用](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLPDI-EPFL_masif_readme_33dd08907947.png)\n\n### MaSIF-ligand\n\n```\ncd data\u002Fmasif_site\u002F\n```\n\n训练集和测试集中使用的 PDB ID 及链的信息以 NumPy 格式存储在以下路径：\n\n```\ndata\u002Fmasif_ligand\u002Flists\u002Ftest_pdbs_sequence.npy\ndata\u002Fmasif_ligand\u002Flists\u002Ftrain_pdbs_sequence.npy\ndata\u002Fmasif_ligand\u002Flists\u002Fval_pdbs_sequence.npy\n```\n\n这些文件均可使用 numpy.load 函数读取。\n\n请预计算数据集（参见 [MaSIF 数据准备](#MaSIF-data-preparation)），理想情况下使用 Slurm：\n\n```\nsbatch prepare_data.slurm\n```\n\n请确保拥有足够的磁盘空间，约 400GB。\n\n数据预处理完成后，MaSIF-ligand 需要生成用于训练的 TensorFlow [TFRecords](#https:\u002F\u002Fwww.tensorflow.org\u002Ftutorials\u002Fload_data\u002Ftf_records)。为此，您可以运行 Slurm 作业，或直接执行 make_tfrecord.slurm 文件中的命令：\n\n```\nsbatch make_tfrecord.slurm\n```\n\nTFRecords 预计算完成后，即可开始网络训练，强烈建议使用 GPU：\n\n```\nsbatch train_model.slurm\n```\n\n评估神经网络时，请运行：\n\n```\nsbatch evaluate_test.slurm\n```\n\n评估结果将保存在 data\u002Fmasif_ligand\u002Ftest_set_predictions\u002F 目录下，每个输入蛋白质结构对应两个 NumPy 文件，例如：\n\n```\n5LXM_AD_labels.npy\n5LXM_AD_logits.npy\n```\n\n其中，labels 文件包含真实标签，logits 文件则包含预测的 logits 值。\n\n### MaSIF-site\n\n切换到 maif-site 数据目录：\n\n```\ncd data\u002Fmasif_site\u002F\n```\n\n训练集和测试集中使用的 PDB ID 及链的信息存储在以下路径：\n\n```\ndata\u002Fmasif_site\u002Fdata\u002Flists\u002Ffull_list.txt\ndata\u002Fmasif_site\u002Fdata\u002Flists\u002Ftraining.txt\ndata\u002Fmasif_site\u002Fdata\u002Flists\u002Ftesting.txt\n```\n\n请预计算数据集（参见 [MaSIF 数据准备](#MaSIF-data-preparation)），理想情况下使用 Slurm：\n\n```\nsbatch prepare_data.slurm\n```\n\n请确保拥有足够的磁盘空间，约 400GB。\n\n数据预处理完成后，即可开始网络训练：\n\n```\n.\u002Ftrain_nn.sh\n```\n\n在论文的实验中，MaSIF-site 网络训练了 40 小时。\n\n网络训练完成后，可以对特定蛋白质进行评估。例如，要评估选定的瞬时相互作用子集，可执行：\n\n```\n.\u002Fpredict_site.sh\n```\n\n每个蛋白质中每个顶点的预测结果将存储在 data\u002Fmasif_site\u002Foutput\u002Fall_feat_3l\u002Fpred_data\u002F 目录下。可以根据预测结果为相应位点着色：\n\n```\n.\u002Fcolor_site.sh\n```\n\n并将结果保存为 ply 文件，存放在 data\u002Fmasif_site\u002Foutput\u002Fall_feat_3l\u002Fpred_surfaces\u002F 目录中。\n\n之后，您可以通过我们的 [PyMOL 插件](#PyMOL-plugin-installation) 查看这些表面。\n\n此外，还有一个 Jupyter Notebook，其中包含代码，用于将该测试集中瞬时相互作用的预测结果与程序 [SPPIDER](#http:\u002F\u002Fsppider.cchmc.org\u002F) 的结果进行比较，该 Notebook 的路径为：\n\n```\nmasif\u002Fcomparison\u002Fmasif_site\u002Fmasif_vs_sppider\u002Fmasif_sppider_comp.ipynb\n```\n\n### MaSIF-搜索\n\n切换到 masif-search 数据目录。\n\n```\ncd data\u002Fmasif_ppi_search\u002F\n```\n\n训练集和测试集中使用的 PDB ID 和链的列表位于以下路径：\n\n```\ndata\u002Fmasif_ppi_searhc\u002Fdata\u002Flists\u002Ffull_list.txt\ndata\u002Fmasif_site\u002Fdata\u002Flists\u002Ftraining.txt\ndata\u002Fmasif_site\u002Fdata\u002Flists\u002Ftesting.txt\n```\n\n预计算数据集（参见 [MaSIF 数据准备](#MaSIF-data-preparation)），理想情况下使用 Slurm 提交作业：\n\n```\nsbatch prepare_data.slurm\n```\n\n请确保有足够的磁盘空间，大约 400GB。\n\n出于速度考虑，神经网络实际使用的数据会被缓存到一个单独的目录中。这些数据包括通过形状互补性阈值的补丁对，以及相同数量的随机补丁。该过程通过执行以下命令运行：\n\n```\n.\u002Fcache_nn.sh nn_models.sc05.custom_params\n```\n\n数据缓存完成后，即可开始训练神经网络：\n\n```\n.\u002Ftrain.sh nn_models.sc05.custom_params\n```\n\n在论文中，我们训练了约 40 小时。每当验证集的 ROC AUC 比之前保存的模型有所提高时，神经网络模型就会被保存到 `nn_models\u002Fsc05\u002Fall_feat\u002Fmodel_data` 目录下。\n\n神经网络训练并保存完成后，可以使用以下命令为特定蛋白质计算描述符：\n\n```\n.\u002Fcompute_descriptors.sh lists\u002Ftesting.txt\n```\n\n这些描述符将保存在 `descriptors\u002F` 目录下。\n\n要评估第二阶段的 RANSAC 协议，请进入 `masif\u002Fcomparison\u002Fmasif_ppi_search` 目录：\n\n```\ncd $masif_root\u002Fcomparison\u002Fmasif_ppi_search\u002Fmasif_descriptors\u002F\n.\u002Fsecond_stage.sh\n```\n\n要复现论文中展示的大规模 PD-L1:PD1 基准测试，请执行以下操作：\n\n```\ncd data\u002Fmasif_ppi_search\u002Fpdl1_benchmark\n.\u002Frun_benchmark.sh\n```\n\n\n## PyMOL 插件\n\n源代码中的 `source\u002Fpymol` 子目录提供了一个用于可视化蛋白质表面的 PyMOL 插件。我们在论文中展示的所有结构图都使用了该插件。此插件需要在本地计算机上安装 PyMOL。\n\n请参阅以下教程以了解如何安装：\n\n[PyMOL 插件安装](pymol_plugin_installation.md)\n\n要加载蛋白质表面文件，请在 PyMOL 中运行以下命令：\n\n```\nloadply ABCD_E.ply\n```\n\n示例：\n![MaSIF PyMOL 插件示例](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLPDI-EPFL_masif_readme_835ad119387e.png)\n\n## Docker 容器\n\n测试 MaSIF 的最简单方法是通过 Docker 容器。请参阅我们的教程，了解如何复现论文结果：\n\n[Docker 容器](docker_tutorial.md)\n\n\n## 许可证\n\nMaSIF 采用 [Apache v2.0 许可证](LICENSE) 发布。\n\n## 参考文献\n如果您使用本代码，请引用 [citation.bib](citation.bib) 文件中的 BibTeX 条目。","# MaSIF 快速上手指南\n\nMaSIF (Molecular Surface Interaction Fingerprints) 是一个基于几何深度学习的开源工具，用于解析蛋白质分子表面的相互作用模式。它通过将蛋白质表面分解为重叠的径向补丁（patches），提取几何和化学特征，并利用神经网络识别特定生物分子相互作用的指纹。\n\n## 环境准备\n\n### 系统要求\n*   **操作系统**: Linux (推荐 Red Hat Enterprise Linux 7.4+) 或 macOS (High Sierra+)。\n*   **硬件**: \n    *   内存：建议 16GB 以上。\n    *   存储：完整数据集预处理约需 1.4TB 空间（单个蛋白预处理约需 2 分钟）。\n    *   GPU：强烈推荐使用 NVIDIA GPU（如 Tesla K40 或更高版本）进行模型训练和评估，速度可比 CPU 快 100 倍。\n\n### 软件依赖\n请确保安装以下软件及指定版本（或使用 Docker 跳过此步）：\n*   **Python**: 3.6\n*   **核心库**: Tensorflow (1.9), BioPython (1.66), PyMesh (0.1.14), open3D (0.5.0.0), Dask (2.2.0)\n*   **外部工具**:\n    *   `reduce` (3.23): 添加氢原子。\n    *   `MSMS` (2.6.1): 计算蛋白质表面。\n    *   `PDB2PQR` (2.1.1), `multivalue`, `APBS` (1.5): 计算静电电荷。\n    *   `StrBioInfo`: 解析 PDB 文件。\n    *   `PyMOL`: 可选，用于可视化插件。\n\n> **提示**: 国内用户可通过 `pip` 使用清华或阿里镜像源加速 Python 包安装：\n> `pip install -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple \u003Cpackage_name>`\n\n## 安装步骤\n\n### 方法一：源码安装（推荐高级用户）\n\n1.  **克隆仓库**\n    ```bash\n    git clone https:\u002F\u002Fgithub.com\u002FLPDI-EPFL\u002Fmasif\n    cd masif\u002F\n    ```\n\n2.  **配置环境变量**\n    根据实际安装路径，修改并导出以下变量（示例路径需替换为你本地的真实路径）：\n    ```bash\n    export APBS_BIN=\u002Fpath\u002Fto\u002Fapbs\u002FAPBS-1.5-linux64\u002Fbin\u002Fapbs\n    export MULTIVALUE_BIN=\u002Fpath\u002Fto\u002Fapbs\u002FAPBS-1.5-linux64\u002Fshare\u002Fapbs\u002Ftools\u002Fbin\u002Fmultivalue\n    export PDB2PQR_BIN=\u002Fpath\u002Fto\u002Fapbs\u002Fapbs\u002Fpdb2pqr-linux-bin64-2.1.1\u002Fpdb2pqr\n    export PATH=$PATH:\u002Fpath\u002Fto\u002Freduce\u002F\n    export REDUCE_HET_DICT=\u002Fpath\u002Fto\u002Freduce\u002Freduce_wwPDB_het_dict.txt\n    export PYMESH_PATH=\u002Fpath\u002Fto\u002FPyMesh\n    export MSMS_BIN=\u002Fpath\u002Fto\u002Fmsms\u002Fmsms\n    export PDB2XYZRN=\u002Fpath\u002Fto\u002Fmsms\u002Fpdb_to_xyzrn\n    ```\n\n### 方法二：Docker 安装（最简单）\n如果不想手动配置复杂的环境依赖，直接使用官方提供的 Docker 容器是最便捷的方式：\n```bash\ndocker pull lpdi\u002Fmasif\n# 具体运行命令请参考仓库中的 Docker container 章节\n```\n\n## 基本使用\n\n以下以 **MaSIF-ligand**（预测蛋白质结合口袋的配体）为例，展示从数据准备到评估的基本流程。\n\n### 1. 数据预处理\nMaSIF 需要将 PDB 文件转换为包含几何和化学特征的表面网格，并提取补丁。\n\n进入应用目录：\n```bash\ncd data\u002Fmasif_ligand\u002F\n```\n\n**单蛋白处理示例**（处理 PDB ID 为 1MBN 的 A 链）：\n```bash\n.\u002Fdata_prepare_one.sh 1MBN_A_\n```\n\n**批量处理**（如果有 Slurm 集群环境）：\n```bash\nsbatch prepare_data.slurm\n```\n*注意：预处理会消耗大量磁盘空间（约 400GB+），因为表面被分解为大量重叠补丁。*\n\n### 2. 生成 TFRecords\n将预处理后的数据转换为 Tensorflow 所需的 TFRecords 格式：\n```bash\nsbatch make_tfrecord.slurm\n# 若无 Slurm，可执行 make_tfrecord.slurm 文件中的具体命令\n```\n\n### 3. 模型训练\n启动神经网络训练（**强烈建议在 GPU 上运行**）：\n```bash\nsbatch train_model.slurm\n```\n\n### 4. 模型评估\n使用测试集评估训练好的模型：\n```bash\nsbatch evaluate_test.slurm\n```\n\n评估结果将保存在 `data\u002Fmasif_ligand\u002Ftest_set_predictions\u002F` 目录下，包含标签文件 (`*_labels.npy`) 和预测 logits 文件 (`*_logits.npy`)。\n\n### 其他应用场景\nMaSIF 还包含另外两个概念验证应用，使用流程类似：\n*   **MaSIF-site**: 预测蛋白质 - 蛋白质相互作用位点。\n*   **MaSIF-search**: 超快扫描表面，预测蛋白质复合物的结构构型。\n\n只需进入对应的 `data\u002Fmasif_site\u002F` 或 `data\u002Fmasif_ppi_search_ub\u002F` 目录，重复上述数据准备、训练和评估步骤即可。","某生物制药公司的结构生物学团队正致力于从海量蛋白质数据库中筛选能特异性结合新型病毒靶点的候选药物分子。\n\n### 没有 masif 时\n- **特征提取依赖人工**：研究人员需手动定义几何或化学描述符，难以捕捉蛋白质表面复杂的非线性相互作用模式。\n- **结合位点预测不准**：传统算法对蛋白质 - 蛋白质相互作用（PPI）界面的识别率低，导致大量潜在活性分子被漏筛。\n- **大规模筛选耗时**：在数以万计的结构中进行对接模拟需要巨大的计算资源和数周时间，严重拖慢研发进度。\n- **泛化能力受限**：针对特定任务训练的模型难以迁移到其他结合场景，每次新目标出现都需重新设计特征工程。\n\n### 使用 masif 后\n- **自动解码深层模式**：masif 利用几何深度学习自动将蛋白质表面分解为重叠补丁，精准编码几何与化学特征，无需人工干预。\n- **高精度位点识别**：通过 masif-site 模块，团队能准确预测高概率发生相互作用的表面区域，显著提升了先导化合物的命中率。\n- **超快速结构扫描**：借助 masif-search 的指纹匹配技术，原本需要数周的复合物构型搜索缩短至几分钟内完成，实现即时筛选。\n- **架构灵活复用**：同一套 masif 架构只需更换训练数据，即可无缝切换于配体预测、界面识别等不同任务，极大降低了重复开发成本。\n\nmasif 通过将蛋白质表面转化为可学习的几何指纹，彻底改变了传统基于规则的分析范式，让药物发现从“大海捞针”变为“按图索骥”。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLPDI-EPFL_masif_a14ac957.png","LPDI-EPFL","Laboratory of Protein Design and Immunoengineering","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FLPDI-EPFL_f5c28129.png","",null,"https:\u002F\u002Fgithub.com\u002FLPDI-EPFL",[79,83,87,91],{"name":80,"color":81,"percentage":82},"Python","#3572A5",51.7,{"name":84,"color":85,"percentage":86},"Jupyter Notebook","#DA5B0B",42.7,{"name":88,"color":89,"percentage":90},"Shell","#89e051",5.6,{"name":92,"color":93,"percentage":94},"TeX","#3D6117",0,746,167,"2026-04-16T03:35:47","Apache-2.0","Linux, macOS","推荐用于训练和评估（速度提升可达 100 倍），测试环境为 NVIDIA Tesla K40，未明确具体显存和 CUDA 版本要求（依赖 TensorFlow 1.9）","最低 16GB（测试环境配置），处理完整数据集需大量磁盘空间（约 1.4TB）",{"notes":103,"python":104,"dependencies":105},"1. 必须预先安装外部二进制工具：reduce（加氢）、MSMS（计算表面）、APBS\u002FPDB2PQR\u002Fmultivalue（计算静电电荷）。2. 数据预处理是主要瓶颈，单个蛋白约需 2 分钟，大规模数据集建议使用分布式集群并行处理。3. 完整数据集预处理后占用约 1.4TB 磁盘空间。4. 自 2020 年 2 月起已用 Python 替换所有 Matlab 代码，结果可能与原论文略有差异；如需完全复现论文结果需使用专门的旧版仓库。5. 提供 Docker 容器以简化安装。","3.6",[106,107,108,109,110,111,112,113,114,115],"tensorflow==1.9","biopython==1.66","PyMesh==0.1.14","open3d==0.5.0.0","dask==2.2.0","StrBioInfo","reduce==3.23","MSMS==2.6.1","APBS==1.5","PDB2PQR==2.1.1",[15,14],[118,119,120],"protein-surface","molecular-surface","geometric-deep-learning","2026-03-27T02:49:30.150509","2026-04-19T15:38:20.193371",[124,129,134,139,144,149,154],{"id":125,"question_zh":126,"answer_zh":127,"source_url":128},42378,"为什么在训练代码中使用 (1 - AUCROC) 而不是直接使用 AUCROC？","这是因为 ROC 指标通常期望输入的是相似度\u002F亲和力（similarity\u002Faffinity），即数值越高越好。然而，在该模型中我们处理的是距离（distances），即数值越低越好。因此，对距离计算 ROC 等价于对亲和力计算 (1 - ROC)。通过取反，可以将距离度量转换为符合 ROC 评估标准的相似度度量。","https:\u002F\u002Fgithub.com\u002FLPDI-EPFL\u002Fmasif\u002Fissues\u002F64",{"id":130,"question_zh":131,"answer_zh":132,"source_url":133},42379,"运行 PDL1 基准测试时，模型无法正确预测 4ZQK_A 和 4ZQK_B 之间的界面，如何解决？","该问题通常是由 TensorFlow 版本不兼容引起的。解决方案是将 TensorFlow 更新到 v1.12 版本。更新后，第二阶段的对齐工作将按预期执行，能够正确识别界面。","https:\u002F\u002Fgithub.com\u002FLPDI-EPFL\u002Fmasif\u002Fissues\u002F13",{"id":135,"question_zh":136,"answer_zh":137,"source_url":138},42380,"如何在最新版本的 PyMOL 中打开 PLY 文件（报错 No module named 'loadPLY'）？","这是 PyMOL 新版本中的已知兼容性问题。具体的修复方法和替代查看方案可以参考项目中的另一个相关 Issue（Issue #15）。通常涉及安装特定的加载插件或使用脚本转换文件格式。","https:\u002F\u002Fgithub.com\u002FLPDI-EPFL\u002Fmasif\u002Fissues\u002F62",{"id":140,"question_zh":141,"answer_zh":142,"source_url":143},42381,"提供的 Docker 镜像是否支持 TensorFlow GPU 加速？如果不支持如何使用 GPU？","官方提供的 Docker 镜像主要用于数据处理，可能未预装 TensorFlow-GPU。建议的使用流程是：使用提供的 Docker 完成数据预处理步骤，然后在宿主机或其他环境中配置带有 TensorFlow-GPU 支持的虚拟环境来运行后续的深度学习训练任务。","https:\u002F\u002Fgithub.com\u002FLPDI-EPFL\u002Fmasif\u002Fissues\u002F16",{"id":145,"question_zh":146,"answer_zh":147,"source_url":148},42382,"MaSIF v2 (dMaSIF) 的源代码在哪里可以获取？","MaSIF v2 (也称为 dMaSIF) 的源代码已发布。您可以访问独立的仓库获取代码：https:\u002F\u002Fgithub.com\u002FFreyrS\u002FdMaSIF。该实现利用了 KeOps 库来优化内存占用。","https:\u002F\u002Fgithub.com\u002FLPDI-EPFL\u002Fmasif\u002Fissues\u002F23",{"id":150,"question_zh":151,"answer_zh":152,"source_url":153},42383,"运行 PDL1 基准测试时报错寻找 'masif_opts[\"coord_dir_npy\"]'，且缺少预测表面目录，如何解决？","这看起来是旧版本的遗留问题。实际上，除了 4ZQK_A 需要预计算表面外，其他数据并不需要预计算的表面文件。程序会直接从 'pred_data' 目录读取数据（这些是包含预测结果的 numpy 数组）。请确保您的数据路径配置指向正确的预测数据目录，而不是寻找不存在的表面目录。","https:\u002F\u002Fgithub.com\u002FLPDI-EPFL\u002Fmasif\u002Fissues\u002F6",{"id":155,"question_zh":156,"answer_zh":157,"source_url":158},42384,"MaSIF 是否支持将本地 PDB 文件（未存入 PDB 数据库的）作为输入？","这是一个常见需求。虽然默认脚本主要针对 PDB ID，但用户可以通过修改数据准备阶段的脚本来支持本地 PDB 文件输入。具体做法通常是调整读取逻辑，使其直接加载本地文件路径而非通过 PDB ID 下载。","https:\u002F\u002Fgithub.com\u002FLPDI-EPFL\u002Fmasif\u002Fissues\u002F44",[160,165],{"id":161,"version":162,"summary_zh":163,"released_at":164},334468,"0.1.1","这是论文中实验所使用的软件版本。该版本的依赖项列表（例如 MATLAB）比当前版本更为广泛。","2019-10-27T09:58:27",{"id":166,"version":167,"summary_zh":168,"released_at":169},334469,"v0.1","按照论文中提供的MaSIF实验结果发布。","2019-10-27T09:54:56"]