File size: 3,848 Bytes
373e2bb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | # OpenDDE Tutorial
A short walkthrough using files in [`examples/`](../examples). For install and
runtime data setup, see [inference_instructions.md](./inference_instructions.md)
or [docker_installation.md](./docker_installation.md).
## 1. Check the environment
Run commands from the repository root:
```bash
opendde doctor
export OPENDDE_ROOT_DIR=/path/to/opendde_data
```
Prediction needs:
```text
$OPENDDE_ROOT_DIR/checkpoint/opendde.pt
$OPENDDE_ROOT_DIR/common/
```
The released general-purpose checkpoint is
[`opendde.pt`](https://huggingface.co/aurekaresearch/OpenDDE/resolve/main/opendde.pt).
For antibody-antigen (ABAG) complexes, use the ABAG-optimized
[`opendde_abag.pt`](https://huggingface.co/aurekaresearch/OpenDDE/resolve/main/opendde_abag.pt).
Place them under `$OPENDDE_ROOT_DIR/checkpoint/`, preserving the filenames. Pass
`opendde_abag.pt` directly with `--load_checkpoint_path` for ABAG runs.
```bash
mkdir -p "$OPENDDE_ROOT_DIR/checkpoint"
curl -L \
-o "$OPENDDE_ROOT_DIR/checkpoint/opendde.pt" \
https://huggingface.co/aurekaresearch/OpenDDE/resolve/main/opendde.pt
```
Template/RNA-MSA preprocessing also needs `hmmer`; template inference may need
`kalign`.
## 2. Compatibility prediction
This disables external features and keeps the standard step/cycle counts.
Inference defaults to `fp32` and `auto` triangle kernels (PyTorch on CPU), so no
extra dtype or kernel flags are needed:
```bash
opendde pred \
-i examples/input.json \
-o ./output \
-n opendde_v1 \
--use_msa false \
--use_template false \
--use_rna_msa false \
--sample 1 \
--step 200 \
--cycle 10
```
Outputs go to:
```text
output/<job_name>/seed_<seed>/predictions/
```
## 3. Input JSON basics
OpenDDE input is a list of jobs:
```json
[
{
"name": "tiny",
"sequences": [
{
"proteinChain": {
"sequence": "ACDEFGHIK",
"count": 1
}
}
]
}
]
```
`covalent_bonds` is optional here and can be left out; it is only needed to
declare explicit covalent links between entities.
Entity keys include `proteinChain`, `dnaSequence`, `rnaSequence`, `ligand`, and
`ion`. Full schema: [infer_json_format.md](./infer_json_format.md).
Convert a PDB/CIF instead of writing JSON by hand:
```bash
opendde json -i examples/7pzb.pdb -o ./output --altloc first
```
## 4. Use precomputed MSA/template features
[`examples/examples_with_template/example_9fm7.json`](../examples/examples_with_template/example_9fm7.json)
already contains `pairedMsaPath`, `unpairedMsaPath`, and `templatesPath`:
```bash
opendde pred \
-i examples/examples_with_template/example_9fm7.json \
-o ./output \
-n opendde_v1 \
--use_msa true \
--use_template true \
--use_rna_msa false
```
## 5. Generate MSA/template features
For an input without MSA/template paths:
```bash
opendde prep -i examples/example_without_msa.json -o ./output
```
This writes an updated JSON next to the input. Predict from that updated JSON:
```bash
opendde pred \
-i examples/example_without_msa-final-updated.json \
-o ./output \
-n opendde_v1 \
--use_msa true \
--use_template true \
--use_rna_msa false
```
For protein MSA only, use `opendde msa`. For protein MSA + template only, use
`opendde mt`.
## 6. RNA MSA example
[`examples/examples_with_rna_msa/example_9gmw_2.json`](../examples/examples_with_rna_msa/example_9gmw_2.json)
contains a precomputed RNA MSA:
```bash
opendde pred \
-i examples/examples_with_rna_msa/example_9gmw_2.json \
-o ./output \
-n opendde_v1 \
--use_rna_msa true
```
To generate RNA MSA for your own RNA input, run `opendde prep` first.
## More details
- [Inference instructions](./inference_instructions.md)
- [Input JSON format](./infer_json_format.md)
- [MSA/template/RNA-MSA pipeline](./msa_template_pipeline.md)
- [Kernel options](./kernels.md)
|