Skip to content

bytedance/Protenix

Repository files navigation

Protenix: Protein + X

A trainable PyTorch reproduction of AlphaFold 3.

For more information on the model's performance and capabilities, see our technical report.

You can follow our twitter or join the conversation in the discord server.

Protenix predictions

⚡ Try it online

Installation

Run with PyPI (recommended):

pip3 install protenix

Run with Docker:

If you're interested in model training, we recommand to run with docker.

Inference

Command line inference

If you set up Protenix by pip, you can run the following command to do model inference:

# run with one json file
protenix predict --input examples/example.json --out_dir  ./output

# or run with multiple json files
protenix predict --input ./jsons_dir/ --out_dir  ./output

Detailed information on the format of the input JSON file and the output files can be found in input and output documentation .

Alternatively you can run inference by:

bash inference_demo.sh

Arguments in this scripts are explained as follows:

  • load_checkpoint_path: path to the model checkpoints.
  • input_json_path: path to a JSON file that fully describes the input.
  • dump_dir: path to a directory where the results of the inference will be saved.
  • dtype: data type used in inference. Valid options include "bf16" and "fp32".
  • use_msa: whether to use the MSA feature, the default is true. If you want to disable the MSA feature, add --use_msa false to the inference_demo.sh script.

Note: by default, we do not use layernorm and EvoformerAttention kernels for simple configuration, if you want to speed up inference, see setting up kernels documentation .

Notebook demo

You can use notebooks/protenix_inference.ipynb to run the model inference.

Training

If you're interested in model training, see training documentation .

Performance

See the performance documentation for memory and time consumption in training and inference.

Acknowledgements

Implementation of the layernorm operators referred to OneFlow and FastFold. We used OpenFold for some module implementations, except the LayerNorm.

Contribution

Please check Contributing for more details. If you encounter problems using Protenix, feel free to create an issue! We also welcome pull requests from the community.

Code of Conduct

Please check Code of Conduct for more details.

Security

If you discover a potential security issue in this project, or think you may have discovered a security issue, we ask that you notify Bytedance Security via our security center or vulnerability reporting email.

Please do not create a public GitHub issue.

License

This project, including code and model parameters are made available under the terms of the Creative Commons Attribution-NonCommercial 4.0 International License. You can find details at: https://creativecommons.org/licenses/by-nc/4.0/

For commercial use, please reach out to us at ai4s-bio@bytedance.com for the commercial license. We welcome all types of collaborations.