Skip to content

Commit

Permalink
Fix format issue of single looped STAR file without datablock
Browse files Browse the repository at this point in the history
  • Loading branch information
yokochi47 committed Feb 28, 2025
1 parent 3392bbb commit 2553d0a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion wwpdb/utils/nmr/NmrDpUtility.py
Original file line number Diff line number Diff line change
Expand Up @@ -8111,7 +8111,6 @@ def __validateInputSource(self, srcPath: str = None) -> bool:
csPath = _csPath

if self.__op == 'nmr-cs-mr-merge' and not os.path.basename(csPath).startswith('bmr'):

_csPath = csPath + '.cif2str'

if not self.__c2S.convert(csPath, _csPath):
Expand Down Expand Up @@ -8657,6 +8656,11 @@ def __fixFormatIssueOfInputSource(self, file_list_id: int, file_name: str, file_
_srcPath = ofh.name
tmpPaths.append(_srcPath)

# fix single loop file without datablock (D_1300055931)
if self.__c2S.convert(_srcPath, _srcPath + '~'):
_srcPath = _srcPath + '~'
tmpPaths.append(_srcPath)

msg_template = "Only 'save_NAME' is valid in the body of a NMR-STAR file. Found 'loop_'."

if any(msg for msg in message['error'] if msg_template in msg):
Expand Down

0 comments on commit 2553d0a

Please sign in to comment.