Spaces:
Running
Running
debug: check column positions in ATOM line
Browse files
bioai-platform/backend/app/routers/docking.py
CHANGED
|
@@ -158,6 +158,16 @@ async def vina_montest():
|
|
| 158 |
if r2.status_code != 200:
|
| 159 |
steps["error"] = f"SDF download failed: {r2.status_code}"; return steps
|
| 160 |
steps["step3_sdf_preview"] = r2.text[:500]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 161 |
pdbqt_content = _molblock_to_pdbqt(r2.text)
|
| 162 |
steps["step3_pdbqt_len"] = len(pdbqt_content) if pdbqt_content else 0
|
| 163 |
steps["step3_pdbqt_preview"] = (pdbqt_content or "EMPTY")[:500]
|
|
|
|
| 158 |
if r2.status_code != 200:
|
| 159 |
steps["error"] = f"SDF download failed: {r2.status_code}"; return steps
|
| 160 |
steps["step3_sdf_preview"] = r2.text[:500]
|
| 161 |
+
# debug: check first ATOM line
|
| 162 |
+
first_atom = [l for l in r2.text.splitlines() if l.startswith("ATOM")]
|
| 163 |
+
if first_atom:
|
| 164 |
+
l = first_atom[0]
|
| 165 |
+
steps["dbg_line"] = repr(l)
|
| 166 |
+
steps["dbg_len"] = len(l)
|
| 167 |
+
steps["dbg_30_38"] = repr(l[30:38]) if len(l) >= 38 else "too_short"
|
| 168 |
+
steps["dbg_38_46"] = repr(l[38:46]) if len(l) >= 46 else "too_short"
|
| 169 |
+
steps["dbg_46_54"] = repr(l[46:54]) if len(l) >= 54 else "too_short"
|
| 170 |
+
steps["dbg_76_78"] = repr(l[76:78]) if len(l) >= 78 else "too_short"
|
| 171 |
pdbqt_content = _molblock_to_pdbqt(r2.text)
|
| 172 |
steps["step3_pdbqt_len"] = len(pdbqt_content) if pdbqt_content else 0
|
| 173 |
steps["step3_pdbqt_preview"] = (pdbqt_content or "EMPTY")[:500]
|