Running Folding API Server
Last updated
Last updated
The Folding API provides protein folding capabilities through the Bittensor network. This API allows users to submit protein sequences for folding, query the status of folding jobs, and retrieve results. The service is designed to work with NVIDIA GPUs for optimal performance in protein folding computations.
To ensure reliable and efficient MD simulations, please make sure your environment meets the following requirements:
GPU: NVIDIA RTX 4090 (recommended) Required for protein folding workloads due to its high number of CUDA cores and strong performance with molecular dynamics tasks. See our for more details on why this specific GPU is recommended.
Python: Version 3.11 (for compatibility with Bittensor and OpenMM)
Conda: For managing Python environments
Poetry: For managing project dependencies
1. Clone the Repository
If you don't have Conda installed, run the following command:
Replace your_wallet_name
and your_hotkey
with your Bittensor wallet credentials.
The API queries the Global Job Pool (GJP) using SQL for job information:
/job_pool
endpoint executes SQL queries against the GJP database
Results are parsed and transformed into appropriate response models
Allows filtering by status, job IDs, and PDB ID search
The Global Job Pool also allows validators to distribute jobs and miners to fetch work. The following describes how miners interact with the GJP:
When your miner starts, it automatically connects to the read node
It maintains a local snapshot of the GJP in the /db
directory
You can use /scripts/query_rqlite.py
to examine and analyze data from the job pool
The interaction between miners and the GJP is facilitated by the FoldingMiner
class, which handles job fetching, preparation, and execution.
1. Accessing the API Documentation
Once the API is running, you can access:
API server: http://0.0.0.0:8029
You can edit server address to access Interactive API documentation: http://localhost:8029/docs
Locate the api_keys.json
file in the folding folder
Copy your API key
In the Swagger UI (/docs), click "Authorize" and enter your API key
You can now make authenticated requests to the API
The API requires an NVIDIA GPU with CUDA support for MD simulations
Regular system updates and proper CUDA configuration are essential
Monitor system resources during folding operations
Keep your API key secure and never share it publicly