Skip to content

Commit

Permalink
Auto-split CYZ:ZN as ZN:ZN (2m7b)
Browse files Browse the repository at this point in the history
  • Loading branch information
yokochi47 committed Mar 4, 2024
1 parent 91b81e4 commit 735721d
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 15 deletions.
6 changes: 3 additions & 3 deletions wwpdb/utils/nmr/mr/AriaMRParserListener.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ def assignCoordPolymerSequence(self, seqId, compId, atomId):

preferNonPoly = False

if compId == 'CYSZ' and atomId == 'ZN' and self.__hasNonPoly:
if compId in ('CYSZ','CYZ') and atomId == 'ZN' and self.__hasNonPoly:
znCount = 0
znSeqId = None
for np in self.__nonPoly:
Expand Down Expand Up @@ -1184,7 +1184,7 @@ def assignCoordPolymerSequenceWithChainId(self, refChainId, seqId, compId, atomI

preferNonPoly = False

if compId == 'CYSZ' and atomId == 'ZN' and self.__hasNonPoly:
if compId in ('CYSZ','CYZ') and atomId == 'ZN' and self.__hasNonPoly:
znCount = 0
znSeqId = None
for np in self.__nonPoly:
Expand Down Expand Up @@ -1554,7 +1554,7 @@ def selectCoordAtoms(self, chainAssign, seqId, compId, atomId, allowAmbig=True,
_compId = compId
_atomId = atomId

if compId == 'CYSZ' and atomId == 'ZN' and self.__hasNonPoly:
if compId in ('CYSZ','CYZ') and atomId == 'ZN' and self.__hasNonPoly:
znCount = 0
znSeqId = None
for np in self.__nonPoly:
Expand Down
4 changes: 2 additions & 2 deletions wwpdb/utils/nmr/mr/BiosymMRParserListener.py
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ def assignCoordPolymerSequence(self, refChainId, seqId, compId, atomId):

preferNonPoly = False

if compId == 'CYSZ' and atomId == 'ZN' and self.__hasNonPoly:
if compId in ('CYSZ','CYZ') and atomId == 'ZN' and self.__hasNonPoly:
znCount = 0
znSeqId = None
for np in self.__nonPoly:
Expand Down Expand Up @@ -1378,7 +1378,7 @@ def selectCoordAtoms(self, chainAssign, seqId, compId, atomId, allowAmbig=True,
_compId = compId
_atomId = atomId

if compId == 'CYSZ' and atomId == 'ZN' and self.__hasNonPoly:
if compId in ('CYSZ','CYZ') and atomId == 'ZN' and self.__hasNonPoly:
znCount = 0
znSeqId = None
for np in self.__nonPoly:
Expand Down
6 changes: 3 additions & 3 deletions wwpdb/utils/nmr/mr/CyanaMRParserListener.py
Original file line number Diff line number Diff line change
Expand Up @@ -2082,7 +2082,7 @@ def assignCoordPolymerSequence(self, seqId, compId, atomId):

preferNonPoly = False

if compId == 'CYSZ' and atomId == 'ZN' and self.__hasNonPoly:
if compId in ('CYSZ','CYZ') and atomId == 'ZN' and self.__hasNonPoly:
znCount = 0
znSeqId = None
for np in self.__nonPoly:
Expand Down Expand Up @@ -2402,7 +2402,7 @@ def assignCoordPolymerSequenceWithChainId(self, refChainId, seqId, compId, atomI

preferNonPoly = False

if compId == 'CYSZ' and atomId == 'ZN' and self.__hasNonPoly:
if compId in ('CYSZ','CYZ') and atomId == 'ZN' and self.__hasNonPoly:
znCount = 0
znSeqId = None
for np in self.__nonPoly:
Expand Down Expand Up @@ -3198,7 +3198,7 @@ def selectCoordAtoms(self, chainAssign, seqId, compId, atomId, allowAmbig=True,

if compId is not None:

if compId == 'CYSZ' and atomId == 'ZN' and self.__hasNonPoly:
if compId in ('CYSZ', 'CYZ') and atomId == 'ZN' and self.__hasNonPoly:
znCount = 0
znSeqId = None
for np in self.__nonPoly:
Expand Down
4 changes: 2 additions & 2 deletions wwpdb/utils/nmr/mr/DynamoMRParserListener.py
Original file line number Diff line number Diff line change
Expand Up @@ -1333,7 +1333,7 @@ def assignCoordPolymerSequence(self, refChainId, seqId, compId, atomId, index=No

preferNonPoly = False

if compId == 'CYSZ' and atomId == 'ZN' and self.__hasNonPoly:
if compId in ('CYSZ','CYZ') and atomId == 'ZN' and self.__hasNonPoly:
znCount = 0
znSeqId = None
for np in self.__nonPoly:
Expand Down Expand Up @@ -1696,7 +1696,7 @@ def selectCoordAtoms(self, chainAssign, seqId, compId, atomId, allowAmbig=True,
_compId = compId
_atomId = atomId

if compId == 'CYSZ' and atomId == 'ZN' and self.__hasNonPoly:
if compId in ('CYSZ','CYZ') and atomId == 'ZN' and self.__hasNonPoly:
znCount = 0
znSeqId = None
for np in self.__nonPoly:
Expand Down
4 changes: 2 additions & 2 deletions wwpdb/utils/nmr/mr/IsdMRParserListener.py
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ def assignCoordPolymerSequence(self, seqId, compId, atomId):

preferNonPoly = False

if compId == 'CYSZ' and atomId == 'ZN' and self.__hasNonPoly:
if compId in ('CYSZ','CYZ') and atomId == 'ZN' and self.__hasNonPoly:
znCount = 0
znSeqId = None
for np in self.__nonPoly:
Expand Down Expand Up @@ -1142,7 +1142,7 @@ def selectCoordAtoms(self, chainAssign, seqId, compId, atomId, allowAmbig=True,
_compId = compId
_atomId = atomId

if compId == 'CYSZ' and atomId == 'ZN' and self.__hasNonPoly:
if compId in ('CYSZ','CYZ') and atomId == 'ZN' and self.__hasNonPoly:
znCount = 0
znSeqId = None
for np in self.__nonPoly:
Expand Down
4 changes: 2 additions & 2 deletions wwpdb/utils/nmr/mr/SybylMRParserListener.py
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ def assignCoordPolymerSequence(self, seqId, compId, atomId):

preferNonPoly = False

if compId == 'CYSZ' and atomId == 'ZN' and self.__hasNonPoly:
if compId in ('CYSZ','CYZ') and atomId == 'ZN' and self.__hasNonPoly:
znCount = 0
znSeqId = None
for np in self.__nonPoly:
Expand Down Expand Up @@ -1148,7 +1148,7 @@ def selectCoordAtoms(self, chainAssign, seqId, compId, atomId, allowAmbig=True,
_compId = compId
_atomId = atomId

if compId == 'CYSZ' and atomId == 'ZN' and self.__hasNonPoly:
if compId in ('CYSZ','CYZ') and atomId == 'ZN' and self.__hasNonPoly:
znCount = 0
znSeqId = None
for np in self.__nonPoly:
Expand Down
7 changes: 6 additions & 1 deletion wwpdb/utils/nmr/mr/XplorMRReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,12 @@ def parse(self, mrFilePath, cifFilePath=None, isFilePath=True,
if __name__ == "__main__":
reader = XplorMRReader(True)
reader.setDebugMode(True)
reader_listener, _, _ = reader.parse('../../tests-nmr/mock-data-remediation/2muk/2muk-trimmed.mr',
reader.parse('../../tests-nmr/mock-data-remediation/2mjf/2mjf-corrected.mr',
'../../tests-nmr/mock-data-remediation/2mjf/2mjf.cif')

reader = XplorMRReader(True)
reader.setDebugMode(True)
reader.parse('../../tests-nmr/mock-data-remediation/2muk/2muk-trimmed.mr',
'../../tests-nmr/mock-data-remediation/2muk/2muk.cif')

reader = XplorMRReader(True)
Expand Down

0 comments on commit 735721d

Please sign in to comment.