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
- Updated README with corrected documentation links and quick start instructions
- Removed no longer relevant portions of the installation guide
- Updated the contributors guide with more detailed code and documentation contribution instructions.
@@ -57,54 +57,64 @@ We have found that `atomworks.ml` **dramatically** reduces the overhead of start
57
57
58
58
---
59
59
60
+
## When to use `atomworks.io` vs `atomworks.ml`?
61
+
62
+
- Use `atomworks.io` when you:
63
+
- Need to parse/clean/convert between biological file formats (mmCIF, PDB, FASTA, etc.)
64
+
- Want a unified structural representation to plug into any downstream analysis or modeling
65
+
- Need structural operations like adding missing atoms, filtering ligands/solvents, or assembly generation
66
+
67
+
- Use `atomworks.ml` when you:
68
+
- Need to featurize entire datasets for deep learning
69
+
- Want ready-made sampling and batching utilities for training pipelines
70
+
- Already use `atomworks.io` and want a seamless bridge to ML-ready feature engineering
71
+
72
+
---
73
+
60
74
## Installation
75
+
> Note: AtomWorks requires Python >= 3.11 and [`dotenv`](https://pypi.org/project/python-dotenv/#file-format)
61
76
62
77
```shell
63
78
pip install atomworks # base installation version without torch (for only atomworks.io)
64
79
pip install "atomworks[ml]"# with torch and ML dependencies (for atomworks.io plus atomworks.ml)
65
80
pip install "atomworks[dev]"# with development dependencies
66
-
pip install "atomworks[ml,dev]"# with all dependencies
81
+
pip install "atomworks[openbabel]"# with [Open Babel](https://openbabel.org/) and its dependencies
82
+
pip install "atomworks[ml,openbabel,dev]"# with all dependencies
67
83
```
84
+
*Running multiple of these installations will just add to the installed dependencies and will not install multiple installations of atomworks.*
68
85
69
86
If you are using [uv](https://docs.astral.sh/uv/reference/policies/versioning/) for package management, you can install atomworks with:
70
87
71
88
```shell
72
89
uv pip install "atomworks[ml,openbabel,dev]"
73
90
```
74
91
75
-
For more advanced setup options (including how to run workflows via apptainers) see the [full documentation](https://baker-laboratory.github.io/atomworks-dev/latest).
92
+
For more advanced setup options (including how to run workflows via apptainers) see the [full documentation](https://rosettacommons.github.io/atomworks/latest/index.html).
76
93
77
94
---
78
95
79
96
## Getting started
80
97
81
-
### 1. When to use `atomworks.io` vs `atomworks.ml`?
98
+
This section contains information for how to get atomworks set up and a quick guide for using some of the features of atomworks.io to parse PDB files. To learn more about the features in atomworks.io and atomworks.ml, see the [external documentation](https://rosettacommons.github.io/atomworks/latest/).
82
99
83
-
- Use `atomworks.io` when you:
84
-
- Need to parse/clean/convert between biological file formats (mmCIF, PDB, FASTA, etc.)
85
-
- Want a unified structural representation to plug into any downstream analysis or modeling
86
-
- Need structural operations like adding missing atoms, filtering ligands/solvents, or assembly generation
87
-
88
-
- Use `atomworks.ml` when you:
89
-
- Need to featurize entire datasets for deep learning
90
-
- Want ready-made sampling and batching utilities for training pipelines
91
-
- Already use `atomworks.io` and want a seamless bridge to ML-ready feature engineering
92
-
93
-
### 2. Quick Start
100
+
### 1. Quick Start
94
101
95
102
To parse a pdb file (parse = load, clean, annotate relevant metadata such as entities, molecules, etc) you can use the `parse` function:
96
103
104
+
> Note: To run the code in this section you will need to download the 3nez.cif.gz file yourself. See the [examples](https://rosettacommons.github.io/atomworks/latest/auto_examples/index.html) for how to download files from the PDB within a Python script.
@@ -116,17 +126,19 @@ The output of `parse` includes:
116
126
-**assemblies** — Built biological assemblies (each are their own `AtomArrayStack`)
117
127
-**metadata** — Experimental and source information
118
128
119
-
See [usage examples](https://baker-laboratory.github.io/atomworks-dev/latest/auto_examples/) for more details.
129
+
See [usage examples](https://rosettacommons.github.io/atomworks/latest/auto_examples/index.html) for more examples of the use of `parse()`. All of the provided examples make use of this method.
130
+
See [API reference documentation](https://rosettacommons.github.io/atomworks/latest/io/parser.html) for more information on this method.
120
131
121
132
If you just want to load a file, you can use the `load_any` function:
122
133
123
134
```python
124
135
from atomworks.io.utils.io_utils import load_any
136
+
from biotite.structure import AtomArray
125
137
126
138
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
127
139
```
128
140
129
-
### 3. Training on the PDB
141
+
### 2. Training on the PDB
130
142
131
143
> ⚠️ **Disclaimer:** Documentation for this section is currently under construction. Please check back soon for updates!
132
144
@@ -172,7 +184,7 @@ Next we need to use the metadata to configure a dataset that we would like to sa
172
184
Here's a simple example that:
173
185
174
186
- 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).
175
-
- Excludes ligands in the AF3 list of excluded ligands, available at [`atomworks.io.constants.AF3_EXCLUDED_LIGANDS_REGEX`](./src/atomworks/io/constants.py#L350).
187
+
- Excludes ligands in the AF3 list of excluded ligands, available at [`atomworks.io.constants.AF3_EXCLUDED_LIGANDS_REGEX`](./src/atomworks/constants.py#L350).
176
188
177
189
```yaml
178
190
# NOTE: The below is a hydra config and the _target_ fields are the hydra syntax for instantiating a class.
@@ -281,8 +293,10 @@ Or alternatively not use MSAs.
281
293
**Step 5 — Train a model**
282
294
You now have a full fledged dataset that you can use to train models on! If you want to just try this out without having to download the whole PDB and the metdatada, you can instead run our tests which have a mini-mockup of the pipeline with real pdb files, metadata, distillation data, templates and MSAs for the example of AF3. You can download all this relevant metadata via the atomworks CLI:
283
295
296
+
> Note: Make sure you are in the AtomWorks root directory when you run the following command, otherwise a new tests/data folder will be created in your current working directory.
297
+
284
298
```bash
285
-
atomworks setup tests # This will download the test pack to `tests/data` and unpack it there (~500 MB)
299
+
atomworks setup tests # This will download the test pack to `tests/data` and unpack it there (~500 MB).
286
300
```
287
301
288
302
You will now have a mini PDB at `tests/data/pdb` and a mini custom CCD at `tests/data/ccd`. MSA and template data is in `tests/data/shared` and the distillation and metadata are in `data/ml/af2_distillation`, `data/ml/pdb_pn_units` and `data/ml/pdb_interfaces`. A dataset that uses all of these is [for example here](./tests/ml/conftest.py#L300).
@@ -291,15 +305,15 @@ To run the tests for the various datasets, you can run the following command:
291
305
292
306
```bash
293
307
# Make sure you have the correct environment activated, and set your paths correctly in the .env file / shell environment variables (see points above)
Please see the [full documentation](https://baker-laboratory.github.io/atomworks-dev/latest/index.html) for contribution guidelines.
316
+
Please see the [contributors guide in the full documentation](https://rosettacommons.github.io/atomworks/latest/contributor_guide.html) for contribution guidelines.
Copy file name to clipboardExpand all lines: docs/contributor_guide.rst
+40-14Lines changed: 40 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,23 +12,30 @@ As you code
12
12
13
13
1. **Reduce cognitive overhead:**
14
14
a. Pick meaningful, descriptive variable names.
15
-
b. Write docstrings (leverage AI!) and comments.
15
+
b. Write docstrings (leverage AI!) and comments. To be used in the API documentation the docstring should
16
+
follow the Google style guide: `Google Python Style Guide <https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings>`_.
16
17
c. Follow the `Python Zen <https://peps.python.org/pep-0020/>`_ – explicit is better than implicit, etc.
17
18
2. **Write tests.**
18
19
19
20
As you commit
20
21
---------------
21
22
22
-
1. Keep commits as "one logical unit". (Easy to do in VSCode)
23
-
2. Adhere to `semantic commit conventions <https://www.conventionalcommits.org/en/v1.0.0/>`_.
24
-
3. Format & lint your code (``make format``).
25
-
4. Submit a draft PR so people know you are working on this & can provide advice/feedback early on.
23
+
1. Keep commits as "one logical unit". This means that each commit should be a set of related changes
24
+
that accomplish one task, fix one bug, or implement one feature. Using an editor like `VS Code <https://code.visualstudio.com/docs/sourcecontrol/overview>`_
25
+
or using `GitHub Desktop <https://docs.github.com/en/desktop>`_ can help you stage related changes together.
26
+
27
+
2. Adhere to `semantic commit conventions <https://www.conventionalcommits.org/en/v1.0.0/>`_.
28
+
29
+
3. Format & lint your code (``make format``).
30
+
31
+
4. Submit a draft PR so people know you are working on this & can provide advice/feedback early on.
26
32
27
33
As you finalize a PR
28
34
---------------------
29
35
30
-
1. Keep overall PR under <400 LOC (Rule of thumb: 500 LOC takes about 1h to review).
31
-
2. Read and fill out the PR checklist.
36
+
1. To make a PR merge your branch to **staging**. The maintainers will regularly merge staging into production.
37
+
2. Keep overall PR under <400 LOC (lines of code) (Rule of thumb: 500 LOC takes about 1h to review).
38
+
3. Read and fill out the `PR checklist <https://github.com/RosettaCommons/atomworks/blob/production/.github/pull_request_template.md>`_.
32
39
33
40
As you review
34
41
---------------
@@ -37,6 +44,25 @@ As you review
37
44
2. Practice light-weight code reviews. Submit something small to atomworks.io/atomworks.ml that fixes a bug / improves documentation / adds a tiny feature to practice this within the next 24h. (Can be less than 30min)
38
45
3. Keep review time <1h and <500 LOC for focus.
39
46
47
+
Contributing to the documentation
48
+
--------------------------------
49
+
The external AtomWorks documentation is built using `Sphinx <https://www.sphinx-doc.org/en/master/#>`_ and hosted on `GitHub Pages <https://docs.github.com/en/pages>`_.
50
+
Aside from having AtomWorks and its dependencies installed, to build the documentation locally, you will need to install the documentation requirements:
51
+
52
+
.. code-block:: bash
53
+
54
+
uv pip install -r docs/docs_requirements.txt
55
+
56
+
To build the documentation, navigate to the ``docs`` directory and run:
57
+
58
+
.. code-block:: bash
59
+
60
+
make html
61
+
62
+
If you are new to Sphinx, please refer to the `Sphinx documentation <https://www.sphinx-doc.org/en/master/>`_ for guidance on writing and formatting documentation.
63
+
All of the documentation is written in reStructuredText (reST) format. For more information on reST, see the `reStructuredText Primer <https://docutils.sourceforge.io/docs/user/rst/quickstart.html>`_.
64
+
65
+
40
66
Visual Aids
41
67
-----------
42
68
@@ -64,15 +90,15 @@ PR Hygiene
64
90
When contributing to this repository, please follow these steps:
65
91
66
92
1. Clone the repository
67
-
2. Create the development environment (see Installation section)
93
+
2. Create the development environment (see the :ref:`Local Conda Environment<local-conda_environment>` section in the Installation Guide).
68
94
3. Create a new branch for your changes.
69
-
- Use the following convention to name your branch: `<category>/<description>`. Categories: `feat`, `fix`, `hotfix`, `refactor`, `docs`, `perf`.
70
-
- Example: `feat/support-rdkit-small-molecule`
95
+
- Use the following convention to name your branch: ``<category>/<description>``. Categories: ``feat``, ``fix``, ``hotfix``, ``refactor``, ``docs``, ``perf``.
96
+
- Example: ``feat/support-rdkit-small-molecule``
71
97
4. Make and commit your changes on your new branch.
72
-
- Run autoformatting tools (`make format`) before committing.
73
-
- Use commit messages like `<type>: <description>`. Types: `feat`, `fix`, `refactor`, `docs`, `chore`, `wip`.
0 commit comments