@xhznezumi/molstar-reactive-bonds
v0.1.0
Published
Dynamic covalent bond extension package for Mol*
Downloads
65
Maintainers
Readme
@yuhaosimba/molstar-reactive-bonds
Dynamic covalent bond extension for Mol* (molstar 5.6/5.7).
Install
npm i molstar @yuhaosimba/molstar-reactive-bondsUsage
import { Viewer } from 'molstar/lib/apps/viewer/app';
import { registerReactiveBonds, addDynamicCovalentRepresentation } from '@yuhaosimba/molstar-reactive-bonds';
const viewer = await Viewer.create('app', { extensions: ['mvs'] });
registerReactiveBonds(viewer.plugin, { autoAttach: false });
// After structures are loaded
await addDynamicCovalentRepresentation(viewer.plugin, {
includeHydrogens: true,
includeInterUnit: true,
distanceScale: 1.0,
bondSizeFactor: 0.7,
});Example Project Files
- Basic viewer integration example:
examples/viewer-basic/ - Entry files:
examples/viewer-basic/index.htmlexamples/viewer-basic/main.ts
Exported API
ReactiveBondsBehaviorReactiveBondsProviderDynamicCovalentRepresentationProviderregisterReactiveBonds(plugin, options?)addDynamicCovalentRepresentation(plugin, options?)
