[ PROMPT_NODE_26196 ]
alphafold-database
[ SKILL_DOCUMENTATION ]
# AlphaFold 数据库
## 概述
AlphaFold DB 是一个公共存储库,包含由 DeepMind 和 EMBL-EBI 维护的超过 2 亿个蛋白质的 AI 预测 3D 结构。您可以访问带有置信度指标的结构预测、下载坐标文件、检索批量数据集,并将预测集成到计算工作流中。
## 何时使用此技能
当在以下场景中使用 AI 预测的蛋白质结构时,应使用此技能:
- 通过 UniProt ID 或蛋白质名称检索蛋白质结构预测
- 下载用于结构分析的 PDB/mmCIF 坐标文件
- 分析预测置信度指标(pLDDT, PAE)以评估可靠性
- 通过 Google Cloud Platform 访问批量蛋白质组数据集
- 将预测结构与实验数据进行比较
- 执行基于结构的药物发现或蛋白质工程
- 为缺乏实验结构的蛋白质构建结构模型
- 将 AlphaFold 预测集成到计算流水线中
## 核心能力
### 1. 搜索和检索预测
**使用 Biopython(推荐):**
Biopython 库提供了检索 AlphaFold 结构的最简单接口:
python
from Bio.PDB import alphafold_db
# 获取 UniProt 登录号的所有预测
predictions = list(alphafold_db.get_predictions("P00520"))
# 下载结构文件 (mmCIF 格式)
for prediction in predictions:
cif_file = alphafold_db.download_cif_for(prediction, directory="./structures")
print(f"已下载: {cif_file}")
# 直接获取结构对象
from Bio.PDB import MMCIFParser
structures = list(alphafold_db.get_structural_models_for("P00520"))
**直接 API 访问:**
使用 REST 端点查询预测:
python
import requests
# 获取 UniProt 登录号的预测元数据
uniprot_id = "P00520"
api_url = f"https://alphafold.ebi.ac.uk/api/prediction/{uniprot_id}"
response = requests.get(api_url)
prediction_data = response.json()
# 提取 AlphaFold ID
alphafold_id = prediction_data[0]['entryId']
print(f"AlphaFold ID: {alphafold_id}")
**使用 UniProt 查找登录号:**
首先搜索 UniProt 以查找蛋白质登录号:
python
import urllib.parse, urllib.request
def get_uniprot_ids(query, query_type='PDB_ID'):
"""查询 UniProt 以获取登录 ID"""
url = 'https://www.uniprot.org/uploadlists/'
params = {
'from': query_type,
'to': 'ACC',
'format': 'txt',
'query': query
}
data =