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.
PymolFold runs as a plugin within PyMOL. First, ensure you have PyMOL installed. Visit the official PyMOL website to download and install the appropriate version for your operating system.
There are two ways to install PymolFold in PyMOL:
-
Open PyMOL.
-
Navigate to
Plugin -> Plugin Manager. -
Select the
Install New Plugintab. -
In the URL field, enter:
https://raw.githubusercontent.com/JinyuanSun/PymolFold/refs/heads/main/pymolfold.py -
Click
Fetch. A command prompt window will appear, showing the progress of the installation. -
Add it to startup if you want PymolFold to load automatically when PyMOL starts.
-
Once you choose to add to startup, it will also automatically update to the latest version when you start PyMOL in the future.
-
Open PyMOL.
-
In the PyMOL command line (starting with
PyMOL>), copy and paste the following command, then press Enter:run https://raw.githubusercontent.com/JinyuanSun/PymolFold/refs/heads/main/pymolfold.py
-
Wait patiently as PyMOL downloads and installs the PymolFold plugin.
NOTE: Both methods will take 4-5 minutes(depending on your internet speed) to complete. After installation, you will see a success message in the PyMOL dialog box.
If you already have the latest version installed, you will see the following message:
If you encounter the following error during installation:
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
This error is likely due to an outdated software version on your computer. To resolve this:
- Visit Microsoft Visual C++ Build Tools.
- Download and install the build tools by running the provided
.exefile. - Refer to this StackOverflow guide for additional help.
- After installation, retry the plugin installation process.
PymolFold relies on the ESM3 and NVIDIA Boltz-2 APIs. Obtain free API keys from their respective websites:
-
ESM3 API Key:
- Visit ESM3 API.
- Register and log in to find your API key on the account page.
-
NVIDIA Boltz-2 API Key:
- Visit NVIDIA Boltz-2 API.
- Register and log in to find your API key on the integration page.
-
NO API KEY is needed for ESMFold (yeaah!), but 400 residues limit applies(noooo!).
-
Set API Keys in PyMOL:
Use the
set_api_keycommand in PyMOL to configure your keys. Replaceyour_..._keywith your actual keys:## Set ESM3 API Key PyMOL> set_api_key ESM_API_TOKEN, your_esm_api_key ## Set NVIDIA Boltz-2 API Key PyMOL> set_api_key NVCF_API_KEY, your_nvcf_api_key
Verify API Key Setup:
PyMOL> import os PyMOL> print(os.environ.get("ESM_API_TOKEN")) PyMOL> print(os.environ.get("NVCF_API_KEY"))
If the keys are printed successfully, the setup is complete.
PymolFold offers powerful features for protein structure prediction and analysis:
esm3: Predicts monomer structures using the ESMFold engine.esmfold: CLI version of ESMFold for monomer predictions.bfold: Simplified CLI for Boltz-2, automatically fetching MSA for monomers.
Usage:
esm3 sequence [, name]
## Example:
esm3 MKTVRQERLKSIVRILERSKEPVSGAQLAEELSVSRQVIVQDIAYLRSLGYNIVATPRGYVLAGG, my_proteinRun foldingui to open a web interface in your default browser. This interface supports:
- ESMFold: Visual version of the CLI.
- ESM3: Visual version of the CLI.
- Boltz-2: Advanced version of
bfold, supporting proteins, DNA, RNA, and small molecules.
Examples (Boltz-2):
You can run the provided example:

When using CCD code, you can check all the existed CCDs under pymolfold/gui/ccd_keys.json. And all the codes are from RCSB CCD database.
MORE DETAILED FEATURES:
-
If you want to predict a head-tail amide bonded cyclic peptide, you may set
cyclicon.
-
If you want to use MSA as an auxiliary information, you may set
Add MSAon. It will automatically query colab design msa search via NVIDIA API.
-
Calculate affinity when at least one sequence and one small molecule are present.
-
Upon 3 modifications can be added to residues:
The CCD codes also can be found under
pymolfold/gui/ccd_keys.json. -
After clicking Run on the web page, wait about 6 seconds (depending on protein size), and the structure will appear in PyMOL!
Color structures based on pLDDT scores to visualize prediction confidence.
Usage:
color_plddt object_name
## Example:
color_plddt my_proteinWe utilized PXMeter to evaluate the differences between predicted structures and reference structures. PXMeter(0.1.4) now only supports PPI analysis, and more details can be seen in their repo. But unfortunately, we copied the repo and refine it since the python version may conflict with the one of PyMOL.
Currently, only .cif files are supported for alignment.
Usage:
pxmeter_align obj_real_structure_name, obj_pred_structure_nameNote: The first use may take longer as it downloads a CCD component .cif file for non-standard amino acid alignment.
After running the script above, you will get the metrics in csv and png format under the folder you setted (if not set, it will generate in the root path). You can use the exmaple files under pymolfold/example/, and the results should be exactly the same as pymolfold/example/metrics.
For more details about the methodology and implementation, please refer to our preprint:
"PymolFold: Integrating Protein Structure Prediction into PyMOL" on bioRxiv.
This project is licensed under the MIT License. See the LICENSE file for details.



