wuxing0105 commited on
Commit
f5285d9
·
verified ·
1 Parent(s): 6701cbe

Add files using upload-large-folder tool

Browse files
MODEL_FILE_MANIFEST.tsv ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ file size_bytes sha256 package_path
2
+ boltz1_conf.ckpt 3595352714 fea245d912c570ec117b2277c2719f312a6fc109c07b6f6ef741690ee775c2f5 weight/boltz1_conf.ckpt
3
+ ccd.pkl 345859128 2d3b2f03a3c5665944adba51e33263511e51b21c9cd05d902f9c4b7c1e58d2f4 weight/ccd.pkl
4
+ plddt.ckpt 462812900 cb32fa9cdc9e80406b793a8c09a929077534d9991a1d08f4c159d2e4ed81315f weight/plddt.ckpt
5
+ plddt_module_1.6B.ckpt 462812900 cb32fa9cdc9e80406b793a8c09a929077534d9991a1d08f4c159d2e4ed81315f weight/plddt_module_1.6B.ckpt
6
+ simplefold_1.1B.ckpt 4469540038 27b02b5939e995c7dca72c31bca87451de803c5f7defeba3915854767d8f116f weight/simplefold_1.1B.ckpt
7
+ simplefold_1.6B.ckpt 6354525226 aaac2d73dcc59c61153c58a1d56e74a8ada9d6057d67000f7836f3c87325312b weight/simplefold_1.6B.ckpt
8
+ simplefold_100M.ckpt 386772550 4cd0b8a0b317a6ab8634444fffd78ce84cfd49c20fe927b83c76c36fda5f54bd weight/simplefold_100M.ckpt
9
+ simplefold_360M.ckpt 1454881694 517338ec36b10ecc774f36b592ffe0fee6a24fa5c7d2fcfa3e3009282d48a49b weight/simplefold_360M.ckpt
10
+ simplefold_3B.ckpt 11460066894 88d4c7a240bf3815cb35342b4ddc1128ac243a2ea0256eb8a4df1209125868b5 weight/simplefold_3B.ckpt
11
+ simplefold_700M.ckpt 2764152946 77a770e2dd1695397ab5943d5b31c99b9039b8a35ed86db12f2b2db1be9db7f8 weight/simplefold_700M.ckpt
12
+ esm_models/esm2_t36_3B_UR50D.pt 5678116398 7de8b4082ba15891959ab368b77ce3886697af1efb16d3c9e9e7b0c5d3f07500 weight/esm_models/esm2_t36_3B_UR50D.pt
13
+ esm_models/esm2_t36_3B_UR50D-contact-regression.pt 6759 4da500eab246481dc9c8c95bc7b1d02f2803d761c380b0e95186d4a07d0fc84e weight/esm_models/esm2_t36_3B_UR50D-contact-regression.pt
README.md ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ - zh
6
+ tags:
7
+ - OneScience
8
+ - protein-structure-prediction
9
+ - pytorch
10
+ ---
11
+ <p align="center">
12
+ <strong>
13
+ <span style="font-size: 30px;">SimpleFold</span>
14
+ </strong>
15
+ </p>
16
+
17
+ # Model Introduction
18
+
19
+ SimpleFold is a generative protein folding model released by Apple. It supports protein structure prediction and provides training and fine-tuning entry points.
20
+
21
+ # Model Description
22
+
23
+ SimpleFold uses standard Transformer layers and a flow-matching objective to predict three-dimensional protein structures from FASTA sequences.
24
+
25
+ This Hugging Face package includes a default FASTA example, SimpleFold weights, pLDDT weights, CCD auxiliary files, Boltz auxiliary weights, and local ESM-2 3B weights. The package is ready to use once the full download is complete.
26
+
27
+ # Use Cases
28
+
29
+ | Scenario | Description |
30
+ | :---: | :--- |
31
+ | Protein structure prediction | Takes a FASTA file as input and outputs structures in mmCIF or PDB format. |
32
+ | Local offline inference | Stores example inputs and weights in `examples/` and `weight/`, allowing the scripts to run entirely from files in this repository. |
33
+ | Training / fine-tuning pipeline validation | Supports training workflow validation after tokenized data have been prepared according to `config/data/*.yaml`. |
34
+ | Hugging Face package layout | Uses the standard `config/`, `models/`, `scripts/`, and `weight/` directory structure. |
35
+
36
+ # Usage Guide
37
+
38
+ ## 1. OneCode Usage
39
+
40
+ Try one-click AI4S development in the OneCode online environment:
41
+
42
+ [Try one-click AI4S development](https://web-2069360198568017922-iaaj.ksai.scnet.cn:58043/home)
43
+
44
+ ## 2. Manual Installation and Usage
45
+
46
+ **Hardware Requirements**
47
+
48
+ - GPU or DCU is recommended.
49
+ - A CPU can be used for basic connectivity checks, but execution will be slow.
50
+ - DCU users must install DTK in advance. DTK 25.04.2 or later is recommended, or a OneScience-recommended version matching the current cluster.
51
+
52
+ **Software Requirements**
53
+
54
+ For additional information about the adaptation, please contact liubiao@sugon.com.
55
+
56
+ **Environment Check**
57
+
58
+ - NVIDIA GPU:
59
+
60
+ ```bash
61
+ nvidia-smi
62
+ ```
63
+
64
+ - Hygon DCU:
65
+
66
+ ```bash
67
+ hy-smi
68
+ ```
69
+
70
+ ## Quick Start
71
+
72
+ ### 1. Install the Runtime Environment
73
+
74
+ ```bash
75
+ conda create -n onescience311 python=3.11 -y
76
+ conda activate onescience311
77
+ pip install onescience[bio] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai
78
+ ```
79
+
80
+ If required libraries cannot be found, activate the CUDA compatibility environment as follows:
81
+
82
+ ```bash
83
+ source ${ROCM_PATH}/cuda/env.sh
84
+ export LD_LIBRARY_PATH="$CONDA_PREFIX/lib:$LD_LIBRARY_PATH"
85
+ export LD_LIBRARY_PATH="$CONDA_PREFIX/lib/python3.11/site-packages/fastpt/torch/lib:$LD_LIBRARY_PATH"
86
+ ```
87
+
88
+ ### 2. Download the Model Package
89
+
90
+ ```bash
91
+ hf download --model OneScience-Sugon/SimpleFold --local-dir ./SimpleFold
92
+ cd SimpleFold
93
+ ```
94
+
95
+ ### Model Weights
96
+
97
+ The trained model weights are included in the `weights/` directory, including SimpleFold-1B and SimpleFold-100M checkpoints, ESM weights, and other supporting weights.
98
+
99
+ ### 3. Run Inference
100
+
101
+ ```bash
102
+ python scripts/run_inference.py \
103
+ --simplefold_model simplefold_100M \
104
+ --fasta_path examples/minimal.fasta \
105
+ --output_dir outputs/minimal_inference \
106
+ --num_steps 10 \
107
+ --tau 0.01 \
108
+ --nsample_per_protein 1 \
109
+ --backend torch
110
+ ```
111
+
112
+ Output directory:
113
+
114
+ ```text
115
+ outputs/minimal_inference/predictions_simplefold_100M/
116
+ ```
117
+
118
+ ### 4. Training — No Dataset Currently Provided
119
+
120
+ Before training, prepare the following paths:
121
+
122
+ ```text
123
+ datasets/
124
+ datasets/tokenized/
125
+ datasets/manifest.json
126
+ ```
127
+
128
+ Data processing:
129
+
130
+ ```bash
131
+ python scripts/process_data.py --data_dir /path/to/mmcif --out_dir datasets --num-processes 8
132
+ python scripts/tokenize_data.py --target_dir datasets --token_dir datasets/tokenized
133
+ ```
134
+
135
+ `process_data.py` uses the in-package `weight/ccd.pkl` by default; no additional CCD download or Redis setup is required. To use the legacy Redis CCD workflow, pass `--use-redis` explicitly.
136
+
137
+ Training:
138
+
139
+ ```bash
140
+ python scripts/train.py
141
+ ```
142
+
143
+ FSDP training:
144
+
145
+ ```bash
146
+ python scripts/train_fsdp.py experiment=train_fsdp
147
+ ```
148
+
149
+ Fine-tuning / training-resumption example:
150
+
151
+ ```bash
152
+ python scripts/train.py load_ckpt_path=weight/simplefold_100M.ckpt
153
+ ```
154
+
155
+ # OneScience Official Information
156
+
157
+ | Platform | OneScience Main Repository | Skills Repository |
158
+ | --- | --- | --- |
159
+ | Gitee | https://gitee.com/onescience-ai/onescience | https://gitee.com/onescience-ai/oneskills |
160
+ | GitHub | https://github.com/onescience-ai/OneScience | https://github.com/onescience-ai/oneskills |
161
+
162
+ # Citation & License
163
+
164
+ The original SimpleFold implementation is released under the MIT License. This repository retains attribution to the original source and is organized to support automated execution through OneScience on Hugging Face. For scientific use, please cite the original SimpleFold paper and the relevant OneScience project materials.
config/base_empty.yaml ADDED
File without changes
config/base_eval.yaml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # @package _global_
2
+ defaults:
3
+ - data: cameo22
4
+ - model/architecture: foldingdit_100M
5
+ - model/sampler: euler_maruyama
6
+ - model: simplefold
7
+ - model/processor: protein_processor
8
+ - callbacks: default
9
+ - logger: null # set logger here or use command line (e.g. `python train.py logger=tensorboard`)
10
+ - trainer: default
11
+ - paths: default
12
+ - extras: default
13
+ - hydra: default
14
+ - _self_
15
+ - experiment: null
config/base_train.yaml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # @package _global_
2
+
3
+ # specify here default configuration
4
+ # order of defaults determines the order in which configs override each other
5
+ defaults:
6
+ - data: pdb
7
+ - model/architecture: foldingdit_100M
8
+ - model/sampler: euler_maruyama
9
+ - model/processor: protein_processor
10
+ - model: simplefold
11
+ - callbacks: default
12
+ - logger: null # set logger here or use command line (e.g. `python train.py logger=tensorboard`)
13
+ - trainer: default
14
+ - paths: default
15
+ - extras: default
16
+ - hydra: default
17
+ - _self_
18
+
19
+ # experiment configs allow for version control of specific hyperparameters
20
+ # e.g. best hyperparameters for given model and datamodule
21
+ - experiment: null
22
+
23
+ # set False to skip model training
24
+ train: True
25
+
26
+ # evaluate on test set, using best model weights achieved during training
27
+ # lightning chooses best weights based on the metric specified in checkpoint callback
28
+ test: False
29
+
30
+ # seed for random number generators in pytorch, numpy and python.random
31
+ seed: null
config/data/codnas.yaml ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ _target_: onescience.datapipes.simplefold.test_datamodule.SimpleFoldInferenceDataModule
2
+ target_dir: data/codnas/
3
+ num_workers: 1
config/data/pdb.yaml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _target_: onescience.datapipes.simplefold.train_datamodule.SimpleFoldTrainingDataModule
2
+
3
+ datasets:
4
+ - _target_: onescience.datapipes.simplefold.train_datamodule.DatasetConfig
5
+ data_name: rcsb_protein
6
+ tokenized_dir: ./datasets/tokenized
7
+ target_dir: ./datasets
8
+ manifest_path: ./datasets/manifest.json
9
+ cropper:
10
+ _target_: onescience.datapipes.boltz_data_pipeline.crop.boltz.BoltzCropper
11
+ min_neighborhood: 0
12
+ max_neighborhood: 40
13
+ filters:
14
+ - _target_: onescience.datapipes.boltz_data_pipeline.filter.dynamic.resolution.ResolutionFilter
15
+ resolution: 5.0
16
+ - _target_: onescience.datapipes.boltz_data_pipeline.filter.dynamic.date.DateFilter
17
+ date: "2027-05-01"
18
+ ref: released
19
+
20
+ filters:
21
+ - _target_: onescience.datapipes.boltz_data_pipeline.filter.dynamic.size.SizeFilter
22
+ min_chains: 1
23
+ max_chains: 300
24
+
25
+ tokenizer:
26
+ _target_: onescience.datapipes.boltz_data_pipeline.tokenize.boltz_protein.BoltzTokenizer
27
+
28
+ featurizer:
29
+ _target_: onescience.datapipes.boltz_data_pipeline.feature.featurizer.BoltzFeaturizer
30
+
31
+ symmetries: data/symmetry.pkl
32
+ max_tokens: 256
33
+ max_atoms: 2304
34
+ pad_to_max_tokens: False
35
+ pad_to_max_atoms: False
36
+ batch_size: 256
37
+ num_workers: 16
38
+ pin_memory: True
39
+ return_train_symmetries: False
40
+ min_dist: 2.0
41
+ max_dist: 22.0
42
+ num_bins: 64
43
+ atoms_per_window_queries: 32
44
+ rotation_augment_ref_pos: False
45
+ rotation_augment_coords: True
config/train.yaml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # @package _global_
2
+
3
+ # specify here default configuration
4
+ # order of defaults determines the order in which configs override each other
5
+ defaults:
6
+ - data: pdb_sp
7
+ - model/architecture: foldingdit_100M
8
+ - model/sampler: euler_maruyama
9
+ - model/processor: protein_processor
10
+ - model: simplefold
11
+ - callbacks: default
12
+ - logger: tensorboard # set logger here or use command line (e.g. `python train.py logger=tensorboard`)
13
+ - trainer: default
14
+ - paths: default
15
+ - extras: default
16
+ - hydra: default
17
+ - _self_
18
+
19
+ # experiment configs allow for version control of specific hyperparameters
20
+ # e.g. best hyperparameters for given model and datamodule
21
+ - experiment: null
22
+
23
+ # set False to skip model training
24
+ train: True
25
+
26
+ # evaluate on test set, using best model weights achieved during training
27
+ # lightning chooses best weights based on the metric specified in checkpoint callback
28
+ test: False
29
+
30
+ # seed for random number generators in pytorch, numpy and python.random
31
+ seed: null
weight/simplefold_1.1B.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:27b02b5939e995c7dca72c31bca87451de803c5f7defeba3915854767d8f116f
3
+ size 4469540038
weight/simplefold_1.6B.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aaac2d73dcc59c61153c58a1d56e74a8ada9d6057d67000f7836f3c87325312b
3
+ size 6354525226
weight/simplefold_360M.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:517338ec36b10ecc774f36b592ffe0fee6a24fa5c7d2fcfa3e3009282d48a49b
3
+ size 1454881694
weight/simplefold_3B.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:88d4c7a240bf3815cb35342b4ddc1128ac243a2ea0256eb8a4df1209125868b5
3
+ size 11460066894