Skip to content

Commit

Permalink
Reconciled fix for 2m44 and 2mff
Browse files Browse the repository at this point in the history
  • Loading branch information
yokochi47 committed Feb 20, 2024
1 parent bb5c64b commit 9cb1530
Showing 1 changed file with 5 additions and 41 deletions.
46 changes: 5 additions & 41 deletions wwpdb/utils/nmr/mr/AmberMRParserListener.py
Original file line number Diff line number Diff line change
Expand Up @@ -2145,13 +2145,7 @@ def exitRestraint_statement(self, ctx: AmberMRParser.Restraint_statementContext)
'auth_atom_id': g[offset + 2],
'iat': iat
}
compId = translateToStdResName(factor['auth_comp_id'], ccU=self.__ccU)
chainIds = self.guessChainIdFromCompId(seqId, compId)
if len(chainIds) != 1 and (self.__reasons is None or 'chain_seq_id_remap' not in self.__reasons):
self.__f.append(f"[Invalid data] {self.__getCurrentRestraint()}"
f"Couldn't specify 'iat({col+1})={iat}' in the coordinates "
f"based on Sander comment {' '.join(g[offset:offset+3])!r}.")
elif not self.updateSanderAtomNumberDict(factor):
if not self.updateSanderAtomNumberDict(factor):
self.__f.append(f"[Invalid data] {self.__getCurrentRestraint()}"
f"Couldn't specify 'iat({col+1})={iat}' in the coordinates "
f"based on Sander comment {' '.join(g[offset:offset+3])!r}.")
Expand Down Expand Up @@ -2185,13 +2179,7 @@ def exitRestraint_statement(self, ctx: AmberMRParser.Restraint_statementContext)
'auth_atom_id': atomId,
'iat': iat
}
compId = translateToStdResName(factor['auth_comp_id'], ccU=self.__ccU)
chainIds = self.guessChainIdFromCompId(seqId, compId)
if len(chainIds) != 1 and (self.__reasons is None or 'chain_seq_id_remap' not in self.__reasons):
self.__f.append(f"[Invalid data] {self.__getCurrentRestraint()}"
f"Couldn't specify 'iat({col+1})={iat}' in the coordinates "
f"based on Sander comment {', '.join(g[offset:offset+2])!r}.")
elif not self.updateSanderAtomNumberDict(factor):
if not self.updateSanderAtomNumberDict(factor):
self.__f.append(f"[Invalid data] {self.__getCurrentRestraint()}"
f"Couldn't specify 'iat({col+1})={iat}' in the coordinates "
f"based on Sander comment {', '.join(g[offset:offset+2])!r}.")
Expand Down Expand Up @@ -2353,13 +2341,7 @@ def exitRestraint_statement(self, ctx: AmberMRParser.Restraint_statementContext)
'auth_atom_id': g[offset + 2],
'iat': iat
}
compId = translateToStdResName(factor['auth_comp_id'], ccU=self.__ccU)
chainIds = self.guessChainIdFromCompId(seqId, compId)
if len(chainIds) != 1 and (self.__reasons is None or 'chain_seq_id_remap' not in self.__reasons):
self.__f.append(f"[Invalid data] {self.__getCurrentRestraint()}"
f"Couldn't specify 'iat({col+1})={iat}' in the coordinates "
f"based on Sander comment {' '.join(g[offset:offset+3])!r}.")
elif not self.updateSanderAtomNumberDict(factor):
if not self.updateSanderAtomNumberDict(factor):
self.__f.append(f"[Invalid data] {self.__getCurrentRestraint()}"
f"Couldn't specify 'iat({col+1})={iat}' in the coordinates "
f"based on Sander comment {' '.join(g[offset:offset+3])!r}.")
Expand All @@ -2371,13 +2353,7 @@ def exitRestraint_statement(self, ctx: AmberMRParser.Restraint_statementContext)
'auth_atom_id': g2[offset2 + 2],
'iat': iat
}
compId = translateToStdResName(factor['auth_comp_id'], ccU=self.__ccU)
chainIds = self.guessChainIdFromCompId(seqId, compId)
if len(chainIds) != 1 and (self.__reasons is None or 'chain_seq_id_remap' not in self.__reasons):
self.__f.append(f"[Invalid data] {self.__getCurrentRestraint()}"
f"Couldn't specify 'iat({col+1})={iat}' in the coordinates "
f"based on Sander comment {' '.join(g2[offset2:offset2+3])!r}.")
elif not self.updateSanderAtomNumberDict(factor):
if not self.updateSanderAtomNumberDict(factor):
self.__f.append(f"[Invalid data] {self.__getCurrentRestraint()}"
f"Couldn't specify 'iat({col+1})={iat}' in the coordinates "
f"based on Sander comment {' '.join(g2[offset2:offset2+3])!r}.")
Expand All @@ -2389,13 +2365,7 @@ def exitRestraint_statement(self, ctx: AmberMRParser.Restraint_statementContext)
'auth_atom_id': g3[offset2 + 2],
'iat': iat
}
compId = translateToStdResName(factor['auth_comp_id'], ccU=self.__ccU)
chainIds = self.guessChainIdFromCompId(seqId, compId)
if len(chainIds) != 1 and (self.__reasons is None or 'chain_seq_id_remap' not in self.__reasons):
self.__f.append(f"[Invalid data] {self.__getCurrentRestraint()}"
f"Couldn't specify 'iat({col+1})={iat}' in the coordinates "
f"based on Sander comment {' '.join(g3[offset2:offset2+3])!r}.")
elif not self.updateSanderAtomNumberDict(factor):
if not self.updateSanderAtomNumberDict(factor):
self.__f.append(f"[Invalid data] {self.__getCurrentRestraint()}"
f"Couldn't specify 'iat({col+1})={iat}' in the coordinates "
f"based on Sander comment {' '.join(g3[offset2:offset2+3])!r}.")
Expand All @@ -2407,12 +2377,6 @@ def exitRestraint_statement(self, ctx: AmberMRParser.Restraint_statementContext)
'auth_atom_id': g4[offset2 + 2],
'iat': iat
}
compId = translateToStdResName(factor['auth_comp_id'], ccU=self.__ccU)
chainIds = self.guessChainIdFromCompId(seqId, compId)
if len(chainIds) != 1 and (self.__reasons is None or 'chain_seq_id_remap' not in self.__reasons):
self.__f.append(f"[Invalid data] {self.__getCurrentRestraint()}"
f"Couldn't specify 'iat({col+1})={iat}' in the coordinates "
f"based on Sander comment {' '.join(g4[offset2:offset2+3])!r}.")
if not self.updateSanderAtomNumberDict(factor):
self.__f.append(f"[Invalid data] {self.__getCurrentRestraint()}"
f"Couldn't specify 'iat({col+1})={iat}' in the coordinates "
Expand Down

0 comments on commit 9cb1530

Please sign in to comment.