[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M73H9AB5PJ8817SPW63ACQ5N":3,"skill-same:01M73H9AB5PJ8817SPW63ACQ5N":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M73H9AB5PJ8817SPW63ACQ5N","molecular-visualization-3dmol",null,"3Dmol.js WebGL molecular visualization emitted as self-contained HTML. Render structures (PDB\u002FSDF\u002FXYZ\u002FMOL2\u002Fcube) with stick, sphere, cartoon, line, and surface styles; animate trajectories with a frame-delay (interval, ms) control; and animate vibrational normal modes via vibrate() from per-atom dx\u002Fdy\u002Fdz displacements or from precomputed frames. Output standalone HTML that loads 3Dmol from a CDN, with optional play\u002Fpause and speed controls. Use for transition-state imaginary-mode animations, MD or reaction-path playback, docking poses, and orbital\u002Fdensity isosurfaces. For static 2D chemical structure drawings use rdkit-chemdraw-cdxml; for 2D statistical plots use matplotlib or plotly.","bg-szy\u002FTOP-SKILLS","bg-szy","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F106576190?v=4","01M73A4E8KPV67SFXRY8XZGNBX","ShuZhiyong","01M73A4E96MQ294MHM74TZBVQD",6,"BSD-3-Clause","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fawesome-skills\u002Fmolecular-visualization-3dmol\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: \"molecular-visualization-3dmol\"\ndescription: \"3Dmol.js WebGL molecular visualization emitted as self-contained HTML. Render structures (PDB\u002FSDF\u002FXYZ\u002FMOL2\u002Fcube) with stick, sphere, cartoon, line, and surface styles; animate trajectories with a frame-delay (interval, ms) control; and animate vibrational normal modes via vibrate() from per-atom dx\u002Fdy\u002Fdz displacements or from precomputed frames. Output standalone HTML that loads 3Dmol from a CDN, with optional play\u002Fpause and speed controls. Use for transition-state imaginary-mode animations, MD or reaction-path playback, docking poses, and orbital\u002Fdensity isosurfaces. For static 2D chemical structure drawings use rdkit-chemdraw-cdxml; for 2D statistical plots use matplotlib or plotly.\"\nlicense: \"BSD-3-Clause\"\n---\n\n# 3Dmol.js molecular visualization\n\n## Overview\n\n3Dmol.js is a WebGL molecular viewer that runs entirely in the browser. This skill emits\n**self-contained HTML** files that load 3Dmol from a CDN and render a structure, a trajectory,\nor a vibrational mode — no server, no build step, no Python runtime to view. The bundled\n`scripts\u002Fmol_viewer.py` generates that HTML from any `.xyz\u002F.trj\u002F.pdb\u002F.sdf\u002F.mol2\u002F.cube` file;\nthe Core API below shows the underlying 3Dmol.js calls so you can hand-write or customize a\nviewer.\n\n## When to Use\n\n- Animate a transition-state imaginary vibrational mode (from a mode trajectory or dx\u002Fdy\u002Fdz vectors)\n- Play back a reaction path (IRC\u002FNEB) or an MD trajectory with a speed control\n- Show a protein–ligand docking pose with cartoon + ligand sticks + a binding-site surface\n- Display an orbital or electron-density isosurface from a Gaussian `.cube` file\n- Hand a colleague one HTML file that opens in any browser, no install\n- Use **py3Dmol** instead for inline viewers inside a Jupyter notebook (same engine, Python API)\n- Use **PyMOL\u002FChimeraX** instead for publication ray-traced stills or heavy structural editing\n- Use **rdkit-chemdraw-cdxml** for 2D chemical structures, **plotly\u002Fmatplotlib** for 2D plots\n\n## Prerequisites\n\n- **Viewing**: any modern browser with network access (the HTML pulls 3Dmol.js from a CDN)\n- **Generator script**: `scripts\u002Fmol_viewer.py` — Python 3 standard library only, no install\n- **Optional**: `pip install py3Dmol` for notebook use (wraps the same library)\n\nNo package is needed to produce or open the HTML. The generator lives in this skill's `scripts\u002F`\nfolder (next to this SKILL.md). It can't be run in place from the skill directory, so use your\nfile tools to read `scripts\u002Fmol_viewer.py` and save it into your working directory before running.\n\n## Quick Start\n\n```bash\n# animate a mode\u002Ftrajectory file with play\u002Fpause + speed slider, in one call\npython3 mol_viewer.py ts_imaginary_mode_000.trj --mode trajectory \\\n    --title \"TS mode\" --subtitle \"-621.8 cm-1\" --out ts_mode.html\n# static structure:  python3 mol_viewer.py mol.xyz --out mol.html\n```\n\n## Core API\n\nAll snippets assume `\u003Cscript src=\"https:\u002F\u002F3Dmol.org\u002Fbuild\u002F3Dmol-min.js\">\u003C\u002Fscript>` is loaded\nand a `\u003Cdiv id=\"v\">\u003C\u002Fdiv>` exists.\n\n### Create a viewer and load a structure\n\n`createViewer` binds to a div; `addModel(data, format)` loads coordinates. Always `zoomTo()`\nthen `render()`. Supported `format`: `xyz`, `pdb`, `sdf`, `mol2`, `cube`, `cif`.\n\n```javascript\nconst viewer = $3Dmol.createViewer(\"v\", {backgroundColor: \"white\"});\nviewer.addModel(xyzString, \"xyz\");         \u002F\u002F coordinates as a string, not a URL\nviewer.setStyle({}, {stick: {radius: 0.15}, sphere: {scale: 0.28}});\nviewer.zoomTo();\nviewer.render();\n```\n\n### Styles and coloring\n\n`setStyle(selection, styleSpec)` — empty selection `{}` targets all atoms. Styles: `stick`,\n`sphere`, `line`, `cross`, `cartoon`. Color by element (default), a scheme, or a fixed color.\n\n```javascript\nviewer.setStyle({}, {stick: {}, sphere: {scale: 0.25}});          \u002F\u002F ball-and-stick\nviewer.setStyle({elem: \"C\"}, {stick: {color: \"gray\"}});           \u002F\u002F per-element override\nviewer.setStyle({chain: \"A\"}, {cartoon: {color: \"spectrum\"}});    \u002F\u002F protein ribbon\nviewer.render();\n```\n\n### Animate a trajectory\n\nLoad every frame with `addModelsAsFrames`, then `animate`. **`interval` is the delay between\nframes in milliseconds (larger = slower)** — do not use `step`, which skips frames and looks\njumpy. `loop: \"backAndForth\"` makes a one-way path oscillate; `reps: 0` loops forever.\n\n```javascript\nviewer.addModelsAsFrames(trjString, \"xyz\");   \u002F\u002F multi-frame .trj or multi-model .xyz\u002F.pdb\nviewer.setStyle({}, {stick: {radius: 0.14}, sphere: {scale: 0.28}});\nviewer.zoomTo();\nviewer.render();\nviewer.animate({loop: \"backAndForth\", interval: 120, reps: 0});\n```\n\n### Animate a vibrational normal mode\n\nIf a model's atoms carry displacement vectors (`dx, dy, dz` — extra columns on each XYZ line:\n`elem x y z dx dy dz`), `model.vibrate(numFrames, amplitude, bothWays, arrowSpec)` builds the\noscillation frames. `bothWays: true` swings symmetrically about equilibrium; `arrowSpec` draws\nmotion arrows.\n\n```javascript\nconst m = viewer.addModel(modeXyz, \"xyz\");        \u002F\u002F each atom line: elem x y z dx dy dz\nm.vibrate(10, 1.0, true, {radius: 0.08, color: \"black\"});   \u002F\u002F 10 frames, full amplitude, arrows\nviewer.setStyle({}, {stick: {radius: 0.14}, sphere: {scale: 0.28}});\nviewer.zoomTo();\nviewer.render();\nviewer.animate({loop: \"backAndForth\", interval: 120, reps: 0});\n```\n\nIf you only have a precomputed frame trajectory (e.g. pysisyphus `ts_imaginary_mode_000.trj`),\nuse the trajectory path above instead — no `dx\u002Fdy\u002Fdz` needed.\n\n### Surfaces and volumetric isosurfaces\n\n`addSurface(type, style, atomsel)` builds a molecular surface (`VDW`, `SAS`, `SES`, `MS`).\nFor an orbital\u002Fdensity isosurface, load the `.cube` and call `addVolumetricData`.\n\n```javascript\nviewer.addSurface($3Dmol.SurfaceType.VDW, {opacity: 0.75, color: \"lightblue\"}, {chain: \"A\"});\n\u002F\u002F isosurface from a Gaussian cube (positive and negative lobes):\nviewer.addVolumetricData(cubeString, \"cube\", {isoval:  0.02, color: \"blue\", opacity: 0.85});\nviewer.addVolumetricData(cubeString, \"cube\", {isoval: -0.02, color: \"red\",  opacity: 0.85});\nviewer.render();\n```\n\n### Labels and interactive speed control\n\n`addLabel(text, spec)` annotates. For animations, a slider bound to `interval` (restarting via\n`stopAnimate()` + `animate()`) lets the viewer set the speed — the fix for \"sometimes too fast\".\n\n```javascript\nviewer.addLabel(\"TS\", {position: {x: 0, y: 0, z: 0}, backgroundColor: \"black\", fontSize: 14});\nlet interval = 140;\nconst play = () => viewer.animate({loop: \"backAndForth\", interval});\ndocument.getElementById(\"spd\").oninput = e => { interval = +e.target.value; viewer.stopAnimate(); play(); };\nplay();\n```\n\n## Key Concepts\n\n**`interval` vs `step`.** `interval` (ms) sets playback speed; every frame is shown. `step`\nplays every Nth frame — it skips motion and is the usual cause of a \"too fast\"\u002Fjumpy animation.\nControl speed with `interval`, never `step`.\n\n**Coordinates are strings, not URLs.** `addModel`\u002F`addModelsAsFrames` take the file *contents*.\nEmbed them in the HTML as a JSON-encoded string so quotes and newlines survive\n(`scripts\u002Fmol_viewer.py` uses `json.dumps`; a raw backtick template breaks on backticks in data).\n\n**CDN and CSP.** The page fetches 3Dmol.js from a CDN, so it needs network access when opened,\nand a strict Content-Security-Policy (e.g. inside some artifact sandboxes) will blank it. Open\nit as a normal local\u002Fhosted file.\n\n## Common Workflows\n\n### TS imaginary-mode animation (quantum-chemistry)\n\nEnd-to-end HTML from a precomputed mode trajectory, with play\u002Fpause and a speed slider — the\ndeliverable the `neb-irc-activation-energy` skill hands off.\n\n```bash\npython3 mol_viewer.py ts_imaginary_mode_000.trj --mode trajectory \\\n    --title \"Transition-state mode\" --subtitle \"-621.8 cm-1\" --out ts_mode.html\n# open ts_mode.html; drag the slider if the oscillation is too fast\n```\n\n### Reaction-path \u002F MD playback\n\n```bash\npython3 mol_viewer.py trajectory.pdb --mode trajectory --style ballstick --out md.html\n# any multi-model .xyz\u002F.pdb works; backAndForth loop + interval control are built in\n```\n\n### Docking pose: protein ribbon + ligand sticks + pocket surface\n\n```javascript\nconst viewer = $3Dmol.createViewer(\"v\", {backgroundColor: \"white\"});\nviewer.addModel(complexPdb, \"pdb\");\nviewer.setStyle({}, {cartoon: {color: \"spectrum\"}});                 \u002F\u002F protein\nviewer.setStyle({resn: \"LIG\"}, {stick: {radius: 0.2}});             \u002F\u002F ligand\nviewer.addSurface($3Dmol.SurfaceType.VDW, {opacity: 0.6}, {resn: \"LIG\", byres: true, expand: 5});\nviewer.zoomTo({resn: \"LIG\"});\nviewer.render();\n```\n\n## Key Parameters\n\n| Parameter | Method | Default | Range \u002F Options | Effect |\n|-----------|--------|---------|-----------------|--------|\n| `interval` | `animate` | 50 | `40`–`400` ms | Frame delay; larger = slower playback |\n| `loop` | `animate` | `forward` | `forward`\u002F`backward`\u002F`backAndForth` | `backAndForth` oscillates a one-way path |\n| `reps` | `animate` | `0` | `0`=∞, `n` | Number of loops |\n| `radius` | `stick` | `0.3` | `0.1`–`0.3` | Bond cylinder thickness |\n| `scale` | `sphere` | `1.0` (vdW) | `0.2`–`0.4` for ball-and-stick | Atom sphere size |\n| `amplitude` | `vibrate` | `1.0` | `0.5`–`2.0` | Normal-mode distortion size |\n| `numFrames` | `vibrate` | `10` | `8`–`20` | Frames per half-cycle |\n| `isoval` | `addVolumetricData` | — | e.g. `±0.02` | Isosurface contour value (sign = lobe) |\n| `opacity` | `addSurface` | `1.0` | `0`–`1` | Surface transparency |\n\n## Best Practices\n\n- Control animation speed with `interval` (ms), never `step`.\n- Embed coordinates as a JSON-encoded string (`json.dumps`), not a raw backtick template.\n- Call `zoomTo()` before `render()`, and again after adding a large model.\n- Keep default element colors unless the analysis needs a specific scheme — don't bake a palette.\n- For large trajectories (>500 frames or >5k atoms), subsample frames; WebGL redraw is the limit.\n- Ship one CDN `\u003Cscript>` tag; only vendor the ~1 MB `3Dmol-min.js` inline if offline use is required.\n\n## Common Recipes\n\n### Recipe: generate a viewer in one call\n\n```bash\npython3 mol_viewer.py mode.xyz --mode vibrate --amplitude 1.2 --title \"mode\" --out mode.html\npython3 mol_viewer.py mol.sdf  --style stick --out mol.html          # static\n```\n\n### Recipe: inline viewer in a Jupyter notebook (py3Dmol)\n\n```python\nimport py3Dmol\nview = py3Dmol.view(width=500, height=400)\nview.addModel(open(\"mol.xyz\").read(), \"xyz\")\nview.setStyle({}, {\"stick\": {}, \"sphere\": {\"scale\": 0.25}})\nview.zoomTo(); view.show()\n```\n\n### Recipe: side-by-side viewers\n\n```javascript\nconst viewer = $3Dmol.createViewerGrid(\"v\", {rows: 1, cols: 2});\nviewer[0][0].addModel(reactantXyz, \"xyz\"); viewer[0][0].setStyle({}, {stick: {}});\nviewer[0][1].addModel(productXyz, \"xyz\");  viewer[0][1].setStyle({}, {stick: {}});\nviewer[0][0].zoomTo(); viewer[0][1].zoomTo(); viewer[0][0].render(); viewer[0][1].render();\n```\n\n## Troubleshooting\n\n| Problem | Cause | Solution |\n|---------|-------|----------|\n| Blank white page | 3Dmol.js not loaded (offline \u002F strict CSP) | Open with network access; check the CDN `\u003Cscript>` resolves |\n| Animation too fast \u002F jumpy | Using `step`, or a tiny `interval` | Use `interval` (ms); raise it; never set `step` |\n| Vibration shows no motion | Model lacks `dx\u002Fdy\u002Fdz` vectors | Add mode vectors as extra XYZ columns, or use a precomputed frame `.trj` |\n| Nothing rendered | Wrong `format` string or bad data | Match `format` to the file; coordinates must be the file contents, not a path |\n| JS syntax error in page | Backtick\u002Fquote in embedded data | Embed via `json.dumps` (the generator does this) |\n| Structure loads but no bonds | XYZ without connectivity + line style | Use `stick`\u002F`sphere`; 3Dmol infers bonds by distance |\n| Surface slow or hangs | Large `SES`\u002F`MS` on a big system | Use `VDW`, restrict the `atomsel`, or lower resolution |\n\n## Bundled Resources\n\n- `scripts\u002Fmol_viewer.py` — emit a standalone 3Dmol HTML (static \u002F trajectory \u002F vibrate) from a structure file, with built-in play\u002Fpause + speed slider for animations\n\n## Related Skills\n\n- **neb-irc-activation-energy** — produces TS imaginary-mode trajectories and IRC paths that this skill animates\n- **rdkit-chemdraw-cdxml** — 2D chemical structure and reaction-scheme drawing\n- **plotly-interactive-plots** — interactive 2D scientific plots and dashboards\n\n## References\n\n- [3Dmol.js documentation](https:\u002F\u002F3dmol.org\u002Fdoc\u002Findex.html) — GLViewer \u002F GLModel API\n- Rego & Koes, *Bioinformatics* 2015, 31(8):1322–1324 — 3Dmol.js: molecular visualization with WebGL\n- [GLViewer.animate](https:\u002F\u002F3dmol.org\u002Fdoc\u002FGLViewer.html) — `interval`, `loop`, `reps`\n- [GLModel.vibrate](https:\u002F\u002F3dmol.org\u002Fdoc\u002FGLModel.html) — normal-mode animation from `dx\u002Fdy\u002Fdz`\n- [py3Dmol on PyPI](https:\u002F\u002Fpypi.org\u002Fproject\u002Fpy3Dmol\u002F) — Python\u002FJupyter wrapper\n","# 3Dmol.js molecular visualization\n\n## Overview\n\n3Dmol.js is a WebGL molecular viewer that runs entirely in the browser. This skill emits\n**self-contained HTML** files that load 3Dmol from a CDN and render a structure, a trajectory,\nor a vibrational mode — no server, no build step, no Python runtime to view. The bundled\n`scripts\u002Fmol_viewer.py` generates that HTML from any `.xyz\u002F.trj\u002F.pdb\u002F.sdf\u002F.mol2\u002F.cube` file;\nthe Core API below shows the underlying 3Dmol.js calls so you can hand-write or customize a\nviewer.\n\n## When to Use\n\n- Animate a transition-state imaginary vibrational mode (from a mode trajectory or dx\u002Fdy\u002Fdz vectors)\n- Play back a reaction path (IRC\u002FNEB) or an MD trajectory with a speed control\n- Show a protein–ligand docking pose with cartoon + ligand sticks + a binding-site surface\n- Display an orbital or electron-density isosurface from a Gaussian `.cube` file\n- Hand a colleague one HTML file that opens in any browser, no install\n- Use **py3Dmol** instead for inline viewers inside a Jupyter notebook (same engine, Python API)\n- Use **PyMOL\u002FChimeraX** instead for publication ray-traced stills or heavy structural editing\n- Use **rdkit-chemdraw-cdxml** for 2D chemical structures, **plotly\u002Fmatplotlib** for 2D plots\n\n## Prerequisites\n\n- **Viewing**: any modern browser with network access (the HTML pulls 3Dmol.js from a CDN)\n- **Generator script**: `scripts\u002Fmol_viewer.py` — Python 3 standard library only, no install\n- **Optional**: `pip install py3Dmol` for notebook use (wraps the same library)\n\nNo package is needed to produce or open the HTML. The generator lives in this skill's `scripts\u002F`\nfolder (next to this SKILL.md). It can't be run in place from the skill directory, so use your\nfile tools to read `scripts\u002Fmol_viewer.py` and save it into your working directory before running.\n\n## Quick Start\n\n```bash\n# animate a mode\u002Ftrajectory file with play\u002Fpause + speed slider, in one call\npython3 mol_viewer.py ts_imaginary_mode_000.trj --mode trajectory \\\n    --title \"TS mode\" --subtitle \"-621.8 cm-1\" --out ts_mode.html\n# static structure:  python3 mol_viewer.py mol.xyz --out mol.html\n```\n\n## Core API\n\nAll snippets assume `\u003Cscript src=\"https:\u002F\u002F3Dmol.org\u002Fbuild\u002F3Dmol-min.js\">\u003C\u002Fscript>` is loaded\nand a `\u003Cdiv id=\"v\">\u003C\u002Fdiv>` exists.\n\n### Create a viewer and load a structure\n\n`createViewer` binds to a div; `addModel(data, format)` loads coordinates. Always `zoomTo()`\nthen `render()`. Supported `format`: `xyz`, `pdb`, `sdf`, `mol2`, `cube`, `cif`.\n\n```javascript\nconst viewer = $3Dmol.createViewer(\"v\", {backgroundColor: \"white\"});\nviewer.addModel(xyzString, \"xyz\");         \u002F\u002F coordinates as a string, not a URL\nviewer.setStyle({}, {stick: {radius: 0.15}, sphere: {scale: 0.28}});\nviewer.zoomTo();\nviewer.render();\n```\n\n### Styles and coloring\n\n`setStyle(selection, styleSpec)` — empty selection `{}` targets all atoms. Styles: `stick`,\n`sphere`, `line`, `cross`, `cartoon`. Color by element (default), a scheme, or a fixed color.\n\n```javascript\nviewer.setStyle({}, {stick: {}, sphere: {scale: 0.25}});          \u002F\u002F ball-and-stick\nviewer.setStyle({elem: \"C\"}, {stick: {color: \"gray\"}});           \u002F\u002F per-element override\nviewer.setStyle({chain: \"A\"}, {cartoon: {color: \"spectrum\"}});    \u002F\u002F protein ribbon\nviewer.render();\n```\n\n### Animate a trajectory\n\nLoad every frame with `addModelsAsFrames`, then `animate`. **`interval` is the delay between\nframes in milliseconds (larger = slower)** — do not use `step`, which skips frames and looks\njumpy. `loop: \"backAndForth\"` makes a one-way path oscillate; `reps: 0` loops forever.\n\n```javascript\nviewer.addModelsAsFrames(trjString, \"xyz\");   \u002F\u002F multi-frame .trj or multi-model .xyz\u002F.pdb\nviewer.setStyle({}, {stick: {radius: 0.14}, sphere: {scale: 0.28}});\nviewer.zoomTo();\nviewer.render();\nviewer.animate({loop: \"backAndForth\", interval: 120, reps: 0});\n```\n\n### Animate a vibrational normal mode\n\nIf a model's atoms carry displacement vectors (`dx, dy, dz` — extra columns on each XYZ line:\n`elem x y z dx dy dz`), `model.vibrate(numFrames, amplitude, bothWays, arrowSpec)` builds the\noscillation frames. `bothWays: true` swings symmetrically about equilibrium; `arrowSpec` draws\nmotion arrows.\n\n```javascript\nconst m = viewer.addModel(modeXyz, \"xyz\");        \u002F\u002F each atom line: elem x y z dx dy dz\nm.vibrate(10, 1.0, true, {radius: 0.08, color: \"black\"});   \u002F\u002F 10 frames, full amplitude, arrows\nviewer.setStyle({}, {stick: {radius: 0.14}, sphere: {scale: 0.28}});\nviewer.zoomTo();\nviewer.render();\nviewer.animate({loop: \"backAndForth\", interval: 120, reps: 0});\n```\n\nIf you only have a precomputed frame trajectory (e.g. pysisyphus `ts_imaginary_mode_000.trj`),\nuse the trajectory path above instead — no `dx\u002Fdy\u002Fdz` needed.\n\n### Surfaces and volumetric isosurfaces\n\n`addSurface(type, style, atomsel)` builds a molecular surface (`VDW`, `SAS`, `SES`, `MS`).\nFor an orbital\u002Fdensity isosurface, load the `.cube` and call `addVolumetricData`.\n\n```javascript\nviewer.addSurface($3Dmol.SurfaceType.VDW, {opacity: 0.75, color: \"lightblue\"}, {chain: \"A\"});\n\u002F\u002F isosurface from a Gaussian cube (positive and negative lobes):\nviewer.addVolumetricData(cubeString, \"cube\", {isoval:  0.02, color: \"blue\", opacity: 0.85});\nviewer.addVolumetricData(cubeString, \"cube\", {isoval: -0.02, color: \"red\",  opacity: 0.85});\nviewer.render();\n```\n\n### Labels and interactive speed control\n\n`addLabel(text, spec)` annotates. For animations, a slider bound to `interval` (restarting via\n`stopAnimate()` + `animate()`) lets the viewer set the speed — the fix for \"sometimes too fast\".\n\n```javascript\nviewer.addLabel(\"TS\", {position: {x: 0, y: 0, z: 0}, backgroundColor: \"black\", fontSize: 14});\nlet interval = 140;\nconst play = () => viewer.animate({loop: \"backAndForth\", interval});\ndocument.getElementById(\"spd\").oninput = e => { interval = +e.target.value; viewer.stopAnimate(); play(); };\nplay();\n```\n\n## Key Concepts\n\n**`interval` vs `step`.** `interval` (ms) sets playback speed; every frame is shown. `step`\nplays every Nth frame — it skips motion and is the usual cause of a \"too fast\"\u002Fjumpy animation.\nControl speed with `interval`, never `step`.\n\n**Coordinates are strings, not URLs.** `addModel`\u002F`addModelsAsFrames` take the file *contents*.\nEmbed them in the HTML as a JSON-encoded string so quotes and newlines survive\n(`scripts\u002Fmol_viewer.py` uses `json.dumps`; a raw backtick template breaks on backticks in data).\n\n**CDN and CSP.** The page fetches 3Dmol.js from a CDN, so it needs network access when opened,\nand a strict Content-Security-Policy (e.g. inside some artifact sandboxes) will blank it. Open\nit as a normal local\u002Fhosted file.\n\n## Common Workflows\n\n### TS imaginary-mode animation (quantum-chemistry)\n\nEnd-to-end HTML from a precomputed mode trajectory, with play\u002Fpause and a speed slider — the\ndeliverable the `neb-irc-activation-energy` skill hands off.\n\n```bash\npython3 mol_viewer.py ts_imaginary_mode_000.trj --mode trajectory \\\n    --title \"Transition-state mode\" --subtitle \"-621.8 cm-1\" --out ts_mode.html\n# open ts_mode.html; drag the slider if the oscillation is too fast\n```\n\n### Reaction-path \u002F MD playback\n\n```bash\npython3 mol_viewer.py trajectory.pdb --mode trajectory --style ballstick --out md.html\n# any multi-model .xyz\u002F.pdb works; backAndForth loop + interval control are built in\n```\n\n### Docking pose: protein ribbon + ligand sticks + pocket surface\n\n```javascript\nconst viewer = $3Dmol.createViewer(\"v\", {backgroundColor: \"white\"});\nviewer.addModel(complexPdb, \"pdb\");\nviewer.setStyle({}, {cartoon: {color: \"spectrum\"}});                 \u002F\u002F protein\nviewer.setStyle({resn: \"LIG\"}, {stick: {radius: 0.2}});             \u002F\u002F ligand\nviewer.addSurface($3Dmol.SurfaceType.VDW, {opacity: 0.6}, {resn: \"LIG\", byres: true, expand: 5});\nviewer.zoomTo({resn: \"LIG\"});\nviewer.render();\n```\n\n## Key Parameters\n\n| Parameter | Method | Default | Range \u002F Options | Effect |\n|-----------|--------|---------|-----------------|--------|\n| `interval` | `animate` | 50 | `40`–`400` ms | Frame delay; larger = slower playback |\n| `loop` | `animate` | `forward` | `forward`\u002F`backward`\u002F`backAndForth` | `backAndForth` oscillates a one-way path |\n| `reps` | `animate` | `0` | `0`=∞, `n` | Number of loops |\n| `radius` | `stick` | `0.3` | `0.1`–`0.3` | Bond cylinder thickness |\n| `scale` | `sphere` | `1.0` (vdW) | `0.2`–`0.4` for ball-and-stick | Atom sphere size |\n| `amplitude` | `vibrate` | `1.0` | `0.5`–`2.0` | Normal-mode distortion size |\n| `numFrames` | `vibrate` | `10` | `8`–`20` | Frames per half-cycle |\n| `isoval` | `addVolumetricData` | — | e.g. `±0.02` | Isosurface contour value (sign = lobe) |\n| `opacity` | `addSurface` | `1.0` | `0`–`1` | Surface transparency |\n\n## Best Practices\n\n- Control animation speed with `interval` (ms), never `step`.\n- Embed coordinates as a JSON-encoded string (`json.dumps`), not a raw backtick template.\n- Call `zoomTo()` before `render()`, and again after adding a large model.\n- Keep default element colors unless the analysis needs a specific scheme — don't bake a palette.\n- For large trajectories (>500 frames or >5k atoms), subsample frames; WebGL redraw is the limit.\n- Ship one CDN `\u003Cscript>` tag; only vendor the ~1 MB `3Dmol-min.js` inline if offline use is required.\n\n## Common Recipes\n\n### Recipe: generate a viewer in one call\n\n```bash\npython3 mol_viewer.py mode.xyz --mode vibrate --amplitude 1.2 --title \"mode\" --out mode.html\npython3 mol_viewer.py mol.sdf  --style stick --out mol.html          # static\n```\n\n### Recipe: inline viewer in a Jupyter notebook (py3Dmol)\n\n```python\nimport py3Dmol\nview = py3Dmol.view(width=500, height=400)\nview.addModel(open(\"mol.xyz\").read(), \"xyz\")\nview.setStyle({}, {\"stick\": {}, \"sphere\": {\"scale\": 0.25}})\nview.zoomTo(); view.show()\n```\n\n### Recipe: side-by-side viewers\n\n```javascript\nconst viewer = $3Dmol.createViewerGrid(\"v\", {rows: 1, cols: 2});\nviewer[0][0].addModel(reactantXyz, \"xyz\"); viewer[0][0].setStyle({}, {stick: {}});\nviewer[0][1].addModel(productXyz, \"xyz\");  viewer[0][1].setStyle({}, {stick: {}});\nviewer[0][0].zoomTo(); viewer[0][1].zoomTo(); viewer[0][0].render(); viewer[0][1].render();\n```\n\n## Troubleshooting\n\n| Problem | Cause | Solution |\n|---------|-------|----------|\n| Blank white page | 3Dmol.js not loaded (offline \u002F strict CSP) | Open with network access; check the CDN `\u003Cscript>` resolves |\n| Animation too fast \u002F jumpy | Using `step`, or a tiny `interval` | Use `interval` (ms); raise it; never set `step` |\n| Vibration shows no motion | Model lacks `dx\u002Fdy\u002Fdz` vectors | Add mode vectors as extra XYZ columns, or use a precomputed frame `.trj` |\n| Nothing rendered | Wrong `format` string or bad data | Match `format` to the file; coordinates must be the file contents, not a path |\n| JS syntax error in page | Backtick\u002Fquote in embedded data | Embed via `json.dumps` (the generator does this) |\n| Structure loads but no bonds | XYZ without connectivity + line style | Use `stick`\u002F`sphere`; 3Dmol infers bonds by distance |\n| Surface slow or hangs | Large `SES`\u002F`MS` on a big system | Use `VDW`, restrict the `atomsel`, or lower resolution |\n\n## Bundled Resources\n\n- `scripts\u002Fmol_viewer.py` — emit a standalone 3Dmol HTML (static \u002F trajectory \u002F vibrate) from a structure file, with built-in play\u002Fpause + speed slider for animations\n\n## Related Skills\n\n- **neb-irc-activation-energy** — produces TS imaginary-mode trajectories and IRC paths that this skill animates\n- **rdkit-chemdraw-cdxml** — 2D chemical structure and reaction-scheme drawing\n- **plotly-interactive-plots** — interactive 2D scientific plots and dashboards\n\n## References\n\n- [3Dmol.js documentation](https:\u002F\u002F3dmol.org\u002Fdoc\u002Findex.html) — GLViewer \u002F GLModel API\n- Rego & Koes, *Bioinformatics* 2015, 31(8):1322–1324 — 3Dmol.js: molecular visualization with WebGL\n- [GLViewer.animate](https:\u002F\u002F3dmol.org\u002Fdoc\u002FGLViewer.html) — `interval`, `loop`, `reps`\n- [GLModel.vibrate](https:\u002F\u002F3dmol.org\u002Fdoc\u002FGLModel.html) — normal-mode animation from `dx\u002Fdy\u002Fdz`\n- [py3Dmol on PyPI](https:\u002F\u002Fpypi.org\u002Fproject\u002Fpy3Dmol\u002F) — Python\u002FJupyter wrapper\n",{"name":5,"license":15,"description":7},"master","63f17866001c5ca854bf2fa0b678ce277133de5b","skills\u002Fawesome-skills\u002Fmolecular-visualization-3dmol",0,"https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS","https:\u002F\u002Fbg-szy.github.io\u002FTOP-SKILLS\u002F","https:\u002F\u002Fgithub.com\u002Fbg-szy","https:\u002F\u002Fwww.ecust.edu.cn\u002F","a student of East China University of Science and Technology","2026-11-15 03:38:02",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add bg-szy\u002FTOP-SKILLS --skill molecular-visualization-3dmol",{"tool":40,"command":41},"bunx","bunx skills add bg-szy\u002FTOP-SKILLS --skill molecular-visualization-3dmol",{"tool":43,"command":44},"pnpm","pnpm dlx skills add bg-szy\u002FTOP-SKILLS --skill molecular-visualization-3dmol","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fawesome-skills\u002Fmolecular-visualization-3dmol\u002FSKILL.md",true,[],[49,58,65,72,79,86],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":57},"01M7DXW9N826PKXK174PVW3038","serpmaven","Scrape Google search results (SERP) to JSON with SERP Maven (serpmaven) - a real Chrome browser on a residential proxy with sticky sessions. Run it as a CLI, a Python library, a local HTTP search API (`serve`), an MCP server or a Docker image; set the proxy login, workers, pages and cost tracking. Use when the user wants Google results, rank tracking, a self-hosted SERP API, or live Google search for an AI agent.","MIT","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fserpmaven\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":57},"01M7DXVHSTWDV65475QEQ915M7","revnu-landing-page-audit","Find out why a landing page isn't turning visitors into signups, demos or sales. Audits one page against what the ad, post or search that sends people there promised, then checks the first screen, proof, call to action, friction and mobile. Returns at most 7 prioritized fixes, plus what is fine and what could not be checked; rewrites specific lines and fixes the page in the repo when asked. Never promises a conversion lift. Works without a Revnu account. Use when the user says or asks: \"audit my landing page\", \"why isn't this page converting\", \"review my homepage\", \"my ads get clicks but no signups\", \"people bounce from the pricing page\", \"CRO review\", \"improve conversion rate\", \"is my hero section clear\", \"roast my landing page\", \"rewrite my headline\", \"what's wrong with this page\", \"landing page feedback\", \"make the signup page convert better\". Not for SEO or AI-search audits, page speed engineering on its own, or building a new page from scratch.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-landing-page-audit\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":57},"01M7DXV8X2D7B3VTD4HHYYHTGR","revnu-growth-context","Write down once who buys, what they're stuck on, what it costs, what proof you have and what you've already tried, so every growth task starts from facts instead of a questionnaire. Creates or updates .agents\u002Frevnu-growth.md from the repo, the live site and the user, and imports an existing product-marketing.md. Use when the user says \"set up our marketing context\", \"who is our ideal customer\", \"write our ICP\", \"describe the product for marketing\", \"positioning doc\", \"what's our brand voice\", \"remember this about our customers\", \"log what we tried\", \"what have we learned from marketing\", \"we changed pricing, update the context\", \"update our growth notes\", \"summarize the business for the agent\", \"import my product-marketing.md\", \"start a growth doc\", or before a first marketing, SEO, outreach or launch task when no context file exists. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-growth-context\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":57},"01M7DXV0DGJ1G0A60PAHC6J3C5","revnu-get-listed","Get onto the third-party pages AI answers and search cite when buyers ask for the best tool in your category: \"best X\" roundups, directories, review sites, GitHub awesome lists, community threads and comparison pages. Finds which ones are cited, ranks them by fit and effort, and drafts each submission, PR or pitch by the target's own rules. Use when the user says \"get us listed\", \"which directories should we submit to\", \"how do we get into best-of lists\", \"why does ChatGPT recommend competitors and not us\", \"get mentioned in AI answers\", \"submit to awesome lists\", \"get on G2\", \"where are our competitors listed\", \"pitch listicle authors\", \"find backlink opportunities\", \"launch directories\", \"get into roundups\", \"Product Hunt alternatives\", \"where should we be listed\", \"get cited by Perplexity\". Never submits, pays or posts without a yes. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-get-listed\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":57},"01M7DXTSPMGT9D6DSS0HP9BSTA","revnu-ai-readiness-audit","Audit whether your website gives ChatGPT, Perplexity, Claude, Gemini and Google's AI Overviews something worth quoting, and fix the pages that don't. Use when the user says or asks \"is my site ready for AI search\", \"audit my site for AI answers\", \"AEO audit\", \"GEO audit\", \"why doesn't ChatGPT quote our pricing\", \"make our pages citable by AI\", \"do I need llms.txt\", \"does schema help with ChatGPT\", \"check our structured data\", \"is our content visible without JavaScript\", \"AI SEO audit\", \"optimize our homepage for AI answers\", \"LLM SEO check\", \"why does AI get our product wrong\", \"fix our site for AI Overviews\". Checks fetchability and indexability, answers in the raw HTML, entity facts, schema (including JS-injected markup), headings, dates and llms.txt, then gives at most 10 prioritised fixes and edits the repo when asked. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-ai-readiness-audit\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":53,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":57},"01M7DXSZHCVTRS620GC3S97JZV","proxy-troubleshooting","Diagnose residential proxy failures, with NodeMaven's gateway as the reference - 407 with correct credentials, 406, 410, 500, a connection that hangs, ERR_TUNNEL_CONNECTION_FAILED in a browser, Playwright or Puppeteer ignoring proxy credentials, a sticky session that changes IP, geo-targeting that is silently ignored, passwords with special characters, and unexpected traffic from headless Chrome. Use when a proxy connection fails, returns the wrong location, or costs more traffic than expected.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fproxy-troubleshooting\u002FSKILL.md",[],[]]