You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-10Lines changed: 29 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,9 +25,10 @@ AtomWorks is built atop [biotite](https://www.biotite-python.org/): We are grate
25
25
26
26
## atomworks.io
27
27
28
-
*A general-purpose Python toolkit for working with biomolecular files*
28
+
> *A general-purpose Python toolkit for cleaning up, standardizing, and working with biomolecular files - based on biotite*
29
29
30
30
**atomworks.io** lets you:
31
+
31
32
- Parse, convert, and clean any common biological file (structure or sequence). For example, identifying and removing leaving groups, correcting bond order after nucleophilic addition, fixing charges, parsing covalent geometries, and appropriate treatment of structures with multiple occupancies and ligands at symmetry centers
32
33
- Transform all data to a consistent `AtomArray` representation for further analysis or machine learning applications, regardless of initial source
33
34
- Model missing atoms (those implied by the sequence but not represented in the coordinates) and initialize entity- and instance-level annotations (see the [glossary]() for more detail on our composable naming conventions)
@@ -38,9 +39,10 @@ We have found `atomworks.io` to be useful to a general bioinformatics and protei
38
39
39
40
## atomworks.ml
40
41
41
-
*Modular, component-based library for dataset featurization within biomolecular deep learning workflows*
42
+
> *Modular, component-based library for dataset featurization within biomolecular deep learning workflows*
42
43
43
44
**atomworks.ml** provides:
45
+
44
46
- A library of pre-built, well-tested `Transforms` that can be slotted into novel pipelines
45
47
- An extensible framework, integrated with `atomworks.io`, to write `Transforms` for arbitrary use cases
46
48
- Scripts to pre-process the PDB or other databases into dataframes appropriate for network training
@@ -102,6 +104,7 @@ for chain_id, info in result["chain_info"].items():
102
104
```
103
105
104
106
The output of `parse` includes:
107
+
105
108
-**chain_info** — Sequences/metadata for each chain
106
109
-**ligand_info** — Ligand annotation & metrics
107
110
-**asym_unit** — Structure (`AtomArrayStack`)
@@ -118,8 +121,8 @@ from atomworks.io.utils.io_utils import load_any
118
121
atom_array: AtomArray = load_any("3nez.cif.gz", model=1) # model=1 means that we want to load the model 1 (i.e. the first model) rather than a stack of all models in the file
119
122
```
120
123
121
-
122
124
### 3. Training on the PDB
125
+
123
126
> ⚠️ **Disclaimer:** Documentation for this section is currently under construction. Please check back soon for updates!
124
127
125
128
**Step 1 — Mirror the PDB (mmCIFs)**
@@ -154,20 +157,23 @@ atom_array: AtomArray = load_any("3nez.cif.gz", model=1) # model=1 means that w
154
157
155
158
This produces parquet files at:
156
159
157
-
-`/path/to/metadata/ml/pdb_pn_units/metadata.parquet` — Contains metadata for each *PN unit* in the PDB. The term *pn unit* is shorthand for `polymer XOR non-polymer unit` and behaves for almost all purposes like the `chain` in a PDB file. The only difference is that a ligand composed of multiple covalently bonded ligands is considered a single PN unit (whilst it would be multiple chains in a PDB file). Effectively this `.parquet` is a large table of all individual chains, ligands, etc (to be precise, it has one entry per pn unit) in the PDB that includes helpful metadata for filtering and sampling.
158
-
-`/path/to/metadata/ml/pdb_interfaces/metadata.parquet` — Contains metadata for each interface in the PDB. This `.parquet` is a large table of all binary interfaces in the PDB. It lists each interface as (pn_unit_1, pn_unit_2) pairs and includes helpful metadata for filtering and sampling.
160
+
-`/path/to/metadata/pn_units_df.parquet` — Contains metadata for each *PN unit* in the PDB. The term *pn unit* is shorthand for `polymer XOR non-polymer unit` and behaves for almost all purposes like the `chain` in a PDB file. The only difference is that a ligand composed of multiple covalently bonded ligands is considered a single PN unit (whilst it would be multiple chains in a PDB file). Effectively this `.parquet` is a large table of all individual chains, ligands, etc (to be precise, it has one entry per pn unit) in the PDB that includes helpful metadata for filtering and sampling.
161
+
-`/path/to/metadata/interfaces_df.parquet` — Contains metadata for each interface in the PDB. This `.parquet` is a large table of all binary interfaces in the PDB. It lists each interface as (pn_unit_1, pn_unit_2) pairs and includes helpful metadata for filtering and sampling.
159
162
160
163
Alternatively, you can generate fresher metadata yourself (scripts will be uploaded in the coming weeks).
161
164
162
165
**Step 3 — Configure an AF3-style dataset (example: train only on D-polypeptides)**
163
-
164
166
Next we need to use the metadata to configure a dataset that we would like to sample from. This includes e.g. training cut-off, filters, transforms to apply, etc.
165
167
Here's a simple example that:
166
168
167
169
- Filters to D-polypeptide and L-polypeptide chains only (`POLYPEPTIDE_D` and `POLYPEPTIDE_L` -- to include additional chain types, replace the lists with the appropriate IDs (see [mapping](./src/atomworks/enums.py#L31-L45) in comments).
168
170
- Excludes ligands in the AF3 list of excluded ligands, available at [`atomworks.io.constants.AF3_EXCLUDED_LIGANDS_REGEX`](./src/atomworks/io/constants.py#L350).
169
171
170
172
```yaml
173
+
# NOTE: The below is a hydra config and the _target_ fields are the hydra syntax for instantiating a class.
174
+
# You can use this without hyrda, but will then instead need to provide the corresponding arguments for the
175
+
# _target_ objects directly.
176
+
171
177
# Chain type ids used below (from atomworks.enums.ChainType):
- "resolution < 5.0 and ~method.str.contains('NMR')"
@@ -294,5 +300,18 @@ Please see the [full documentation](https://baker-laboratory.github.io/atomworks
294
300
295
301
If you make use of AtomWorks in your research, please cite:
296
302
297
-
* N. Corley, S. Mathis, R. Krishna, M. S. Bauer, T. R. Thompson, W. Ahern, M. W. Kazman, R. I. Brent, K. Didi, A. Kubaney, L. McHugh, A. Nagle, A. Favor, M. Kshirsagar, P. Sturmfels, Y. Li, J. Butcher, B. Qiang, L. L. Schaaf, R. Mitra, K. Campbell, O. Zhang, R. Weissman, I. R. Humphreys, Q. Cong, J. Funk, S. Sonthalia, P. Lio, D. Baker, F. DiMaio,
298
-
"Accelerating Biomolecular Modeling with AtomWorks and RF3," bioRxiv, August 2025. doi: [10.1101/2025.08.14.670328](https://doi.org/10.1101/2025.08.14.670328)
303
+
> N. Corley\*, S. Mathis\*, R. Krishna\*, M. S. Bauer, T. R. Thompson, W. Ahern, M. W. Kazman, R. I. Brent, K. Didi, A. Kubaney, L. McHugh, A. Nagle, A. Favor, M. Kshirsagar, P. Sturmfels, Y. Li, J. Butcher, B. Qiang, L. L. Schaaf, R. Mitra, K. Campbell, O. Zhang, R. Weissman, I. R. Humphreys, Q. Cong, J. Funk, S. Sonthalia, P. Lio, D. Baker, F. DiMaio,
304
+
> "Accelerating Biomolecular Modeling with AtomWorks and RF3," bioRxiv, August 2025. doi: [10.1101/2025.08.14.670328](https://doi.org/10.1101/2025.08.14.670328)
305
+
306
+
If you use bibtex, here's the GoogleScholar formatted citation:
307
+
308
+
```bibtex
309
+
@article{corley2025accelerating,
310
+
title={Accelerating Biomolecular Modeling with AtomWorks and RF3},
311
+
author={Corley, Nathaniel and Mathis, Simon and Krishna, Rohith and Bauer, Magnus S and Thompson, Tuscan R and Ahern, Woody and Kazman, Maxwell W and Brent, Rafael I and Didi, Kieran and Kubaney, Andrew and others},
0 commit comments