@xhznezumi/molstar-structure-editor
v0.1.0
Published
Realtime structure editing extension package for Mol*
Readme
molstar-structure-editor
Realtime structure editing plugin package for Mol*.
What it does
- Explicit edit mode
- Selection-based rigid-body move and rotate
- Pickable gizmo with translation axes and rotation rings
- Realtime coordinate updates on the actual Mol* structure representation
- Commit and cancel for the current edit session
Install
npm installVerify
npm test
npm run typecheck
npm run buildTest In A Web Page
Start the example dev server:
npm run dev:exampleThen open:
http://localhost:4173If the page appears to "twitch" or fully reload repeatedly, make sure you are not running a parallel watch process that writes into dist/. The example dev server is configured to ignore dist/, but a second watcher rebuilding the package can still create noisy reload behavior in some setups.
Example Workflow
- Wait for the example structure to load.
- Click atoms to create a Mol* selection.
- Use the floating
MoveorRotatebutton. - Click a gizmo axis or ring.
- Drag in the viewport to edit coordinates in realtime.
- Press
Enteror clickApplyto keep the edit. - Press
Escapeor clickCancelto revert the current session.
Current v1 Limits
- Single selected structure only
- Identity operator units only
- Rigid-body edits only
- No undo/redo stack yet
- No bond recomputation or chemistry editing yet
