Skip to content

Commit

Permalink
Merge pull request #59 from mrjoness/pdbbuilder_fix
Browse files Browse the repository at this point in the history
Replace sum with all-zero atom check for [0, 0, 0] padding. 
A future release of SidechainNet will utilize `nan` based padding.
  • Loading branch information
jonathanking committed Apr 28, 2023
2 parents 9f1e9f4 + 73037d3 commit cfb36b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sidechainnet/structure/PdbBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def _get_lines_for_residue(self,
residue_lines = []
for atom_name, atom_coord in zip(atom_names, coords):
if (atom_name == "PAD" or np.isnan(atom_coord).sum() > 0 or
atom_coord.sum() == 0):
np.all(atom_coord == 0):
continue
residue_lines.append(self._get_line_for_atom(res_name, atom_name, atom_coord))
self.atom_nbr += 1
Expand Down

0 comments on commit cfb36b7

Please sign in to comment.