Skip to content

Commit f0de8b2

Browse files
committed
fix some logic with has_{embed_type}
1 parent 43e3db6 commit f0de8b2

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

alphafold3_pytorch/alphafold3.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3053,8 +3053,11 @@ def __init__(
30533053

30543054
# optional atom and atom bond embeddings
30553055

3056-
has_atom_embeds = exists(num_atom_embeds)
3057-
has_atompair_embeds = exists(num_atompair_embeds)
3056+
num_atom_embeds = default(num_atom_embeds, 0)
3057+
num_atompair_embeds = default(num_atompair_embeds, 0)
3058+
3059+
has_atom_embeds = num_atom_embeds > 0
3060+
has_atompair_embeds = num_atompair_embeds > 0
30583061

30593062
if has_atom_embeds:
30603063
self.atom_embeds = nn.Embedding(num_atom_embeds, dim_atom)
@@ -3067,6 +3070,8 @@ def __init__(
30673070

30683071
# residue or nucleotide modifications
30693072

3073+
num_molecule_mods = default(num_molecule_mods, 0)
3074+
30703075
has_molecule_mod_embeds = num_molecule_mods > 0
30713076
self.num_molecule_mods = num_molecule_mods
30723077

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

0 commit comments

Comments
 (0)