Skip to content

Commit

Permalink
Properly handle freeR set - especially if multiple data sets... Only …
Browse files Browse the repository at this point in the history
…get one freeR set... Problem for a different day
  • Loading branch information
Ezra Peisach committed May 28, 2024
1 parent b0db037 commit 2e5a0b3
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions wwpdb/apps/ann_tasks_v2/expIoUtils/MtzTommCIF.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ def __convertMtzTommCIF(self, expFileName, retPath, logPath):
def __runCmd(self, options, html=False):
""" """
cmd = "cd " + self.__sessionPath + " ; " + self.__bashSetting(html) + options
if self.__verbose:
self.__lfh.write("MtzTommCIF command: %s\n" % cmd)
os.system(cmd)

def __readHtmlText(self):
Expand Down Expand Up @@ -240,10 +242,11 @@ def __parseSemiAutoForm(self):
["phwt", " 'PHWT=%s', "],
["delfwt", " 'DELFWT=%s', "],
["delphwt", " 'DELPHWT=%s', "],
["freer", " -freer %s , "],
["freer", " -freer %s "],
]
#
items = ""
lastitem = None
for i in range(self.__intDataSet):
if (i > 0) and items:
items += " : "
Expand All @@ -253,9 +256,16 @@ def __parseSemiAutoForm(self):
if not value:
continue
#
items += tokenName[1] % value
# This limits us to a single rfree across multiple sets.
if tokenName[0] == "freer":
lastitem = tokenName[1] % value
else:
items += tokenName[1] % value
#
#
if lastitem:
items += lastitem

return items

def __getPdbId(self):
Expand Down

0 comments on commit 2e5a0b3

Please sign in to comment.