Skip to content

Commit

Permalink
DAOTHER-8905: Prevent concatenation of atom names in peak list
Browse files Browse the repository at this point in the history
  • Loading branch information
yokochi47 committed Feb 4, 2025
1 parent 1d15533 commit ff5d6fc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions wwpdb/utils/nmr/pk/BasePKParserListener.py
Original file line number Diff line number Diff line change
Expand Up @@ -1738,11 +1738,9 @@ def checkAssignments2D(self, index: int, assignments: List[List[dict]]
self.atomSelectionSets.append(copy.copy(self.atomSelectionSet))
self.asIsSets.append([asis1, asis2])
else:
print('fail')
break
else:
has_assignments = False
print('fail2')
break

except (KeyError, TypeError):
Expand Down Expand Up @@ -2292,6 +2290,8 @@ def extractPeakAssignment(self, numOfDim: int, string: str, src_index: int, hint
continue
if atomId[0] in ('Q', 'M') and index + 1 < len(_term) and _term[index + 1].isdigit():
continue
if len(_term) == atomNameSpan[idx][0]:
continue
if resNameLike[idx]:
compId = term[resNameSpan[idx][0]:resNameSpan[idx][1]]
if len(compId) == 1 and hasOneLetterCodeSet:
Expand Down Expand Up @@ -2337,6 +2337,8 @@ def extractPeakAssignment(self, numOfDim: int, string: str, src_index: int, hint
continue
if atomId[0] in ('Q', 'M') and index + 1 < len(__term) and __term[index + 1].isdigit():
continue
if len(__term) == _atomNameSpan[idx][0]:
continue
if resNameLike[idx]:
compId = term[resNameSpan[idx][0]:resNameSpan[idx][1]]
if len(compId) == 1 and hasOneLetterCodeSet:
Expand Down Expand Up @@ -2382,6 +2384,8 @@ def extractPeakAssignment(self, numOfDim: int, string: str, src_index: int, hint
continue
if atomId[0] in ('Q', 'M') and index + 1 < len(___term) and ___term[index + 1].isdigit():
continue
if len(___term) == __atomNameSpan[idx][0]:
continue
if resNameLike[idx]:
compId = term[resNameSpan[idx][0]:resNameSpan[idx][1]]
if len(compId) == 1 and hasOneLetterCodeSet:
Expand Down

0 comments on commit ff5d6fc

Please sign in to comment.