Skip to content

Commit

Permalink
Merge pull request #80 from linusyh/fix-sequence-edges
Browse files Browse the repository at this point in the history
Fix `sequence_edges` when b is a Data object
  • Loading branch information
amorehead authored Mar 2, 2024
2 parents e6aee4f + 76ab97b commit 3bea793
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
### Command
* Adds `--force-cuda-version` to `workshop install` [#78](https://github.com/a-r-j/ProteinWorkshop/pull/78)

### Features
* Fix `sequence_edges` behaviour when argument `b` is a `Data` object [#80](https://github.com/a-r-j/ProteinWorkshop/pull/80)

### 0.2.5 (28/12/2023)

Expand Down
2 changes: 1 addition & 1 deletion proteinworkshop/features/edges.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def sequence_edges(
idx_b = torch.arange(1, b.ptr[-1], device=b.ptr.device)
elif isinstance(b, Data):
idx_a = torch.arange(0, b.coords.shape[0] - 1, device=b.coords.device)
idx_a = torch.arange(1, b.coords.shape[0] - 1, device=b.coords.device)
idx_b = torch.arange(1, b.coords.shape[0], device=b.coords.device)
# Concatenate indices to create edge list
if direction == "forward":
e_index = torch.stack([idx_a, idx_b], dim=0)
Expand Down

0 comments on commit 3bea793

Please sign in to comment.