### Install Protenix from GitHub Source: https://github.com/bytedance/protenix/blob/main/docs/training_inference_instructions.md Install the latest development version directly from the GitHub repository. ```bash pip3 install git+https://github.com/bytedance/Protenix.git ``` -------------------------------- ### Install Protenix from PyPI Source: https://github.com/bytedance/protenix/blob/main/docs/training_inference_instructions.md Install the stable version of Protenix using pip. ```bash pip3 install protenix ``` -------------------------------- ### Install Protenix from Local Source Source: https://github.com/bytedance/protenix/blob/main/docs/training_inference_instructions.md Install Protenix from a local clone of the repository, suitable for developers. ```bash git clone https://github.com/bytedance/Protenix.git cd Protenix pip3 install -e . ``` -------------------------------- ### Install and Verify Protenix in Docker Source: https://github.com/bytedance/protenix/blob/main/docs/docker_installation.md Once inside the container, install Protenix in editable mode using pip and verify the installation by checking its help message. ```bash cd /app pip install -e . # Verify the installation by checking the help message protenix --help ``` -------------------------------- ### Install Protenix Package Source: https://github.com/bytedance/protenix/blob/main/README.md Installs or upgrades the Protenix package from PyPI. Ensure you use the official index if your mirror lags. ```bash pip install --upgrade protenix --index-url https://pypi.org/simple ``` -------------------------------- ### Download and Configure ColabFold Databases Source: https://github.com/bytedance/protenix/blob/main/docs/colabfold_compatible_msa.md Clone the ColabFold repository and use the provided setup script to download and configure the necessary databases. This step requires MMSEQS_NO_INDEX=1 to be set. ```bash git clone https://github.com/sokrypton/ColabFold.git cd ColabFold # Configure database: MMSEQS_NO_INDEX=1 ./setup_databases.sh ``` -------------------------------- ### Verify Docker GPU Setup Source: https://github.com/bytedance/protenix/blob/main/docs/docker_installation.md Run this command to ensure Docker is correctly configured with GPU support. ```bash docker run --rm --gpus all nvidia/cuda:12.6.3-base-ubuntu22.04 nvidia-smi ``` -------------------------------- ### Install pre-commit hooks Source: https://github.com/bytedance/protenix/blob/main/README.md Install pre-commit and its hooks to ensure code consistency and quality before making commits. This is a prerequisite for contributing. ```bash pip install pre-commit pre-commit install ``` -------------------------------- ### Install Miniforge and Create Environment Source: https://github.com/bytedance/protenix/blob/main/scripts/msa/step2-get_msa.ipynb Installs miniforge and creates a new conda environment named 'colabfold_search' with Python 3.10. Activates the environment and sets up a working directory. ```bash # Install miniforge # https://github.com/conda-forge/miniforge#download conda create -n colabfold_search python=3.10 conda activate colabfold_search cd ~ && mkdir workdir && cd workdir ``` -------------------------------- ### Install Colabfold Source: https://github.com/bytedance/protenix/blob/main/docs/colabfold_compatible_msa.md Install Colabfold and its dependencies for AlphaFold using pip. ```bash pip install colabfold[alphafold] ``` -------------------------------- ### Install External Dependencies on Ubuntu/Debian Source: https://github.com/bytedance/protenix/blob/main/docs/training_inference_instructions.md Install kalign and hmmer, required for Template search and RNA MSA search, on Ubuntu/Debian systems. ```bash apt-get update && apt-get install -y kalign hmmer ``` -------------------------------- ### Build MMseqs2 from Source Source: https://github.com/bytedance/protenix/blob/main/docs/colabfold_compatible_msa.md Compile MMseqs2 from source to ensure compatibility. This involves downloading the archive, extracting it, configuring the build with CMake, and then compiling and installing. ```bash wget https://github.com/soedinglab/MMseqs2/archive/refs/tags/16-747c6.tar.gz tar xzf 16-747c6.tar.gz cd MMseqs2-16-747c6/ mkdir build && cd build cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=. .. make -j8 make install ``` -------------------------------- ### Clone ColabFold and Prepare Databases Source: https://github.com/bytedance/protenix/blob/main/scripts/msa/step2-get_msa.ipynb Clones the ColabFold repository, checks out a specific commit, and prepares the necessary databases using the setup_databases.sh script. It also includes instructions for installing ColabFold and its alphafold dependency. ```bash git clone https://github.com/sokrypton/ColabFold cd ColabFold git checkout 9bd39fd8be88ca71c039be9a8000bb0db92f80a2 # download and prepare the database # Note: Uniref only version uniref30_2103 has contained taxonomy information # you can download it from https://wwwuser.gwdg.de/~compbiol/colabfold/uniref30_2103_taxonomy.tar.gz bash setup_databases.sh # If you want to add Taxonomy ID using uniref30_2103 database # refer to https://github.com/sokrypton/ColabFold/issues/216 # Add the following line after Line 93 in colabfold/mmseqs/search.py # run_mmseqs(mmseqs, ["convertalis", base.joinpath("qdb"), dbbase.joinpath(f"{uniref_db}{dbSuffix1}"), # base.joinpath("res_exp_realign_filter"), base.joinpath("uniref_tax.m8"), "--format-output", # "query,target,taxid,taxname,taxlineage,fident,alnlen,mismatch,gapopen,qstart,qend,tstart,tend,evalue,bits,cigar", # "--db-load-mode", str(db_load_mode), "--threads", str(threads)]) pip3 install . pip install colabfold[alphafold]==1.5.5 ``` -------------------------------- ### Clone and Build MMseqs2 Source: https://github.com/bytedance/protenix/blob/main/scripts/msa/step2-get_msa.ipynb Clones the MMseqs2 repository, checks out a specific commit, builds the project, and installs it. It also adds the MMseqs2 binary directory to the PATH environment variable. ```bash git clone https://github.com/soedinglab/MMseqs2.git cd MMseqs2 git checkout 71dd32ec43e3ac4dabf111bbc4b124f1c66a85f1 # As in colabfold readme mkdir build cd build cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=. .. make make install export PATH=$(pwd)/bin/:$PATH cd ../ ``` -------------------------------- ### Run Protenix Docker Container Source: https://github.com/bytedance/protenix/blob/main/docs/docker_installation.md Start an interactive Docker container with GPU access and volume mounts for the current directory and shared memory. This allows you to work with the Protenix code and data inside the container. ```bash docker run --gpus all -it \ -v "$(pwd)":/app \ -v /dev/shm:/dev/shm \ ai4s-share-public-cn-beijing.cr.volces.com/release/protenix:1.0.0.4 \ /bin/bash ``` -------------------------------- ### Execute MSA Search Source: https://github.com/bytedance/protenix/blob/main/docs/msa_template_pipeline.md This notebook guides the process of executing an MSA search, which is required for Protenix's taxonomic pairing. Raw search results are saved in a specified directory. ```python scripts/msa/step2-get_msa.ipynb ``` -------------------------------- ### Ligand JSON Structure Examples Source: https://github.com/bytedance/protenix/blob/main/docs/infer_json_format.md Represents a ligand using its CCD code, a molecular SMILES string, or a path to a molecular structure file. The 'count' field specifies the number of copies. ```json { "ligand": { "ligand": "CCD_ATP", "count": 1 } } ``` ```json { "ligand": { "ligand": "FILE_your_file_path/atp.sdf", "count": 1 } } ``` ```json { "ligand": { "ligand": "Nc1ncnc2c1ncn2[C@@H]1O[C@H](CO[P@@](=O)(O)O[P@](=O)(O)OP(=O)(O)O)[C@@H](O)[C@H]1O", "count": 1 } } ``` -------------------------------- ### Pocket Constraint JSON Example Source: https://github.com/bytedance/protenix/blob/main/docs/infer_json_format.md Specifies binding pocket constraints, including the binder chain and contact residues. 'max_distance' defines the proximity limit between the binder and contact residues. ```json "pocket": { "binder_chain": { "entity": 2, "copy": 1 }, "contact_residues": [ { "entity": 1, "copy": 1, "position": 126 }, ... ], "max_distance": 6 } ``` -------------------------------- ### Contact Constraint JSON Example Source: https://github.com/bytedance/protenix/blob/main/docs/infer_json_format.md Defines spatial constraints between residues or specific atoms. Use 'atom1' and 'atom2' for atom-level constraints; omit them for token-level constraints. 'min_distance' defaults to 0 for token-contact. ```json "contact": [ { "entity1": 1, "copy1": 1, "position1": 169, "entity2": 2, "copy2": 1, "position2": 1, "atom2": "C5", "max_distance": 6, "min_distance": 0 }, // token-contact { "entity1": 1, "copy1": 1, "position1": 169, "atom1": "CA", "entity2": 2, "copy2": 1, "position2": 1, "max_distance": 6, "min_distance": 0 }, // token-contact { "entity1": 1, "copy1": 1, "position1": 169, "entity2": 2, "copy2": 1, "position2": 1, "max_distance": 6, "min_distance": 0 }, // token-contact { "entity1": 1, "copy1": 1, "position1": 169, "atom1": "CA", "entity2": 2, "copy2": 1, "position2": 1, "atom2": "C5", "max_distance": 6, "min_distance": 3 }, // atom-contact ... ] ``` -------------------------------- ### Set CUTLASS Path for DeepSpeed Kernel Source: https://github.com/bytedance/protenix/blob/main/docs/kernels.md When using the DeepSpeed DS4Sci_EvoformerAttention kernel, ensure the CUTLASS library is cloned and its path is set via the `CUTLASS_PATH` environment variable. This example shows how to set it after cloning. ```bash git clone -b v3.5.1 https://github.com/NVIDIA/cutlass.git /opt/cutlass ENV CUTLASS_PATH=/opt/cutlass ``` ```bash git clone -b v3.5.1 https://github.com/NVIDIA/cutlass.git /path/to/cutlass export CUTLASS_PATH=/path/to/cutlass ``` -------------------------------- ### View prepare_training_data.py Help Source: https://github.com/bytedance/protenix/blob/main/docs/prepare_training_data.md Use this command to view the help message for the prepare_training_data.py script, which explains all available parameters, including optional ones like -d. ```bash python3 scripts/prepare_training_data.py --help ``` -------------------------------- ### Prepare Training Data Script Source: https://github.com/bytedance/protenix/blob/main/docs/prepare_training_data.md Execute this script to preprocess your data. Provide input paths, output CSV file, output directory, cluster text file, and the number of CPUs. Use --help for parameter explanations. ```bash python3 scripts/prepare_training_data.py -i [input_path] -o [output_csv] -b [output_dir] -c [cluster_txt] -n [num_cpu] ``` -------------------------------- ### Train Protenix Model from Scratch Source: https://github.com/bytedance/protenix/blob/main/docs/training_inference_instructions.md Run this bash script to train the model from scratch. It sets up the environment and allows configuration of various training parameters. ```bash bash train_demo.sh ``` -------------------------------- ### Download and Extract Full Training Data Source: https://github.com/bytedance/protenix/blob/main/docs/training_inference_instructions.md Download and extract all data components required for training and finetuning using the provided script. Use --full flag for training data. ```bash # Download and extract data components using the provided script # Use --inference_only (default) or --full for training/finetuning bash scripts/database/download_protenix_data.sh --full ``` -------------------------------- ### Inference using Protenix-Mini Source: https://github.com/bytedance/protenix/blob/main/docs/training_inference_instructions.md Run inference using the Protenix-Mini model, which is faster and more lightweight. ```bash # Inference using Protenix-Mini (faster, lightweight) protenix pred --input examples/input.json --model_name protenix_mini_default_v0.5.0 ``` -------------------------------- ### Distributed Training with torchrun Source: https://github.com/bytedance/protenix/blob/main/docs/training_inference_instructions.md Use this command for distributed training across multiple GPUs. Specify the number of processes per node and the main training script. ```bash torchrun --nproc_per_node=8 runner/train.py --model_name "protenix_base_default_v1.0.0" [OTHER_ARGS] ``` -------------------------------- ### Protenix CLI for MSA and Template Search Source: https://github.com/bytedance/protenix/blob/main/docs/infer_json_format.md Command-line tools to automate MSA and template searches, updating input JSON files. Use 'protenix prep' for a comprehensive search including RNA MSA. ```bash # Add template information to an existing JSON protenix mt -i examples/example_without_msa.json -o ./output ``` ```bash # Add both template and RNA MSA information to an existing JSON # Note: To force a fresh search, ensure any existing 'unpairedMsaPath' fields are removed from the JSON. protenix prep -i examples/examples_with_rna_msa/example_9gmw_2.json -o ./output ``` -------------------------------- ### Sequential MSA and Template Search Source: https://github.com/bytedance/protenix/blob/main/docs/training_inference_instructions.md Run sequential MSA and template search for input JSON files. ```bash # Sequential Protein MSA and Template search protenix mt --input examples/input.json --out_dir ./output ``` -------------------------------- ### Run Template Search Source: https://github.com/bytedance/protenix/blob/main/docs/msa_template_pipeline.md Execute the template search pipeline using this script. It takes a directory with pairing and non-pairing MSAs, builds an HMM profile, searches a database, and outputs a merged HMMSEARCH.a3m file. ```bash python3 runner/template_search.py ``` -------------------------------- ### Full Input Preprocessing Source: https://github.com/bytedance/protenix/blob/main/docs/training_inference_instructions.md Perform full preprocessing including Protein MSA, Template search, and RNA MSA search. ```bash # Full preprocessing (Protein MSA + Template + RNA MSA) protenix prep --input examples/input.json --out_dir ./output ``` -------------------------------- ### Clone Protenix Repository Source: https://github.com/bytedance/protenix/blob/main/docs/docker_installation.md Clone the Protenix GitHub repository and navigate into the project directory. ```bash git clone https://github.com/bytedance/protenix.git cd ./protenix ``` -------------------------------- ### Set Protenix Data Root Directory Source: https://github.com/bytedance/protenix/blob/main/docs/training_inference_instructions.md Set the PROTENIX_ROOT_DIR environment variable to specify the location for downloaded data. Ensure the directory exists. ```bash # Set your data root directory export PROTENIX_ROOT_DIR=/path/to/your/data_root mkdir -p $PROTENIX_ROOT_DIR ``` -------------------------------- ### Pull Protenix Docker Image Source: https://github.com/bytedance/protenix/blob/main/docs/docker_installation.md Download the Protenix Docker image from the public registry. This image contains all necessary dependencies. ```bash docker pull ai4s-share-public-cn-beijing.cr.volces.com/release/protenix:1.0.0.4 ``` -------------------------------- ### Split and Organize MSA Files Source: https://github.com/bytedance/protenix/blob/main/docs/msa_template_pipeline.md This script converts raw A3M files into the final Protenix-compatible format by splitting hits and organizing them. Specify the input directory containing MSAs with taxonomy IDs and the desired output directory. ```bash python3 scripts/msa/step4-split_msa_to_uniref_and_others.py --input_msa_dir scripts/msa/data/mmcif_msa_with_taxid --output_msa_dir scripts/msa/data/mmcif_msa ``` -------------------------------- ### Configure Triangle Multiplicative Kernel Source: https://github.com/bytedance/protenix/blob/main/docs/kernels.md Choose the implementation for the Triangle Multiplicative operation by setting the `triangle_multiplicative` variable in `configs_base.py`. Options are `cuequivariance` or `torch`. ```python triangle_multiplicative = "cuequivariance" # or "torch" ``` -------------------------------- ### Specify Fine-tuning Subset with PDB List Source: https://github.com/bytedance/protenix/blob/main/docs/training_inference_instructions.md Use this argument within the fine-tuning script to point to a text file containing specific PDB IDs for training. ```bash --data.weightedPDB_before2109_wopb_nometalc_0925.base_info.pdb_list examples/finetune_subset.txt ``` -------------------------------- ### Run Inference Demo Script Source: https://github.com/bytedance/protenix/blob/main/docs/training_inference_instructions.md Use this bash script to run inference with a specified model, input JSON, output directory, data type, and MSA feature flag. ```bash bash inference_demo.sh ``` -------------------------------- ### Fine-tune Protenix Model Source: https://github.com/bytedance/protenix/blob/main/docs/training_inference_instructions.md Execute this script to fine-tune a pretrained Protenix model on a specific subset of data. It loads existing weights and can be configured to use a custom PDB list. ```bash bash finetune_demo.sh ``` -------------------------------- ### Execute MSA Search Script Source: https://github.com/bytedance/protenix/blob/main/scripts/msa/step2-get_msa.ipynb Sets the PYTHONPATH and executes the ColabFold search script to generate MSAs. This command specifies input files, database directories, output directories, and various search parameters including databases to use, template usage, load mode, and threads. ```bash export PYTHONPATH=$PYTHONPATH:ColabFold mkdir -p logs mkdir -p results python3 ColabFold/colabfold/mmseqs/search.py --mmseqs=mmseqs {input_file} {db_dir} {output_dir} --db1 uniref30_2103_db --db2 pdb70_220313_db --db3 colabfold_envdb_202108_db --use-templates 1 --db-load-mode 2 --threads 32 # if you use scripts/msa/data/pdb_seqs/pdb_seq.fasta as {input_file} # you will get the following results as in scripts/msa/data/mmcif_msa_initial # 0.a3m 1.a3m 2.a3m 3.a3m pdb70_220313_db.m8 uniref_tax.m8 ``` -------------------------------- ### Update CCD Cache File Source: https://github.com/bytedance/protenix/blob/main/docs/prepare_training_data.md Run this script to download and update the Chemical Component Dictionary (CCD) CIF files if your training data is more recent than the provided cache file. Specify the cache directory and the number of CPUs to use. ```bash python3 scripts/gen_ccd_cache.py -c [ccd_cache_dir] -n [num_cpu] ``` -------------------------------- ### Post-process Colabfold MSA with Python Script Source: https://github.com/bytedance/protenix/blob/main/docs/colabfold_compatible_msa.md Use this Python script to add pseudo taxonomy IDs to MSAs generated by `colabfold_search`, making them compatible with Protenix's data pipeline. Ensure you have the correct paths to your FASTA file, Colabfold databases, and MMseqs2 executable. ```bash python3 scripts/colabfold_msa.py examples/dimer.fasta dimer_colabfold_msa --db1 uniref30_2103_db --db3 colabfold_envdb_202108_db --mmseqs_path ``` -------------------------------- ### PDB ID List for Fine-tuning Source: https://github.com/bytedance/protenix/blob/main/docs/training_inference_instructions.md Format for the text file containing PDB IDs, with one ID per line, used for subset fine-tuning. ```text 6hvq 5mqc 5zin ``` -------------------------------- ### Download Official Protein Clustering File Source: https://github.com/bytedance/protenix/blob/main/docs/prepare_training_data.md Use this command to download the official protein clustering results file provided by RCSB PDB. This file is used for clustering protein sequences with a 40% sequence identity threshold. ```bash wget https://cdn.rcsb.org/resources/sequence/clusters/clusters-by-entity-40.txt ``` -------------------------------- ### Inference with Seeds from JSON Source: https://github.com/bytedance/protenix/blob/main/docs/training_inference_instructions.md Run inference using seeds specified within the input JSON file. ```bash # Standard inference with seeds from JSON protenix pred -i examples/examples_with_template/example_mgyp004658859411.json --use_seeds_in_json true ``` -------------------------------- ### Standard Model Inference Source: https://github.com/bytedance/protenix/blob/main/docs/training_inference_instructions.md Perform standard inference using the default model and parameters. Specify input, output, seed, model name, and whether to use templates. ```bash # Standard inference (using default model and parameters) protenix pred -i examples/input.json -o ./output -s 101 -n protenix_base_default_v1.0.0 --use_template true ``` -------------------------------- ### Convert PDB/CIF to Protenix JSON Source: https://github.com/bytedance/protenix/blob/main/docs/training_inference_instructions.md Convert PDB or CIF structural files into Protenix-compatible JSON format. Use --altloc to specify how to handle alternate locations. ```bash # Convert PDB/CIF to JSON protenix json --input ./examples/7pzb.pdb --out_dir ./output --altloc first # Advanced: Specify assembly ID for biological assemblies wget -P ./examples/ https://files.rcsb.org/download/7pzb.cif protenix json --input ./examples/7pzb.cif --out_dir ./output --altloc first # Advanced: Keep discontinuous polymer-polymer bonds (e.g. cyclic-peptide) protenix json --input ./examples/2lwu.cif --out_dir ./output --altloc first --include_discont_poly_poly_bonds ``` -------------------------------- ### Perform Structure Prediction with Protenix CLI Source: https://github.com/bytedance/protenix/blob/main/README.md Executes a structure prediction task using the Protenix command-line interface. Specify input JSON, output directory, and model name. ```bash protenix pred -i examples/input.json -o ./output -n protenix_base_default_v1.0.0 ``` -------------------------------- ### Run RNA MSA Search Source: https://github.com/bytedance/protenix/blob/main/docs/msa_template_pipeline.md Execute the RNA MSA search pipeline using the provided Python script. This command initiates a search across major RNA databases. ```bash python3 runner/rna_msa_search.py ``` -------------------------------- ### RNA MSA Directory Structure Source: https://github.com/bytedance/protenix/blob/main/docs/msa_template_pipeline.md Illustrates the expected directory structure after extracting RNA MSA data. This includes the location of MSA files and the sequence-to-PDB chain mapping. ```text ├── rna_msa # RNA MSA data root │ ├── msas/ # Directory containing RNA MSA files (.a3m) │ └── rna_sequence_to_pdb_chains.json # Mapping from RNA sequences to PDB entity IDs # e.g., {"AAAAAAAAAAUU": ["4kxt_2", "6oon_2"]} ``` -------------------------------- ### Cite Protenix-v1 Source: https://github.com/bytedance/protenix/blob/main/README.md Use this BibTeX entry to cite Protenix-v1 in your research. It includes author information, title, publication year, and DOI. ```bibtex @article {Zhang2026.02.05.703733, author = {Zhang, Yuxuan and Gong, Chengyue and Zhang, Hanyu and Ma, Wenzhi and Liu, Zhenyu and Chen, Xinshi and Guan, Jiaqi and Wang, Lan and Yang, Yanping and Xia, Yu and Xiao, Wenzhi}, title = {Protenix-v1: Toward High-Accuracy Open-Source Biomolecular Structure Prediction}, elocation-id = {2026.02.05.703733}, year = {2026}, doi = {10.64898/2026.02.05.703733}, publisher = {Cold Spring Harbor Laboratory}, URL = {https://www.biorxiv.org/content/early/2026/02/22/2026.02.05.703733.1}, eprint = {https://www.biorxiv.org/content/early/2026/02/22/2026.02.05.703733.1.full.pdf}, journal = {bioRxiv} } ``` -------------------------------- ### Configure Triangle Attention Kernel Source: https://github.com/bytedance/protenix/blob/main/docs/kernels.md Select the desired implementation for triangle attention by setting the `triangle_attention` variable in `configs_base.py`. Options include `cuequivariance`, `triattention`, `deepspeed`, and `torch`. ```python triangle_attention = "cuequivariance" # or "triattention"/"deepspeed"/"torch" ``` -------------------------------- ### Customized Inference Source: https://github.com/bytedance/protenix/blob/main/docs/training_inference_instructions.md Perform customized inference by disabling MSA and enabling shared variable caching. ```bash # Customized inference: Disable MSA and use shared variable caching protenix pred --input examples/input.json --use_msa false --enable_cache true ``` -------------------------------- ### Append Taxonomy IDs to MSA Source: https://github.com/bytedance/protenix/blob/main/docs/msa_template_pipeline.md This script appends taxonomy IDs to raw A3M files, a crucial step for enabling correct taxonomic pairing in Protenix. Ensure the input MSA directory is correctly specified. ```bash python3 scripts/msa/step3-uniref_add_taxid.py ``` -------------------------------- ### Inference with RNA MSA Source: https://github.com/bytedance/protenix/blob/main/docs/training_inference_instructions.md Perform inference when RNA MSA is available. This feature currently only supports the 'protenix_base_default_v1.0.0' model. ```bash # Standard inference with RNA MSA, only support protenix_base_default_v1.0.0 protenix pred -i examples/examples_with_rna_msa/example_9gmw_2.json --use_rna_msa true -n protenix_base_default_v1.0.0 ``` -------------------------------- ### Update Inference Configurations for Memory Management Source: https://github.com/bytedance/protenix/blob/main/docs/training_inference_instructions.md Adjusts inference configurations based on the number of tokens to manage memory usage and prevent OOM errors. Use this function when dealing with large sequences to dynamically control precision settings. ```python def update_inference_configs(configs: Any, n_token: int) -> Any: """ Adjust inference configurations based on the number of tokens to manage memory usage and prevent OOM. Args: configs (Any): Original configurations. n_token (int): Number of tokens in the sample. Returns: Any: Updated configurations. """ if n_token > 3840: # Enable AMP for both modules to save memory for extremely large sequences configs.skip_amp.confidence_head = False configs.skip_amp.sample_diffusion = False elif n_token > 2560: # Enable AMP only for ConfidenceHead configs.skip_amp.confidence_head = False configs.skip_amp.sample_diffusion = True else: # Default: Disable AMP for both (run in FP32) to prioritize accuracy configs.skip_amp.confidence_head = True configs.skip_amp.sample_diffusion = True return configs ``` -------------------------------- ### Cite Protenix (AlphaFold3 Reproduction) Source: https://github.com/bytedance/protenix/blob/main/README.md This BibTeX entry is for citing Protenix as a comprehensive AlphaFold3 reproduction. It lists the authors, title, publication year, and DOI. ```bibtex @article {2025.01.08.631967, author = {ByteDance AML AI4Science Team and Chen, Xinshi and Zhang, Yuxuan and Lu, Chan and Ma, Wenzhi and Guan, Jiaqi and Gong, Chengyue and Yang, Jincai and Zhang, Hanyu and Zhang, Ke and Wu, Shenghao and Zhou, Kuangqi and Yang, Yanping and Liu, Zhenyu and Wang, Lan and Shi, Bo and Shi, Shaochen and Xiao, Wenzhi}, title = {Protenix - Advancing Structure Prediction Through a Comprehensive AlphaFold3 Reproduction}, elocation-id = {2025.01.08.631967}, year = {2025}, doi = {10.1101/2025.01.08.631967}, publisher = {Cold Spring Harbor Laboratory}, URL = {https://www.biorxiv.org/content/early/2025/01/11/2025.01.08.631967}, eprint = {https://www.biorxiv.org/content/early/2025/01/11/2025.01.08.631967.full.pdf}, journal = {bioRxiv} } ``` -------------------------------- ### Cite Protenix-v2 Source: https://github.com/bytedance/protenix/blob/main/README.md Use this BibTeX entry to cite Protenix-v2 in your research. It details the authors, title, publication year, and DOI. ```bibtex @article {Zhang2026.04.10.717613, author = {Zhang, Yuxuan and Gong, Chengyue and Sun, Jinyuan and Guan, Jiaqi and Ren, Milong and Xue, Song and Zhang, Hanyu and Ma, Wenzhi and Liu, Zhenyu and Chen, Xinshi and Xiao, Wenzhi}, title = {Protenix-v2: Broadening the Reach of Structure Prediction and Biomolecular Design}, elocation-id = {2026.04.10.717613}, year = {2026}, doi = {10.64898/2026.04.10.717613}, publisher = {Cold Spring Harbor Laboratory}, URL = {https://www.biorxiv.org/content/early/2026/04/11/2026.04.10.717613}, eprint = {https://www.biorxiv.org/content/early/2026/04/11/2026.04.10.717613.full.pdf}, journal = {bioRxiv} } ``` -------------------------------- ### Cite ColabFold Source: https://github.com/bytedance/protenix/blob/main/README.md BibTeX entry for citing ColabFold, a related project that makes protein folding accessible. Includes authors, title, journal, volume, pages, year, and publisher. ```bibtex @article{mirdita2022colabfold, title={ColabFold: making protein folding accessible to all}, author={Mirdita, Milot and Sch{"u}tze, Konstantin and Moriwaki, Yoshitaka and Heo, Lim and Ovchinnikov, Sergey and Steinegger, Martin}, journal={Nature methods}, volume={19}, number={6}, pages={679--682}, year={2022}, publisher={Nature Publishing Group US New York} } ``` -------------------------------- ### Cite AlphaFold 3 Source: https://github.com/bytedance/protenix/blob/main/README.md BibTeX entry for citing AlphaFold 3, a foundational work for Protenix. Includes authors, title, journal, volume, pages, year, and publisher. ```bibtex @article{abramson2024accurate, title={Accurate structure prediction of biomolecular interactions with AlphaFold 3}, author={Abramson, Josh and Adler, Jonas and Dunger, Jack and Evans, Richard and Green, Tim and Pritzel, Alexander and Ronneberger, Olaf and Willmore, Lindsay and Ballard, Andrew J and Bambrick, Joshua and others}, journal={Nature}, volume={630}, number={8016}, pages={493--500}, year={2024}, publisher={Nature Publishing Group UK London} } ``` -------------------------------- ### Cite OpenFold Source: https://github.com/bytedance/protenix/blob/main/README.md BibTeX entry for citing OpenFold, which inspired Protenix. Details authors, title, journal, volume, pages, year, and publisher. ```bibtex @article{ahdritz2024openfold, title={OpenFold: Retraining AlphaFold2 yields new insights into its learning mechanisms and capacity for generalization}, author={Ahdritz, Gustaf and Bouatta, Nazim and Floristean, Christina and Kadyan, Sachin and Xia, Qinghui and Gerecke, William and O’Donnell, Timothy J and Berenberg, Daniel and Fisk, Ian and Zanichelli, Niccol{\`o} and others}, journal={Nature Methods}, volume={21}, number={8}, pages={1514--1524}, year={2024}, publisher={Nature Publishing Group US New York} } ``` -------------------------------- ### Extract Unique Protein Sequences Source: https://github.com/bytedance/protenix/blob/main/docs/msa_template_pipeline.md Use this script to extract sequences from mmCIF files and assign index IDs. It generates FASTA files, sequence-to-index mappings, and other essential metadata. Ensure the output directory is correctly specified. ```bash python3 scripts/msa/step1-get_prot_seq.py --cif_dir --out_dir scripts/msa/data/pdb_seqs ``` -------------------------------- ### Define Ions in Protenix JSON Source: https://github.com/bytedance/protenix/blob/main/docs/infer_json_format.md Use this JSON structure to define ions and their counts. The 'ion' field uses CCD codes, and 'count' specifies the number of copies. An optional 'id' field can manually set chain IDs. ```json { "ion": { "ion": "MG", "count": 2 } }, { "ion": { "ion": "NA", "count": 3 } } ``` -------------------------------- ### MSA Header Regex Patterns Source: https://github.com/bytedance/protenix/blob/main/docs/msa_template_pipeline.md Regular expressions used by Protenix to extract SpeciesId from UniRef and UniProt MSA header formats, essential for taxonomic pairing. ```python _UNIPROT_REGEX = re.compile( r"(?:tr|sp)\|[A-Z0-9]{6,10}(?:_\d+)?\|(?:[A-Z0-9]{1,10}_)(?P[A-Z0-9]{1,5})" ) _UNIREF_REGEX = re.compile(r"^UniRef100_[^_]+_([^_/]+)") ``` -------------------------------- ### Independent MSA Search Source: https://github.com/bytedance/protenix/blob/main/docs/training_inference_instructions.md Perform an independent MSA search, supporting JSON or Protein FASTA inputs. Specify the MSA server mode. ```bash # Independent MSA search (supports JSON or Protein FASTA) protenix msa --input examples/prot.fasta --out_dir ./output --msa_server_mode protenix ``` -------------------------------- ### Inference Job JSON Structure Source: https://github.com/bytedance/protenix/blob/main/docs/infer_json_format.md The top-level structure for an inference job is a list of dictionaries, where each dictionary defines a set of sequences to be modeled. Even for a single job, the outer structure must be a list. ```json [ { "name": "Test Fold Job Number One", "sequences": [...], "covalent_bonds": [...] } ] ``` -------------------------------- ### Specify Covalent Bonds in Protenix JSON Source: https://github.com/bytedance/protenix/blob/main/docs/infer_json_format.md Define covalent bonds between entities using detailed atom and position information. Supports bonds between polymers and ligands, or two ligands. Note limitations for polymer-polymer bonds. ```json "covalent_bonds": [ { "entity1": "2", "copy1": 1, "position1": "2", "atom1": "N6", "entity2": "3", "copy2": 1, "position2": "1", "atom2": "C1" } ] ``` -------------------------------- ### Protein Chain Sequence Definition Source: https://github.com/bytedance/protenix/blob/main/docs/infer_json_format.md Defines a protein chain entity, including its sequence, modifications, and paths to precomputed Multiple Sequence Alignment (MSA) and template files. Absolute paths are recommended for MSA and template files to ensure accuracy. ```json { "proteinChain": { "sequence": "PREACHINGS", "count": 1, "modifications": [ { "ptmType": "CCD_HY3", "ptmPosition": 1, }, { "ptmType": "CCD_P1L", "ptmPosition": 5 } ], "pairedMsaPath": "/path/to/pairing.a3m", "unpairedMsaPath": "/path/to/non_pairing.a3m", "templatesPath": "/path/to/hmmsearch.a3m" } } ``` -------------------------------- ### Disable Fast Layernorm Kernel Source: https://github.com/bytedance/protenix/blob/main/docs/kernels.md To disable the default `fast_layernorm` and use the native PyTorch layernorm, set the `LAYERNORM_TYPE` environment variable to `torch`. ```bash export LAYERNORM_TYPE=torch ``` -------------------------------- ### RNA Sequence JSON Structure Source: https://github.com/bytedance/protenix/blob/main/docs/infer_json_format.md Represents a single-stranded RNA sequence with optional modifications, count, and an unpaired MSA path. If unpairedMsaPath is omitted, inference proceeds without RNA MSA, potentially reducing accuracy. ```json { "rnaSequence": { "sequence": "GUAC", "modifications": [ { "modificationType": "CCD_2MG", "basePosition": 1 }, { "modificationType": "CCD_5MC", "basePosition": 4 } ], "unpairedMsaPath": "/path/to/rna_msa.a3m", "count": 1 } } ``` -------------------------------- ### DNA Sequence JSON Structure Source: https://github.com/bytedance/protenix/blob/main/docs/infer_json_format.md Represents a single-stranded DNA sequence with optional modifications and count. For double-stranded DNA, include a second entry for the reverse complement. ```json { "dnaSequence": { "sequence": "GATTACA", "modifications": [ { "modificationType": "CCD_6OG", "basePosition": 1 }, { "modificationType": "CCD_6MA", "basePosition": 2 } ], "count": 1 } } ``` ```json { "dnaSequence": { "sequence": "TGTAATC", "count": 1 } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.