Skip to content

Commit ddd3027

Browse files
committed
add an assert for matching molecules with missing_atom_indices
1 parent 34f8d44 commit ddd3027

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

alphafold3_pytorch/inputs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,8 @@ def molecule_to_atom_input(
299299

300300
if exists(i.missing_atom_indices) and len(i.missing_atom_indices) > 0:
301301

302+
assert len(molecules) == len(i.missing_atom_indices), f'{len(i.missing_atom_indices)} missing atom indices does not match the number of molecules given ({len(molecules)})'
303+
302304
missing_atom_indices: List[Int[' _']] = [default(indices, torch.empty((0,), dtype = torch.long)) for indices in i.missing_atom_indices]
303305

304306
missing_atom_mask: List[Bool[' _']] = []

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "alphafold3-pytorch"
3-
version = "0.1.132"
3+
version = "0.1.133"
44
description = "Alphafold 3 - Pytorch"
55
authors = [
66
{ name = "Phil Wang", email = "[email protected]" }

0 commit comments

Comments
 (0)