Skip to content

Commit ba81c59

Browse files
committed
comment and quick assert
1 parent 9bbccd2 commit ba81c59

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

alphafold3_pytorch/inputs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,8 @@ def get_num_atoms_per_chain(chains: List[List[Mol]]) -> List[int]:
740740
if isinstance(atom_pos, list):
741741
atom_pos = torch.cat(atom_pos, dim = -2)
742742

743+
assert atom_pos.shape[-2] == total_atoms
744+
743745
# to automatically reorder the atom positions back to canonical
744746

745747
if i.add_output_atompos_indices:

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.94"
3+
version = "0.1.95"
44
description = "Alphafold 3 - Pytorch"
55
authors = [
66
{ name = "Phil Wang", email = "[email protected]" }

tests/test_input.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ def test_atompos_input():
7979
contrived_protein = 'AG'
8080

8181
mock_atompos = [
82-
torch.randn(6, 3),
83-
torch.randn(5, 3)
82+
torch.randn(6, 3), # alanine has 6 non-hydrogen atoms
83+
torch.randn(5, 3) # glycine has 5 non-hydrogen atoms
8484
]
8585

8686
train_alphafold3_input = Alphafold3Input(

0 commit comments

Comments
 (0)