Skip to content

Commit

Permalink
feat: RandomLigandTransform to perform system level ligand transforma…
Browse files Browse the repository at this point in the history
…tion (to be used in training) (#17)

* added  ()

* added structure transform

* separated target and feature transforms

* added type annotations

* docs: update readmes with latest PinderDataset/Loader APIs reflecting separate transforms applied to feature and target complex

* docs: update loader notebook w/latest transform API

* docs: (WIP) update MLSB nb with latest transforms API

* docs: update example notebooks w/latest output containing chain_ids in the structure2tensor transform

* bumpversion minor

---------

Co-authored-by: danielkovtun <[email protected]>
  • Loading branch information
akdel and danielkovtun authored Sep 23, 2024
1 parent 827925f commit ab4daaa
Show file tree
Hide file tree
Showing 8 changed files with 340 additions and 214 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ for `conda` for the same functionality):


```bash
mamba create --name pinder python=3.10
mamba create --name pinder python=3.11
mamba activate pinder
```

Expand Down Expand Up @@ -451,7 +451,8 @@ train_dataset = PinderDataset(
base_filters: list[filters.PinderFilterBase] = [],
sub_filters: list[filters.PinderFilterSubBase] = [],
structure_filters: list[filters.StructureFilter] = [],
structure_transforms: list[transforms.StructureTransform] = [],
structure_transforms_target: list[transforms.StructureTransform] = [],
structure_transforms_feature: list[transforms.StructureTransform] = [],
)

train_loader = get_torch_loader(train_dataset, batch_size=2, shuffle=True)
Expand Down Expand Up @@ -834,7 +835,7 @@ git clone [email protected]:pinder-org/pinder.git

```bash
cd pinder
mamba create --name pinder python=3.10
mamba create --name pinder python=3.11
mamba activate pinder
```

Expand Down
7 changes: 5 additions & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ sub_filters = [
filters.FilterSubRmsds(rmsd_cutoff=7.5),
filters.FilterDetachedSub(radius=12, max_components=2),
]
# We can include Structure-level transforms (and filters) which will operate on the target and feature complexes
# We can include Structure-level transforms (and filters) which will operate on the target and/or feature complexes
structure_transforms = [
transforms.SelectAtomTypes(atom_types=["CA", "N", "C", "O"])
]
Expand All @@ -331,7 +331,10 @@ train_dataset = PinderDataset(
monomer_priority="random_mixed",
base_filters = base_filters,
sub_filters = sub_filters,
structure_transforms=structure_transforms,
# Apply to the target (ground-truth) complex
structure_transforms_target=structure_transforms,
# Apply to the feature complex
structure_transforms_feature=structure_transforms,
)
batch_size = 2
train_dataloader = get_torch_loader(
Expand Down
Loading

0 comments on commit ab4daaa

Please sign in to comment.