Battery: SHELXL's K row may start negative
The top-group K was parsed with a pattern that stopped at a minus sign, so a weak first group (K -4.6) raised IndexError and lost the set's SHELXL numbers. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K5K8jvPPbmCrbqnWkddTuB
This commit is contained in:
@@ -181,7 +181,7 @@ def run_shelxl(shelxl, name, cwd):
|
||||
k_top = None
|
||||
i = lst.rfind("Analysis of variance for reflections employed in refinement")
|
||||
if i >= 0:
|
||||
m = re.search(r"\n\s+K\s+([\d. ]+)", lst[i:i + 3000])
|
||||
m = re.search(r"\n\s+K\s+([-\d. ]+)", lst[i:i + 3000])
|
||||
k_top = num(m.group(1).split()[-1]) if m else None
|
||||
n4 = last(r"R1 =\s*[\d.]+ for\s+(\d+) Fo > 4sig")
|
||||
return {"shx_r1": num(last(r"R1 =\s*([\d.]+) for\s+\d+ Fo > 4sig")),
|
||||
|
||||
Reference in New Issue
Block a user