lucidrains / alphafold3-pytorch

Implementation of Alphafold 3 from Google Deepmind in Pytorch
MIT License
1.26k stars 155 forks source link

How to generate predicted frame? #161

Open andrewliu2001 opened 3 months ago

andrewliu2001 commented 3 months ago

I understand the ground truth frame is generated by taking the two nearest neighbors of each atom. How is the predicted frame generated? Do you perform two nearest neighbors on the predicted coords?

amorehead commented 3 months ago

Please see: https://github.com/lucidrains/alphafold3-pytorch/blob/e54c050ce62c449a720ec0cbe327c3da670b9573/alphafold3_pytorch/alphafold3.py#L5861

In short, for polymer (protein, DNA, and RNA) residues, their three residue-specific atom indices are predefined according to each residue's canonical backbone structure. You can read what these predefined indices represented in the AF3 supplement. For ligands, for each heavy atom, first and second nearest neighbors are used to determine the remaining two atom indices to construct a frame. For single-atom ligands such as ions, frames can only be constructed if multiple ions exist in the same chain (asym_id). Otherwise, those ions can't be associated with a frame and won't be trained on w.r.t. PAE.