Skip to content

Commit 4152342

Browse files
authored
Merge pull request #175 from macrocosm-os/openmm
Openmm
2 parents 5818857 + 405c8fa commit 4152342

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1779
-2120
lines changed

README.md

+12-27
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ This repository is the official codebase for Bittensor Subnet Folding (SN25), wh
3838
# Introduction
3939
The protein folding subnet is Bittensors’ first venture into academic use cases, built and maintained by [Macrocosmos AI](https://www.macrocosmos.ai). While the current subnet landscape consists of mainly AI and web-scraping protocols, we believe that it is important to highlight to the world how Bittensor is flexible enough to solve almost any problem.
4040

41-
This subnet is designed to produce valuable academic research in Bittensor. Researchers and universities can use this subnet to solve almost any protein, on demand, for free. It is our hope that this subnet will empower researchers to conduct world-class research and publish in top journals while demonstrating that decentralized systems are an economic and efficient alternative to traditional approaches.
41+
This subnet is designed to produce valuable academic research in Bittensor. Researchers and universities can use this subnet to simulate almost any protein, on demand, for free. It is our hope that this subnet will empower researchers to conduct world-class research and publish in top journals while demonstrating that decentralized systems are an economic and efficient alternative to traditional approaches.
4242

4343

4444
# What is Protein Folding?
@@ -52,6 +52,11 @@ An ideal incentive mechanism defines an asymmetric workload between the validato
5252

5353
Protein folding is also a research topic that is of incredibly high value. Research groups all over the world dedicate their time to solving particular niches within this space. Providing a solution to attack this problem at scale is what Bittensor is meant to provide to the global community.
5454

55+
# Simulation Backend and Reproducability
56+
Moleccular dynamics (MD) simulations require a physics-based engine to run them, and SN25 utilizes the open-source project [OpenMM](https://openmm.org). As their tagline suggests, they are a "high performance, customizable molecular simulation" package.
57+
58+
One of the key advantages of using OpenMM for MD-simulations is the built-in capabilities for *reproducability*. This is a key component in the reward stack and all miners should be intimately familiar with this. For more information, please read this [document](./documentation/reproducibility.md).
59+
5560
# Reward Mechanism
5661
Protein folding is a textbook example of this kind of asymmetry; the molecular dynamics simulation involves long and arduous calculations which apply the laws of physics to the system over and over again until an optimized configuration is obtained. There are no reasonable shortcuts.
5762

@@ -69,13 +74,13 @@ When the simulations finally converge (ΔE/t < threshold), they produce the form
6974

7075
# Running the Subnet
7176
## Requirements
72-
Protein folding utilizes a standardized package called [GROMACS](https://www.gromacs.org). To run, you will need:
77+
Protein folding utilizes an open-source package called [OpenMM](https://openmm.org). To run, you will need:
7378
1. A Linux-based machine
74-
2. Multiple high-performance CPU cores.
79+
2. At least 1 CUDA-compatible GPU
80+
3. Conda Distribution (we recommend [Miniconda](https://docs.anaconda.com/miniconda/)). Using conda is an [OpenMM requirement](http://docs.openmm.org/latest/userguide/application/01_getting_started.html#installing-openmm).
7581

76-
Out of the box, **we do not require miners to run GPU compatible GROMACS packages**. For more information regarding recommended hardware specifications, look at [min_compute.yml](./min_compute.yml)
82+
For more information regarding recommended hardware specifications, look at [min_compute.yml](./min_compute.yml)
7783

78-
**IMPORTANT**: GROMACS is a large package, and take anywhere between 1h to 1.5h to download.
7984

8085
## Installation
8186
This repository requires python3.8 or higher. To install it, simply clone this repository and run the [install.sh](./install.sh) script.
@@ -87,18 +92,6 @@ bash install.sh
8792

8893
This will also create a virtual environment in which the repo can be run inside of.
8994

90-
Sometimes, there can be problems with the install so to ensure that gromacs is installed correctly, please check the .bashrc. Importantly, these lines MUST be run:
91-
```bash
92-
echo "source /usr/local/gromacs/bin/GMXRC" >> ~/.bashrc
93-
source ~/.bashrc
94-
```
95-
96-
The above commands will install the necessary requirements, as well as download GROMACS and add it to your `.bashrc`. To ensure that installation is complete, running `gmx` in the terminal should print
97-
```
98-
:-) GROMACS - gmx, 2024.1 (-:
99-
```
100-
101-
If not, there is a problem with your installation, or with your `.bashrc`
10295

10396
## Registering on Mainnet
10497
```
@@ -135,6 +128,7 @@ python neurons/validator.py
135128
--neuron.queue_size <number of pdb_ids to submit>
136129
--neuron.sample_size <number of miners per pdb_id>
137130
--protein.max_steps <number of steps for the simulation>
131+
--protein.input_source <database of proteins to choose from>
138132
--logging.debug # Run in debug mode, alternatively --logging.trace for trace mode
139133
--axon.port <your axon port> #VERY IMPORTANT: set the port to be one of the open TCP ports on your machine
140134
```
@@ -168,7 +162,7 @@ Keep in mind that you will need to change the default parameters for either the
168162

169163
## How does the Subnet Work?
170164

171-
In this subnet, validators create protein folding challenges for miners, who in turn run simulations based on GROMACS to obtain stable protein configurations. At a high level, each role can be broken down into parts:
165+
In this subnet, validators create protein folding challenges for miners, who in turn run simulations using OpenMM to obtain stable protein configurations. At a high level, each role can be broken down into parts:
172166

173167
### Validation
174168

@@ -184,15 +178,6 @@ Miners are expected to run many parallel processes, each executing an energy min
184178

185179
For detailed information, read [mining.md](./documentation/mining.md).
186180

187-
## Notes
188-
189-
**Miner** simulations will output a projected time. The first two runs will be about the same length, with the third taking about an order of magnitude longer using a default number of steps = 50,000. The number of steps (`steps`) and the maximum allowed runtime (`maxh`) are easily configurable and should be employed by miners to prevent timing out. We also encourage miners to take advantage of 'early stopping' techniques so that simulations do not run past convergence.
190-
191-
Furthermore, we want to support the use of ML-based mining so that recent algorithmic advances (e.g. AlphaFold) can be leveraged. At present, this subnet is effectively a **specialized compute subnet** (rather than an algorithmic subnet). For now, we leave this work to motivated miners.
192-
193-
GROMACS itself is a rather robust package and is widely used within the research community. There are specific guides and functions if you wish to parallelize your processing or run these computations off of a GPU to speed things up.
194-
195-
196181

197182
## License
198183

77.3 KB
Loading
Loading
159 KB
Loading
Loading

assets/miner_flow.png

-27.6 KB
Loading
Loading
Loading
Loading
Loading

assets/validator_flow.png

-119 KB
Loading

0 commit comments

Comments
 (0)