File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -3160,9 +3160,7 @@ def pdb_input_to_molecule_input(
31603160
31613161 # handle `atom_indices_for_frame` for the PAE
31623162
3163- atom_indices_for_frame = tensor (
3164- [default (indices , (- 1 , - 1 , - 1 )) for indices in atom_indices_for_frame ]
3165- )
3163+ atom_indices_for_frame = tensor (atom_indices_for_frame )
31663164
31673165 # build offsets for all indices
31683166
@@ -3199,6 +3197,12 @@ def pdb_input_to_molecule_input(
31993197 # craft ligand frame offsets
32003198 atom_indices_for_ligand_frame = torch .zeros_like (atom_indices_for_frame )
32013199 for ligand_frame_index in torch .where (is_ligand_frame )[0 ]:
3200+ if (atom_indices_for_frame [ligand_frame_index ] == - 1 ).any ():
3201+ atom_indices_for_ligand_frame [ligand_frame_index ] = atom_indices_for_frame [
3202+ ligand_frame_index
3203+ ]
3204+ continue
3205+
32023206 global_atom_indices = torch .gather (
32033207 atom_indices_offsets , 0 , atom_indices_for_frame [ligand_frame_index ]
32043208 )
You can’t perform that action at this time.
0 commit comments