alphafold3-pytorch 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: alphafold3-pytorch
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Alphafold 3 - Pytorch
|
|
5
|
+
Project-URL: Homepage, https://pypi.org/project/alphafold3-pytorch/
|
|
6
|
+
Project-URL: Repository, https://github.com/lucidrains/alphafold3-pytorch
|
|
7
|
+
Author-email: Phil Wang <lucidrains@gmail.com>
|
|
8
|
+
License: MIT License
|
|
9
|
+
|
|
10
|
+
Copyright (c) 2024 Phil Wang
|
|
11
|
+
|
|
12
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
in the Software without restriction, including without limitation the rights
|
|
15
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
furnished to do so, subject to the following conditions:
|
|
18
|
+
|
|
19
|
+
The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
copies or substantial portions of the Software.
|
|
21
|
+
|
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
SOFTWARE.
|
|
29
|
+
License-File: LICENSE
|
|
30
|
+
Keywords: artificial intelligence,deep learning,protein structure prediction
|
|
31
|
+
Classifier: Development Status :: 4 - Beta
|
|
32
|
+
Classifier: Intended Audience :: Developers
|
|
33
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
34
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
35
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
36
|
+
Requires-Python: >=3.8
|
|
37
|
+
Requires-Dist: beartype
|
|
38
|
+
Requires-Dist: einops>=0.8.0
|
|
39
|
+
Requires-Dist: einx>=0.2.2
|
|
40
|
+
Requires-Dist: environs
|
|
41
|
+
Requires-Dist: jaxtyping>=0.2.28
|
|
42
|
+
Requires-Dist: torch>=2.1
|
|
43
|
+
Requires-Dist: tqdm
|
|
44
|
+
Provides-Extra: examples
|
|
45
|
+
Provides-Extra: test
|
|
46
|
+
Requires-Dist: pytest; extra == 'test'
|
|
47
|
+
Description-Content-Type: text/markdown
|
|
48
|
+
|
|
49
|
+
<img src="./alphafold3.png" width="450px"></img>
|
|
50
|
+
|
|
51
|
+
## Alphafold 3 - Pytorch (wip)
|
|
52
|
+
|
|
53
|
+
Implementation of <a href="https://www.nature.com/articles/s41586-024-07487-w">Alphafold 3</a> in Pytorch
|
|
54
|
+
|
|
55
|
+
Getting a fair number of emails. You can chat with me about this work <a href="https://discord.gg/x6FuzQPQXY">here</a>
|
|
56
|
+
|
|
57
|
+
## Install
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
$ pip install alphafold3-pytorch
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Usage
|
|
64
|
+
|
|
65
|
+
```python
|
|
66
|
+
import torch
|
|
67
|
+
from alphafold3_pytorch import Alphafold3
|
|
68
|
+
|
|
69
|
+
alphafold3 = Alphafold3(
|
|
70
|
+
dim_atom_inputs = 77,
|
|
71
|
+
dim_additional_residue_feats = 33,
|
|
72
|
+
dim_template_feats = 44
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
# mock inputs
|
|
76
|
+
|
|
77
|
+
seq_len = 16
|
|
78
|
+
atom_seq_len = seq_len * 27
|
|
79
|
+
|
|
80
|
+
atom_inputs = torch.randn(2, atom_seq_len, 77)
|
|
81
|
+
atom_mask = torch.ones((2, atom_seq_len)).bool()
|
|
82
|
+
atompair_feats = torch.randn(2, atom_seq_len, atom_seq_len, 16)
|
|
83
|
+
additional_residue_feats = torch.randn(2, seq_len, 33)
|
|
84
|
+
|
|
85
|
+
template_feats = torch.randn(2, 2, seq_len, seq_len, 44)
|
|
86
|
+
template_mask = torch.ones((2, 2)).bool()
|
|
87
|
+
|
|
88
|
+
msa = torch.randn(2, 7, seq_len, 64)
|
|
89
|
+
|
|
90
|
+
# train
|
|
91
|
+
|
|
92
|
+
loss = alphafold3(
|
|
93
|
+
num_recycling_steps = 2,
|
|
94
|
+
atom_inputs = atom_inputs,
|
|
95
|
+
atom_mask = atom_mask,
|
|
96
|
+
atompair_feats = atompair_feats,
|
|
97
|
+
additional_residue_feats = additional_residue_feats,
|
|
98
|
+
msa = msa,
|
|
99
|
+
templates = template_feats,
|
|
100
|
+
template_mask = template_mask
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
loss.backward()
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Citations
|
|
108
|
+
|
|
109
|
+
```bibtex
|
|
110
|
+
@article{Abramson2024-fj,
|
|
111
|
+
title = "Accurate structure prediction of biomolecular interactions with
|
|
112
|
+
{AlphaFold} 3",
|
|
113
|
+
author = "Abramson, Josh and Adler, Jonas and Dunger, Jack and Evans,
|
|
114
|
+
Richard and Green, Tim and Pritzel, Alexander and Ronneberger,
|
|
115
|
+
Olaf and Willmore, Lindsay and Ballard, Andrew J and Bambrick,
|
|
116
|
+
Joshua and Bodenstein, Sebastian W and Evans, David A and Hung,
|
|
117
|
+
Chia-Chun and O'Neill, Michael and Reiman, David and
|
|
118
|
+
Tunyasuvunakool, Kathryn and Wu, Zachary and {\v Z}emgulyt{\.e},
|
|
119
|
+
Akvil{\.e} and Arvaniti, Eirini and Beattie, Charles and
|
|
120
|
+
Bertolli, Ottavia and Bridgland, Alex and Cherepanov, Alexey and
|
|
121
|
+
Congreve, Miles and Cowen-Rivers, Alexander I and Cowie, Andrew
|
|
122
|
+
and Figurnov, Michael and Fuchs, Fabian B and Gladman, Hannah and
|
|
123
|
+
Jain, Rishub and Khan, Yousuf A and Low, Caroline M R and Perlin,
|
|
124
|
+
Kuba and Potapenko, Anna and Savy, Pascal and Singh, Sukhdeep and
|
|
125
|
+
Stecula, Adrian and Thillaisundaram, Ashok and Tong, Catherine
|
|
126
|
+
and Yakneen, Sergei and Zhong, Ellen D and Zielinski, Michal and
|
|
127
|
+
{\v Z}{\'\i}dek, Augustin and Bapst, Victor and Kohli, Pushmeet
|
|
128
|
+
and Jaderberg, Max and Hassabis, Demis and Jumper, John M",
|
|
129
|
+
journal = "Nature",
|
|
130
|
+
month = may,
|
|
131
|
+
year = 2024
|
|
132
|
+
}
|
|
133
|
+
```
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
alphafold3_pytorch-0.0.1.dist-info/METADATA,sha256=mQKpJ0jYePSWLvwU4beQzZQZBM-2S_Ei7z7xsgMr8yQ,4950
|
|
2
|
+
alphafold3_pytorch-0.0.1.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
|
|
3
|
+
alphafold3_pytorch-0.0.1.dist-info/licenses/LICENSE,sha256=E7RGS7kpJIStk5za_-4DVhWEAamf65EU0CNML25mq4c,1066
|
|
4
|
+
alphafold3_pytorch-0.0.1.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Phil Wang
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|