Skip to content

Commit 00d4b4a

Browse files
authored
[fix] make molecule_atom_indices to correct global indices (#44)
1 parent 4d1abb8 commit 00d4b4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

alphafold3_pytorch/alphafold3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3270,7 +3270,7 @@ def forward(
32703270
# handle offsets for molecule atom indices
32713271

32723272
if exists(molecule_atom_indices):
3273-
molecule_atom_indices = molecule_atom_indices + F.pad(molecule_atom_lens, (-1, 1), value = 0)
3273+
molecule_atom_indices = molecule_atom_indices + F.pad(molecule_atom_lens.cumsum(dim = -1), (1, -1), value = 0)
32743274

32753275
# get atom sequence length and molecule sequence length depending on whether using packed atomic seq
32763276

0 commit comments

Comments
 (0)