--- license: mit language: - en - zh tags: - OneScience - protein-structure-prediction - pytorch ---

SimpleFold

# Model Introduction SimpleFold is a generative protein folding model released by Apple. It supports protein structure prediction and provides training and fine-tuning entry points. # Model Description SimpleFold uses standard Transformer layers and a flow-matching objective to predict three-dimensional protein structures from FASTA sequences. 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. # Use Cases | Scenario | Description | | :---: | :--- | | Protein structure prediction | Takes a FASTA file as input and outputs structures in mmCIF or PDB format. | | Local offline inference | Stores example inputs and weights in `examples/` and `weight/`, allowing the scripts to run entirely from files in this repository. | | Training / fine-tuning pipeline validation | Supports training workflow validation after tokenized data have been prepared according to `config/data/*.yaml`. | | Hugging Face package layout | Uses the standard `config/`, `models/`, `scripts/`, and `weight/` directory structure. | # Usage Guide ## 1. OneCode Usage Try one-click AI4S development in the OneCode online environment: [Try one-click AI4S development](https://web-2069360198568017922-iaaj.ksai.scnet.cn:58043/home) ## 2. Manual Installation and Usage **Hardware Requirements** - GPU or DCU is recommended. - A CPU can be used for basic connectivity checks, but execution will be slow. - DCU users must install DTK in advance. DTK 25.04.2 or later is recommended, or a OneScience-recommended version matching the current cluster. **Software Requirements** For additional information about the adaptation, please contact liubiao@sugon.com. **Environment Check** - NVIDIA GPU: ```bash nvidia-smi ``` - Hygon DCU: ```bash hy-smi ``` ## Quick Start ### 1. Install the Runtime Environment ```bash conda create -n onescience311 python=3.11 -y conda activate onescience311 pip install onescience[bio] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai ``` If required libraries cannot be found, activate the CUDA compatibility environment as follows: ```bash source ${ROCM_PATH}/cuda/env.sh export LD_LIBRARY_PATH="$CONDA_PREFIX/lib:$LD_LIBRARY_PATH" export LD_LIBRARY_PATH="$CONDA_PREFIX/lib/python3.11/site-packages/fastpt/torch/lib:$LD_LIBRARY_PATH" ``` ### 2. Download the Model Package ```bash hf download --model OneScience-Group/SimpleFold --local-dir ./SimpleFold cd SimpleFold ``` ### Model Weights The trained model weights are included in the `weights/` directory, including SimpleFold-1B and SimpleFold-100M checkpoints, ESM weights, and other supporting weights. ### 3. Run Inference ```bash python scripts/run_inference.py \ --simplefold_model simplefold_100M \ --fasta_path examples/minimal.fasta \ --output_dir outputs/minimal_inference \ --num_steps 10 \ --tau 0.01 \ --nsample_per_protein 1 \ --backend torch ``` Output directory: ```text outputs/minimal_inference/predictions_simplefold_100M/ ``` ### 4. Training — No Dataset Currently Provided Before training, prepare the following paths: ```text datasets/ datasets/tokenized/ datasets/manifest.json ``` Data processing: ```bash python scripts/process_data.py --data_dir /path/to/mmcif --out_dir datasets --num-processes 8 python scripts/tokenize_data.py --target_dir datasets --token_dir datasets/tokenized ``` `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. Training: ```bash python scripts/train.py ``` FSDP training: ```bash python scripts/train_fsdp.py experiment=train_fsdp ``` Fine-tuning / training-resumption example: ```bash python scripts/train.py load_ckpt_path=weight/simplefold_100M.ckpt ``` # OneScience Official Information | Platform | OneScience Main Repository | Skills Repository | | --- | --- | --- | | Gitee | https://gitee.com/onescience-ai/onescience | https://gitee.com/onescience-ai/oneskills | | GitHub | https://github.com/onescience-ai/OneScience | https://github.com/onescience-ai/oneskills | # Citation & License 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.