Skip to main content

Protein structure prediction in PyMOL

Project description

PymolFold

Inspired by ColabFold by Sergey O.
Visualization inspired by pymol-color-alphafold.
Thanks to ESMFold by Meta and the API.
Fast access to AlphaMissense predicted Human proteins provided by hegelab.

CCD keys refer to CCD_URL = "https://huggingface.co/boltz-community/boltz-1/resolve/main/ccd.pkl"

安装

1. 安装 PyMOL

本项目是为了大家能够在PyMOL的可视化软件中实现结构预测、结构域预测的功能,所以第一步,大家需要自行前往PyMOL官网下载PyMOL

安装完成后我们需要找到它安装的路径,这是后续使用我们这个项目的基础。

  1. 打开PyMOL,找到命令行输入的地方,直接将下方代码复制进去回车。
    import sys
    print(sys.executable) # 返回PyMOL使用的python程序路径
    print(sys.path) # 返回一个列表的路径
    

2. 安装 PymolFold

从源代码安装:

# 克隆仓库
git clone https://github.com/ivandon15/PymolFold.git
cd PymolFold
# 找到pymol安装路径,比如我是在"D:\Develop\PyMol2"
# 然后利用"D:\Develop\PyMol2\python.exe" -m pip install .[esm] 进行安装

3. 验证安装

安装完毕之后打开PyMOL

在 PyMOL 中:

import pymolfold
print(pymolfold.__version__)  # 应显示版本号 0.2.0

然后在PyMOL命令行中 run path_to_PymolFold/run_plugin.py 会显示 PymolFold v0.2.0 loaded successfully!

使用说明

PymolFold 提供多种结构预测方法,都可以在 PyMOL 命令行中直接使用。预测结果会自动保存并加载到 PyMOL 中显示。

1. Boltz2 结构预测

注意:使用前需要设置环境变量: 在这里注册:https://build.nvidia.com/mit/boltz2?integrate_nim=true&hosted_api=true&modal=integrate-nim

export NVCF_API_KEY="your_api_key_here"
boltz2 sequence [, name] [, **kwargs]

# 参数示例:
boltz2 MKTVRQERLKSIVRILERSKEPVSGAQLAEELSVSRQVIVQDIAYLRSLGYNIVATPRGYVLAGG, test_protein

2. ESM-3 结构预测

需要从 forge.evolutionaryscale.ai 获取 API token.

esm3 sequence [, name]
# 示例:
esm3 MKTVRQERLKSIVRILERSKEPVSGAQLAEELSVSRQVIVQDIAYLRSLGYNIVATPRGYVLAGG

结构显示和分析

预测的结构会在 PyMOL>from pathlib import Path PyMOL>print(Path.cwd()) 这个还没改,boltz出来cif,esm3出来pdb boltz的小分子还没设置,然后看看怎么把浏览器放进来

推荐的可视化设置:

color_plddt  # 根据 pLDDT 得分着色
orient       # 调整视角
ray          # 高质量渲染

Info
The PymolFold service is running on a A5000 instance (cost $100 a week), and the sequence length is limited to 1000aa.

Issues and Errors
If you encounter any errors or issues while using this project, please don't hesitate to open an issue here on GitHub. Your feedback helps us improve the project and make it more user-friendly for everyone.

PymolFold Server: A Shared Resource
Please note that the PymolFold server is a shared resource, and I request you to use it responsibly. Do not abuse the server, as it can affect the availability and performance of the service for other users.

17Jan2025: Add `esm3` to use ESM-3 for folding.
21Aug2023: As the ESMFold API is not stable, the job will be sent to PymolFold server if the job failed.
11Apr2023: `pf_plugin.py` is the PyMOL plugin and the `pf_pkg.py` is a pymol-free python package.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymolfold-0.2.0.tar.gz (128.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymolfold-0.2.0-py3-none-any.whl (121.4 kB view details)

Uploaded Python 3

File details

Details for the file pymolfold-0.2.0.tar.gz.

File metadata

  • Download URL: pymolfold-0.2.0.tar.gz
  • Upload date:
  • Size: 128.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for pymolfold-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a49cf9a1b93d01a29f1e9abc1498b69bc54af8ceb1a84aec190e0222e6369900
MD5 38592d3323d5e16751446850776bdb20
BLAKE2b-256 3b9153015c2f55237312c8051dd6f451d3ec88df53f9d6ca05c423163dfee0af

See more details on using hashes here.

File details

Details for the file pymolfold-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pymolfold-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 121.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for pymolfold-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d6f81653604a02771e81cbe527090a3f0db4eab25f672ddbff28df5a2cceae3
MD5 42a75e17bc609d292780d148697a656d
BLAKE2b-256 399405962e34c54f71be67e4cafba0c091312c12f16dfd4ea170bc2ef6ef5e54

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page