The `3Dmol.js` integration supports several visual styles (cartoon, stick, sphere, surface) successfully, but lacks proper cleanup, causing bugs on consecutive predictions. **Tasks/Acceptance Criteria:** - [ ] Add explicit React cleanup logic (e.g., inside `useEffect` returns) to correctly re-initialize the `3Dmol.js` viewer on repeated sequence tests. - [ ] Add explicit `if/else` error catching when `pdbData` is missing or un-parseable to prevent the renderer from crashing. - [ ] Show user feedback directly on the renderer element (e.g., "Empty PDB data" or "Rendering failed") if it cannot successfully paint the model.
The
3Dmol.jsintegration supports several visual styles (cartoon, stick, sphere, surface) successfully, but lacks proper cleanup, causing bugs on consecutive predictions.Tasks/Acceptance Criteria:
useEffectreturns) to correctly re-initialize the3Dmol.jsviewer on repeated sequence tests.if/elseerror catching whenpdbDatais missing or un-parseable to prevent the renderer from crashing.