Skip to content

Commit

Permalink
Merge pull request #49 from bjornwallner/NA
Browse files Browse the repository at this point in the history
Fix bugs in handling nucleic acids
  • Loading branch information
clami66 authored Aug 27, 2024
2 parents aef227f + 622824f commit 45878a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/DockQ/operations.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ def residue_distances(float [:,:] atom_coordinates1, float [:,:] atom_coordinate
this_d = (atom_coordinates1[x][0] - atom_coordinates2[y][0])**2 + (atom_coordinates1[x][1] - atom_coordinates2[y][1])**2 + (atom_coordinates1[x][2] - atom_coordinates2[y][2])**2
if this_d < min_d:
min_d = this_d
if min_d > 400.0:
if min_d > 1000.0:
break
if min_d > 400.0:
if min_d > 1000.0:
break
res_distances[i, j] = min_d
cum_j_atoms = cum_j_atoms + j_atoms
Expand Down
6 changes: 3 additions & 3 deletions src/DockQ/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def _build_structure(self, structure_id, chains, parse_hetatms):
resname1 = (
seq1(current_resname, custom_map=custom_map)
if len(current_resname) == 3
else current_resname[:-1]
else current_resname[-1]
if (len(current_resname) == 2)
else current_resname
)
Expand Down Expand Up @@ -432,7 +432,7 @@ def _parse_coordinates(self, coords_trailer, chains=[], parse_hetatms=False):
resname1 = (
seq1(current_resname, custom_map=custom_map)
if len(current_resname) == 3
else current_resname[:-1]
else current_resname[-1]
if (len(current_resname) == 2)
else current_resname
)
Expand All @@ -453,7 +453,7 @@ def _parse_coordinates(self, coords_trailer, chains=[], parse_hetatms=False):
resname1 = (
seq1(current_resname, custom_map=custom_map)
if len(current_resname) == 3
else current_resname[:-1]
else current_resname[-1]
if (len(current_resname) == 2)
else current_resname
)
Expand Down

0 comments on commit 45878a8

Please sign in to comment.