Skip to content

Commit

Permalink
fix smooth lddt loss
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed May 25, 2024
1 parent 6dad1e5 commit 9ab2eb0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions alphafold3_pytorch/alphafold3.py
Original file line number Diff line number Diff line change
Expand Up @@ -2047,7 +2047,7 @@ def forward(

smooth_lddt_loss = self.smooth_lddt_loss(
denoised_atom_pos,
normalized_atom_pos,
atom_pos_ground_truth,
atom_is_dna,
atom_is_rna,
coords_mask = atom_mask
Expand Down Expand Up @@ -2488,7 +2488,7 @@ def __init__(
self,
*,
dim_single_inputs,
atompair_dist_bins: Float['d'],
atompair_dist_bins: Float[' d'],
dim_single = 384,
dim_pairwise = 128,
num_plddt_bins = 50,
Expand Down
2 changes: 1 addition & 1 deletion alphafold3_pytorch/attention.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from __future__ import annotations
from typing import NamedTuple
from typing import NamedTuple, Tuple

import torch
from torch import nn
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "alphafold3-pytorch"
version = "0.0.33"
version = "0.0.34"
description = "Alphafold 3 - Pytorch"
authors = [
{ name = "Phil Wang", email = "lucidrains@gmail.com" }
Expand Down
2 changes: 1 addition & 1 deletion tests/test_af3.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ def test_alphafold3():
pde_labels = pde_labels,
plddt_labels = plddt_labels,
resolved_labels = resolved_labels,
diffusion_add_smooth_lddt_loss = True,
return_loss_breakdown = True
)

Expand Down Expand Up @@ -580,7 +581,6 @@ def test_alphafold3_with_packed_atom_repr():

loss.backward()

print(residue_atom_lens)
sampled_atom_pos = alphafold3(
num_sample_steps = 16,
atom_inputs = atom_inputs,
Expand Down

0 comments on commit 9ab2eb0

Please sign in to comment.