lucidrains/alphafold3-pytorch

Atom at the origin cause incorrect res_atom_elements results

Open

#296 opened on Sep 26, 2024

View on GitHub
 (1 comment) (1 reaction) (0 assignees)Python (226 forks)github user discovery
good first issue

Repository metrics

Stars
 (1,668 stars)
PR merge metrics
 (PR metrics pending)

Description

Hello lucidrain, firstly thank you very much for the pytorch reproduction of alphafold3.

In file inputs.py function extract_canonical_molecules_from_biomolecule_chains

in some cif_file, certain key ion coordinates are set to the origin, which causes this line of code res_atom_positions = atom_positions[res_ligand_atom_mask] can not get the corresponding result correctly, its return res_atom_elements is null.

when use in later function create_mol_from_atom_positions_and_types, it raise an exception ValueError: The length of atom_elements and xyz_coordinates must be the same.

You can reproduce this problem using the 1qyl_assembly1.cif file as input, which has two vanadium ions that are each at the origin with 25% probability.

Contributor guide