[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M73HF4DAVT5G52C79TKR5JFP":3,"skill-same:01M73HF4DAVT5G52C79TKR5JFP":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},"01M73HF4DAVT5G52C79TKR5JFP","neb-irc-activation-energy",null,"NEB-IRC activation energy pipeline for reaction barriers using GFN2-xTB and pysisyphus. Optimize reactant and product geometries, run CI-NEB path search, optimize the transition state with a Hessian, verify with IRC (one imaginary mode, endpoints matching reactant\u002Fproduct, single NEB maximum), and report the electronic and Gibbs barriers. Use when you need a transition state, reaction barrier, activation energy, minimum energy path, or intrinsic reaction coordinate. Covers reactant\u002Fproduct atom-ordering pitfalls, feasibility sizing for single-core runs, and thermochemistry corrections. Renders an IRC energy-profile plot and an animated TS imaginary-mode HTML viewer. For 2D reaction scheme drawing use rdkit-chemdraw-cdxml.","bg-szy\u002FTOP-SKILLS","bg-szy","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F106576190?v=4","01M73A4E8KPV67SFXRY8XZGNBX","ShuZhiyong","01M73A4E96MQ294MHM74TZBVQD",6,"CC-BY-4.0","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fawesome-skills\u002Fneb-irc-activation-energy\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: \"neb-irc-activation-energy\"\ndescription: \"NEB-IRC activation energy pipeline for reaction barriers using GFN2-xTB and pysisyphus. Optimize reactant and product geometries, run CI-NEB path search, optimize the transition state with a Hessian, verify with IRC (one imaginary mode, endpoints matching reactant\u002Fproduct, single NEB maximum), and report the electronic and Gibbs barriers. Use when you need a transition state, reaction barrier, activation energy, minimum energy path, or intrinsic reaction coordinate. Covers reactant\u002Fproduct atom-ordering pitfalls, feasibility sizing for single-core runs, and thermochemistry corrections. Renders an IRC energy-profile plot and an animated TS imaginary-mode HTML viewer. For 2D reaction scheme drawing use rdkit-chemdraw-cdxml.\"\nlicense: \"CC-BY-4.0\"\n---\n\n# NEB-IRC activation energy pipeline\n\n## Overview\n\nComputes a reaction activation energy end to end — optimize reactant and product, find the\nminimum energy path with climbing-image NEB, refine the transition state with a Hessian, and\nconfirm it with IRC — using GFN2-xTB through pysisyphus. Outputs a verified TS geometry, the\nbarrier (ΔE‡; ΔG‡ after thermal corrections), an IRC energy profile (`irc_energy_profile.png`),\nand an animated TS imaginary-mode viewer (`ts_imaginary_mode.html`). Verification is required,\nnot optional: a converged TS is meaningless until its single imaginary mode and IRC endpoints\nare checked.\n\n## When to Use\n\n- Finding the transition state for an elementary reaction step and its activation energy\n- Computing a reaction barrier (ΔE‡ or ΔG‡) to rank a series of related reactions\n- Running a climbing-image NEB \u002F minimum energy path between a reactant and product\n- Verifying a candidate TS with IRC — does it connect the intended reactant and product?\n- Screening barriers at a cheap semi-empirical level before committing DFT time\n\nReach for DFT on a multi-core node instead when you need quantitative agreement with\nexperiment; GFN2-xTB barriers are semi-quantitative (see `references\u002Fenergetics.md`). For a 2D\nscheme figure of the reaction, use the `rdkit-chemdraw-cdxml` skill instead.\n\n## Prerequisites\n\n- **Tools**: `xtb` (GFN2-xTB engine), `pysisyphus` (`pysis` CLI for the path pipeline)\n- **Python**: `matplotlib` for the IRC plot (the TS animation HTML needs no packages)\n- **Input**: `reactant.xyz` and `product.xyz` with **identical atom ordering** (see Step 1)\n- **Environment**: single core suffices; set `OMP_NUM_THREADS` to match physical cores\n\n**Work in a local scratch dir** (e.g. `\u002Ftmp\u002Frxn\u002F`), not a mounted\u002Fnetworked workspace:\npysisyphus creates and deletes symlinks and throws `PermissionError` mid-run on s3fs\u002FFUSE.\nCopy results out at the end.\n\n**Materialize the bundled scripts into the scratch dir first.** They can't be run in place from\nthe skill directory, so use your file tools to read each one and save it into your working dir\nbefore running it. The scripts live in this skill's `scripts\u002F` folder (next to this SKILL.md):\n\n- `scripts\u002Fsetup_env.sh`\n- `scripts\u002Fpipeline.yaml`\n- `scripts\u002Fcheck_result.py`\n- `scripts\u002Fplot_irc.py`\n\nThe TS imaginary-mode animation is **not** produced here — read the\n**molecular-visualization-3dmol** skill and use its `mol_viewer.py` (Step 6).\n\nCheck for the tools; install only if missing (inside pixi\u002Fconda, invoke via `pixi run xtb`):\n\n```bash\ncd \u002Ftmp\u002Frxn\ncommand -v xtb && command -v pysis || bash setup_env.sh   # xtb binary + pysisyphus, ~2-3 min\nsource \"${ROOT:-${HOME:-\u002Ftmp}\u002Fxtbenv}\u002Fenv.sh\"              # re-source in every new shell\n```\n\n## Workflow\n\n### Step 1: Prepare reactant and product geometries\n\nMost failures originate here, not in the NEB. Build the product by editing a **copy** of the\nreactant so atom ordering is identical — a permuted order gives a path that is geometrically\nvalid and chemically meaningless. Align non-reacting groups so a spectator conformational\nchange does not fold into the barrier. For bimolecular reactions use a pre-reaction complex as\nthe reactant, not separated fragments (NEB converges poorly from infinite separation, and the\nreference state changes the reported barrier — record it).\n\n```python\n# Build product from a copy of the reactant, moving only the reacting atoms.\nfrom pathlib import Path\n\nlines = Path(\"reactant.xyz\").read_text().splitlines()\nnatoms = int(lines[0])\natoms = [ln.split() for ln in lines[2:2 + natoms]]   # [symbol, x, y, z] per atom\n# ... edit ONLY the coordinates of atoms that move; keep order + symbols ...\nPath(\"product.xyz\").write_text(\"\\n\".join([str(natoms), \"product\"] + [\" \".join(a) for a in atoms]) + \"\\n\")\n```\n\n### Step 2: Check the endpoints sit in different basins\n\nIf the reacting groups start too close, preoptimization carries the reactant over the barrier\nand both endpoints relax to the same structure; the NEB then returns a flat profile and the TS\nsearch aborts. This looks like success in the log until it fails minutes later, so compare the\ntwo pre-optimized endpoints on the key reacting bond.\n\n```python\nimport numpy as np\n\ndef load_xyz(fn):\n    lines = open(fn).read().splitlines()\n    return np.array([[float(v) for v in ln.split()[1:4]] for ln in lines[2:2 + int(lines[0])]])\n\nr, p = load_xyz(\"first_pre_opt.xyz\"), load_xyz(\"last_pre_opt.xyz\")   # written by preopt\ni, j = 0, 5                                     # indices of the atoms whose bond changes\ndr, dp = np.linalg.norm(r[i] - r[j]), np.linalg.norm(p[i] - p[j])\nassert abs(dr - dp) > 0.3, \"endpoints nearly identical: move the reacting fragment further out\"\n```\n\n### Step 3: Run the pipeline\n\nThe template chains preopt → IDPP interpolation → CI-NEB → RS-I-RFO TS optimization with\nHessian → IRC both directions → endpoint reoptimization. **Set `charge` and `mult` in\n`pipeline.yaml` before running** — the default `charge: 0` is wrong for any ion and converges\nsilently to a meaningless TS. Add `alpb: \u003Csolvent>` for solution reactions. Whatever you set\nhere must match every standalone `xtb` call in Step 5. Raise `max_cycles` to 150–200 above\n~50 atoms.\n\n```bash\npysis pipeline.yaml > pipeline.log 2>&1\ntail -40 pipeline.log            # confirm it reached the endopt\u002FIRC stage\n```\n\nΔE‡ and the reaction energy come from the pipeline's `| BARRIERS |` block, referenced to the\nreactant endpoint (`check_result.py` in Step 4 reports the same numbers):\n\n```\n  Left:     0.00 kJ mol-1      # reactant endpoint\n    TS:   107.84 kJ mol-1      # dE‡ = TS - Left = 107.84 kJ\u002Fmol\n Right:    10.19 kJ mol-1      # dE_rxn = Right - Left = 10.19 kJ\u002Fmol\n```\n\n### Step 4: Verify the transition state\n\nNever report a barrier before this passes. The checker applies all three gates (see Key\nConcepts) and exits 0 only if every one passes.\n\n```bash\npython3 check_result.py pipeline.log\n# [PASS] imaginary frequencies  exactly 1 at -621.8 cm-1\n# [PASS] IRC endpoints          forward and backward matched distinct inputs\n# [PASS] NEB profile            elementary, single barrier, span 107.5 kJ\u002Fmol\n#   electronic barrier dE‡ (GFN2-xTB): 107.8 kJ\u002Fmol = 25.77 kcal\u002Fmol\n```\n\n### Step 5: Compute thermochemistry and report the barrier\n\nReport ΔE‡ and the level of theory; for comparison against experimental rates, report ΔG‡,\nwhich needs Hessians on the TS and reactant. **Every standalone `xtb` call must use the same\n`--chrg`, `--uhf`, and solvent as `pipeline.yaml`, on the pipeline's optimized geometries — not\nthe raw input.** A gas-phase Hessian against a solvated barrier, or a missing `--chrg`, yields\na nonsensical (often negative) ΔG‡.\n\n```bash\n# flags must match pipeline.yaml (here: charge -1, aqueous)\nxtb forward_end_final_geometry.xyz --hess --gfn 2 --alpb water --chrg -1 --uhf 0 > r_hess.log 2>&1\nxtb ts_final_geometry.xyz          --hess --gfn 2 --alpb water --chrg -1 --uhf 0 > ts_hess.log 2>&1\n# dG‡ = G(TS) - G(reactant), from the \"TOTAL FREE ENERGY\" lines\ngrep -i \"TOTAL FREE ENERGY\" r_hess.log ts_hess.log\n```\n\n### Step 6: Deliver the two visuals\n\n**IRC energy profile** — `plot_irc.py` reads gfn\u002Fcharge\u002Fmult\u002Fsolvent from `pipeline.yaml` and\nrecomputes each IRC frame's energy at that exact level (the `*_irc.trj` comment lines carry\nnone). Override with `--charge\u002F--mult\u002F--alpb\u002F--gfn` only if you edited the pipeline after running.\n\n```bash\npython3 plot_irc.py               # -> irc_energy_profile.png\n```\n\n**TS imaginary-mode animation** — produced by the **molecular-visualization-3dmol** skill, not\nhere. Read that skill and run its `mol_viewer.py` on the `ts_imaginary_mode_000.trj` that\n`tsopt: do_hess: True` wrote (grab the frequency from `check_result.py` for the label):\n\n```bash\n# after materializing mol_viewer.py per the molecular-visualization-3dmol skill\npython3 mol_viewer.py ts_imaginary_mode_000.trj --mode trajectory \\\n    --title \"Transition-state mode\" --subtitle \"imaginary mode -621.8 cm-1\" --out ts_imaginary_mode.html\n```\n\n## Key Parameters\n\nSet in `pipeline.yaml` unless noted.\n\n| Parameter | Section | Default | Range \u002F Options | Effect |\n|-----------|---------|---------|-----------------|--------|\n| `gfn` | `calc` | `2` | `0`, `1`, `2` | GFN parametrization; `2` is the standard choice |\n| `charge` \u002F `mult` | `calc` | `0` \u002F `1` | integers | Set explicitly; wrong values silently give a wrong TS |\n| `alpb` | `calc` | off | solvent name (`water`, ...) | Implicit solvation; changes the barrier |\n| `pal` | `calc` | `1` | physical cores | Threads; xTB parallel efficiency is modest |\n| `between` | `interpol` | `8` | `6`–`12` | Intermediate NEB images (`between`+2 total) |\n| `climb` | `cos` | `True` | `True`\u002F`False` | Climbing image; gives a usable TS guess |\n| `max_cycles` | `opt` | `80` | `80`–`200` | Raise above ~50 atoms |\n| `do_hess` | `tsopt` | `True` | `True`\u002F`False` | Required — the imaginary-frequency gate depends on it |\n\n## Key Concepts\n\n**The three verification gates** and what a failure means:\n\n| Gate | Failure | Meaning and fix |\n|---|---|---|\n| Imaginary frequencies | 0 found | Optimizer fell into a minimum; perturb along the NEB tangent and rerun tsopt |\n| Imaginary frequencies | ≥2 found | Higher-order saddle; displace along the lowest non-reactive mode and reoptimize |\n| Imaginary frequencies | 1, wrong mode | Confirm it is the bonds breaking\u002Fforming — a methyl rotation also shows exactly one |\n| IRC endpoints | mismatch | TS connects other species; may be a real TS for a different reaction — do not report |\n| NEB profile | multiple maxima | Not an elementary step; split at the intervening minimum and run each segment |\n\n**Barrier definitions** differ by reference and corrections: ΔE‡ (electronic), ΔE‡+ZPE, ΔH‡,\nΔG‡ (for kinetics). For bimolecular reactions the reference state (separated reactants vs\npre-reaction complex) shifts the number — record which was used. Full table in\n`references\u002Fenergetics.md`.\n\n**Submerged barriers.** For an ion + neutral in the gas phase (e.g. anionic SN2) the TS can\nsit *below* the separated reactants — a negative barrier against separated reactants is real,\nnot a bug. Reference to the pre-reaction complex (the pipeline's endpoint) and\u002For add `alpb`\nsolvation, which lifts it to a positive, experiment-comparable value.\n\n## Common Recipes\n\n### Recipe: Split a multi-step reaction into elementary steps\n\nWhen to use: `check_result.py` reports multiple NEB maxima — it names the intermediate image\nindex(es). Extract that image from the NEB path and run the pipeline on each half.\n\n```python\nfrom pathlib import Path\n\nN = 5   # interior-minimum image index reported by check_result.py's NEB profile gate\nlines = Path(\"final_geometries.trj\").read_text().splitlines()   # one frame per NEB image\nn = int(lines[0].split()[0])\nPath(\"intermediate.xyz\").write_text(\"\\n\".join(lines[N * (n + 2):(N + 1) * (n + 2)]) + \"\\n\")\n# then: pipeline on reactant.xyz + intermediate.xyz, and intermediate.xyz + product.xyz\n```\n\n### Recipe: Refine the electronic energy with a DFT single point\n\nWhen to use: the xTB geometry is fine but you need a better barrier. Keep the xTB geometry and\nthermal corrections; replace only the electronic energy on 3 structures (≤30 atoms).\n\n```python\nfrom pyscf import gto, dft\n\ndef electronic_energy(xyz_fn, basis=\"def2-svp\", xc=\"b3lyp\"):\n    mol = gto.M(atom=xyz_fn, basis=basis)     # xyz file path accepted directly\n    mf = dft.RKS(mol); mf.xc = xc\n    return mf.kernel()                          # Hartree\n\ndE = (electronic_energy(\"ts_final_geometry.xyz\") - electronic_energy(\"reactant.xyz\")) * 2625.4996\nprint(f\"DFT dE‡ = {dE:.1f} kJ\u002Fmol (add xTB G_corr for dG‡)\")\n```\n\n## Expected Outputs\n\n- `pipeline.log` — full run log; parsed by `check_result.py`\n- `ts_final_geometry.xyz` — the optimized transition state\n- `final_geometries.trj` — the converged NEB path (per-image energies in comment lines)\n- `ts_imaginary_mode_000.trj` — TS displaced along the imaginary mode (input to the animation)\n- `irc_energy_profile.png` — from `plot_irc.py`; `ts_imaginary_mode.html` — from the molecular-visualization-3dmol skill (Step 6)\n- A barrier: ΔE‡ from the BARRIERS block, ΔG‡ after Hessian thermal corrections\n\n## Troubleshooting\n\n| Problem | Cause | Solution |\n|---------|-------|----------|\n| `xtb: command not found` | Env not sourced | `source \"${ROOT:-${HOME:-\u002Ftmp}\u002Fxtbenv}\u002Fenv.sh\"` in every new shell |\n| `scripts\u002F…: No such file` \u002F GitHub 404 | Bundled scripts not copied into the workdir | Read them from this skill's `scripts\u002F` folder with your file tools and save locally (Prerequisites); not on GitHub |\n| `setup_env.sh: HOME: unbound variable` | `HOME` unset under `set -u` | Fixed in the shipped script; if patching, `export HOME=\"${HOME:-\u002Ftmp}\"` first |\n| `PermissionError` on a symlink mid-run | pysisyphus symlinks on a mounted\u002Fs3fs dir | Run in a local dir (`\u002Ftmp\u002Frxn\u002F`), copy results back |\n| ΔG‡ negative or absurd | Hessian charge\u002Fsolvent ≠ pipeline, or raw input geometry used | Match `--chrg`\u002F`--uhf`\u002F`alpb` to `pipeline.yaml`; use the optimized endpoint geometry (Step 5) |\n| Barrier below separated reactants | Submerged barrier for ion + neutral | Expected in gas phase; reference the pre-reaction complex and\u002For add `alpb` |\n| NEB profile nearly flat, TS aborts | Endpoints in the same basin | Move the reacting fragment further out (Step 2) |\n| Path is chemically nonsensical | Permuted atom order between endpoints | Rebuild product from a copy of the reactant (Step 1) |\n| Job killed \u002F never finishes | System too large for the budget | Check `references\u002Ffeasibility.md`; split stages or shrink the model |\n| `qm` optimizer crashes on cycle 1 | QuickMin instability | Use `type: lbfgs` under `opt` (the template default) |\n| `No imaginary-mode trajectory found` | `ts_imaginary_mode_000.trj` absent | Ensure `tsopt: do_hess: True` ran; re-run tsopt |\n| Animation HTML blank | 3Dmol.js blocked (offline \u002F strict CSP) | Open with network access; the viewer loads 3Dmol from a CDN |\n\n## Bundled Resources\n\n- `scripts\u002Fsetup_env.sh` — installs xtb (GitHub release) + pysisyphus (PyPI), writes `env.sh`\n- `scripts\u002Fpipeline.yaml` — full preopt→NEB→TSopt→IRC→endopt template with inline comments\n- `scripts\u002Fcheck_result.py` — verification of the three gates (exit 0 = all pass); prints ΔE‡\n- `scripts\u002Fplot_irc.py` — builds `irc_energy_profile.png` (recomputes IRC-frame energies at the pipeline level)\n- `references\u002Ffeasibility.md` — measured timings, atom-count sizing, what DFT can\u002Fcan't do here\n- `references\u002Fenergetics.md` — ΔE‡\u002FΔH‡\u002FΔG‡ definitions, thermochemistry, reporting conventions\n\n## Related Skills\n\n- **molecular-visualization-3dmol** — supplies `mol_viewer.py`, which renders the TS imaginary-mode animation and can play back the IRC\u002FNEB path; materialize it alongside this skill's scripts\n- **rdkit-chemdraw-cdxml** — draw the reaction as a 2D scheme figure\n\n## References\n\n- [xtb documentation](https:\u002F\u002Fxtb-docs.readthedocs.io\u002F) — GFN2-xTB methods and CLI\n- [pysisyphus documentation](https:\u002F\u002Fpysisyphus.readthedocs.io\u002F) — COS\u002FNEB, TS optimizers, IRC\n- Bannwarth, Ehlert, Grimme, *J. Chem. Theory Comput.* 2019, 15, 1652 — GFN2-xTB method paper\n- Steinmetzer, Kupfer, Gräfe, *Int. J. Quantum Chem.* 2021, 121, e26550 — pysisyphus paper\n- [ASE](https:\u002F\u002Fwiki.fysik.dtu.dk\u002Fase\u002F) \u002F [PySCF](https:\u002F\u002Fpyscf.org\u002F) — geometry I\u002FO and DFT single points\n","# NEB-IRC activation energy pipeline\n\n## Overview\n\nComputes a reaction activation energy end to end — optimize reactant and product, find the\nminimum energy path with climbing-image NEB, refine the transition state with a Hessian, and\nconfirm it with IRC — using GFN2-xTB through pysisyphus. Outputs a verified TS geometry, the\nbarrier (ΔE‡; ΔG‡ after thermal corrections), an IRC energy profile (`irc_energy_profile.png`),\nand an animated TS imaginary-mode viewer (`ts_imaginary_mode.html`). Verification is required,\nnot optional: a converged TS is meaningless until its single imaginary mode and IRC endpoints\nare checked.\n\n## When to Use\n\n- Finding the transition state for an elementary reaction step and its activation energy\n- Computing a reaction barrier (ΔE‡ or ΔG‡) to rank a series of related reactions\n- Running a climbing-image NEB \u002F minimum energy path between a reactant and product\n- Verifying a candidate TS with IRC — does it connect the intended reactant and product?\n- Screening barriers at a cheap semi-empirical level before committing DFT time\n\nReach for DFT on a multi-core node instead when you need quantitative agreement with\nexperiment; GFN2-xTB barriers are semi-quantitative (see `references\u002Fenergetics.md`). For a 2D\nscheme figure of the reaction, use the `rdkit-chemdraw-cdxml` skill instead.\n\n## Prerequisites\n\n- **Tools**: `xtb` (GFN2-xTB engine), `pysisyphus` (`pysis` CLI for the path pipeline)\n- **Python**: `matplotlib` for the IRC plot (the TS animation HTML needs no packages)\n- **Input**: `reactant.xyz` and `product.xyz` with **identical atom ordering** (see Step 1)\n- **Environment**: single core suffices; set `OMP_NUM_THREADS` to match physical cores\n\n**Work in a local scratch dir** (e.g. `\u002Ftmp\u002Frxn\u002F`), not a mounted\u002Fnetworked workspace:\npysisyphus creates and deletes symlinks and throws `PermissionError` mid-run on s3fs\u002FFUSE.\nCopy results out at the end.\n\n**Materialize the bundled scripts into the scratch dir first.** They can't be run in place from\nthe skill directory, so use your file tools to read each one and save it into your working dir\nbefore running it. The scripts live in this skill's `scripts\u002F` folder (next to this SKILL.md):\n\n- `scripts\u002Fsetup_env.sh`\n- `scripts\u002Fpipeline.yaml`\n- `scripts\u002Fcheck_result.py`\n- `scripts\u002Fplot_irc.py`\n\nThe TS imaginary-mode animation is **not** produced here — read the\n**molecular-visualization-3dmol** skill and use its `mol_viewer.py` (Step 6).\n\nCheck for the tools; install only if missing (inside pixi\u002Fconda, invoke via `pixi run xtb`):\n\n```bash\ncd \u002Ftmp\u002Frxn\ncommand -v xtb && command -v pysis || bash setup_env.sh   # xtb binary + pysisyphus, ~2-3 min\nsource \"${ROOT:-${HOME:-\u002Ftmp}\u002Fxtbenv}\u002Fenv.sh\"              # re-source in every new shell\n```\n\n## Workflow\n\n### Step 1: Prepare reactant and product geometries\n\nMost failures originate here, not in the NEB. Build the product by editing a **copy** of the\nreactant so atom ordering is identical — a permuted order gives a path that is geometrically\nvalid and chemically meaningless. Align non-reacting groups so a spectator conformational\nchange does not fold into the barrier. For bimolecular reactions use a pre-reaction complex as\nthe reactant, not separated fragments (NEB converges poorly from infinite separation, and the\nreference state changes the reported barrier — record it).\n\n```python\n# Build product from a copy of the reactant, moving only the reacting atoms.\nfrom pathlib import Path\n\nlines = Path(\"reactant.xyz\").read_text().splitlines()\nnatoms = int(lines[0])\natoms = [ln.split() for ln in lines[2:2 + natoms]]   # [symbol, x, y, z] per atom\n# ... edit ONLY the coordinates of atoms that move; keep order + symbols ...\nPath(\"product.xyz\").write_text(\"\\n\".join([str(natoms), \"product\"] + [\" \".join(a) for a in atoms]) + \"\\n\")\n```\n\n### Step 2: Check the endpoints sit in different basins\n\nIf the reacting groups start too close, preoptimization carries the reactant over the barrier\nand both endpoints relax to the same structure; the NEB then returns a flat profile and the TS\nsearch aborts. This looks like success in the log until it fails minutes later, so compare the\ntwo pre-optimized endpoints on the key reacting bond.\n\n```python\nimport numpy as np\n\ndef load_xyz(fn):\n    lines = open(fn).read().splitlines()\n    return np.array([[float(v) for v in ln.split()[1:4]] for ln in lines[2:2 + int(lines[0])]])\n\nr, p = load_xyz(\"first_pre_opt.xyz\"), load_xyz(\"last_pre_opt.xyz\")   # written by preopt\ni, j = 0, 5                                     # indices of the atoms whose bond changes\ndr, dp = np.linalg.norm(r[i] - r[j]), np.linalg.norm(p[i] - p[j])\nassert abs(dr - dp) > 0.3, \"endpoints nearly identical: move the reacting fragment further out\"\n```\n\n### Step 3: Run the pipeline\n\nThe template chains preopt → IDPP interpolation → CI-NEB → RS-I-RFO TS optimization with\nHessian → IRC both directions → endpoint reoptimization. **Set `charge` and `mult` in\n`pipeline.yaml` before running** — the default `charge: 0` is wrong for any ion and converges\nsilently to a meaningless TS. Add `alpb: \u003Csolvent>` for solution reactions. Whatever you set\nhere must match every standalone `xtb` call in Step 5. Raise `max_cycles` to 150–200 above\n~50 atoms.\n\n```bash\npysis pipeline.yaml > pipeline.log 2>&1\ntail -40 pipeline.log            # confirm it reached the endopt\u002FIRC stage\n```\n\nΔE‡ and the reaction energy come from the pipeline's `| BARRIERS |` block, referenced to the\nreactant endpoint (`check_result.py` in Step 4 reports the same numbers):\n\n```\n  Left:     0.00 kJ mol-1      # reactant endpoint\n    TS:   107.84 kJ mol-1      # dE‡ = TS - Left = 107.84 kJ\u002Fmol\n Right:    10.19 kJ mol-1      # dE_rxn = Right - Left = 10.19 kJ\u002Fmol\n```\n\n### Step 4: Verify the transition state\n\nNever report a barrier before this passes. The checker applies all three gates (see Key\nConcepts) and exits 0 only if every one passes.\n\n```bash\npython3 check_result.py pipeline.log\n# [PASS] imaginary frequencies  exactly 1 at -621.8 cm-1\n# [PASS] IRC endpoints          forward and backward matched distinct inputs\n# [PASS] NEB profile            elementary, single barrier, span 107.5 kJ\u002Fmol\n#   electronic barrier dE‡ (GFN2-xTB): 107.8 kJ\u002Fmol = 25.77 kcal\u002Fmol\n```\n\n### Step 5: Compute thermochemistry and report the barrier\n\nReport ΔE‡ and the level of theory; for comparison against experimental rates, report ΔG‡,\nwhich needs Hessians on the TS and reactant. **Every standalone `xtb` call must use the same\n`--chrg`, `--uhf`, and solvent as `pipeline.yaml`, on the pipeline's optimized geometries — not\nthe raw input.** A gas-phase Hessian against a solvated barrier, or a missing `--chrg`, yields\na nonsensical (often negative) ΔG‡.\n\n```bash\n# flags must match pipeline.yaml (here: charge -1, aqueous)\nxtb forward_end_final_geometry.xyz --hess --gfn 2 --alpb water --chrg -1 --uhf 0 > r_hess.log 2>&1\nxtb ts_final_geometry.xyz          --hess --gfn 2 --alpb water --chrg -1 --uhf 0 > ts_hess.log 2>&1\n# dG‡ = G(TS) - G(reactant), from the \"TOTAL FREE ENERGY\" lines\ngrep -i \"TOTAL FREE ENERGY\" r_hess.log ts_hess.log\n```\n\n### Step 6: Deliver the two visuals\n\n**IRC energy profile** — `plot_irc.py` reads gfn\u002Fcharge\u002Fmult\u002Fsolvent from `pipeline.yaml` and\nrecomputes each IRC frame's energy at that exact level (the `*_irc.trj` comment lines carry\nnone). Override with `--charge\u002F--mult\u002F--alpb\u002F--gfn` only if you edited the pipeline after running.\n\n```bash\npython3 plot_irc.py               # -> irc_energy_profile.png\n```\n\n**TS imaginary-mode animation** — produced by the **molecular-visualization-3dmol** skill, not\nhere. Read that skill and run its `mol_viewer.py` on the `ts_imaginary_mode_000.trj` that\n`tsopt: do_hess: True` wrote (grab the frequency from `check_result.py` for the label):\n\n```bash\n# after materializing mol_viewer.py per the molecular-visualization-3dmol skill\npython3 mol_viewer.py ts_imaginary_mode_000.trj --mode trajectory \\\n    --title \"Transition-state mode\" --subtitle \"imaginary mode -621.8 cm-1\" --out ts_imaginary_mode.html\n```\n\n## Key Parameters\n\nSet in `pipeline.yaml` unless noted.\n\n| Parameter | Section | Default | Range \u002F Options | Effect |\n|-----------|---------|---------|-----------------|--------|\n| `gfn` | `calc` | `2` | `0`, `1`, `2` | GFN parametrization; `2` is the standard choice |\n| `charge` \u002F `mult` | `calc` | `0` \u002F `1` | integers | Set explicitly; wrong values silently give a wrong TS |\n| `alpb` | `calc` | off | solvent name (`water`, ...) | Implicit solvation; changes the barrier |\n| `pal` | `calc` | `1` | physical cores | Threads; xTB parallel efficiency is modest |\n| `between` | `interpol` | `8` | `6`–`12` | Intermediate NEB images (`between`+2 total) |\n| `climb` | `cos` | `True` | `True`\u002F`False` | Climbing image; gives a usable TS guess |\n| `max_cycles` | `opt` | `80` | `80`–`200` | Raise above ~50 atoms |\n| `do_hess` | `tsopt` | `True` | `True`\u002F`False` | Required — the imaginary-frequency gate depends on it |\n\n## Key Concepts\n\n**The three verification gates** and what a failure means:\n\n| Gate | Failure | Meaning and fix |\n|---|---|---|\n| Imaginary frequencies | 0 found | Optimizer fell into a minimum; perturb along the NEB tangent and rerun tsopt |\n| Imaginary frequencies | ≥2 found | Higher-order saddle; displace along the lowest non-reactive mode and reoptimize |\n| Imaginary frequencies | 1, wrong mode | Confirm it is the bonds breaking\u002Fforming — a methyl rotation also shows exactly one |\n| IRC endpoints | mismatch | TS connects other species; may be a real TS for a different reaction — do not report |\n| NEB profile | multiple maxima | Not an elementary step; split at the intervening minimum and run each segment |\n\n**Barrier definitions** differ by reference and corrections: ΔE‡ (electronic), ΔE‡+ZPE, ΔH‡,\nΔG‡ (for kinetics). For bimolecular reactions the reference state (separated reactants vs\npre-reaction complex) shifts the number — record which was used. Full table in\n`references\u002Fenergetics.md`.\n\n**Submerged barriers.** For an ion + neutral in the gas phase (e.g. anionic SN2) the TS can\nsit *below* the separated reactants — a negative barrier against separated reactants is real,\nnot a bug. Reference to the pre-reaction complex (the pipeline's endpoint) and\u002For add `alpb`\nsolvation, which lifts it to a positive, experiment-comparable value.\n\n## Common Recipes\n\n### Recipe: Split a multi-step reaction into elementary steps\n\nWhen to use: `check_result.py` reports multiple NEB maxima — it names the intermediate image\nindex(es). Extract that image from the NEB path and run the pipeline on each half.\n\n```python\nfrom pathlib import Path\n\nN = 5   # interior-minimum image index reported by check_result.py's NEB profile gate\nlines = Path(\"final_geometries.trj\").read_text().splitlines()   # one frame per NEB image\nn = int(lines[0].split()[0])\nPath(\"intermediate.xyz\").write_text(\"\\n\".join(lines[N * (n + 2):(N + 1) * (n + 2)]) + \"\\n\")\n# then: pipeline on reactant.xyz + intermediate.xyz, and intermediate.xyz + product.xyz\n```\n\n### Recipe: Refine the electronic energy with a DFT single point\n\nWhen to use: the xTB geometry is fine but you need a better barrier. Keep the xTB geometry and\nthermal corrections; replace only the electronic energy on 3 structures (≤30 atoms).\n\n```python\nfrom pyscf import gto, dft\n\ndef electronic_energy(xyz_fn, basis=\"def2-svp\", xc=\"b3lyp\"):\n    mol = gto.M(atom=xyz_fn, basis=basis)     # xyz file path accepted directly\n    mf = dft.RKS(mol); mf.xc = xc\n    return mf.kernel()                          # Hartree\n\ndE = (electronic_energy(\"ts_final_geometry.xyz\") - electronic_energy(\"reactant.xyz\")) * 2625.4996\nprint(f\"DFT dE‡ = {dE:.1f} kJ\u002Fmol (add xTB G_corr for dG‡)\")\n```\n\n## Expected Outputs\n\n- `pipeline.log` — full run log; parsed by `check_result.py`\n- `ts_final_geometry.xyz` — the optimized transition state\n- `final_geometries.trj` — the converged NEB path (per-image energies in comment lines)\n- `ts_imaginary_mode_000.trj` — TS displaced along the imaginary mode (input to the animation)\n- `irc_energy_profile.png` — from `plot_irc.py`; `ts_imaginary_mode.html` — from the molecular-visualization-3dmol skill (Step 6)\n- A barrier: ΔE‡ from the BARRIERS block, ΔG‡ after Hessian thermal corrections\n\n## Troubleshooting\n\n| Problem | Cause | Solution |\n|---------|-------|----------|\n| `xtb: command not found` | Env not sourced | `source \"${ROOT:-${HOME:-\u002Ftmp}\u002Fxtbenv}\u002Fenv.sh\"` in every new shell |\n| `scripts\u002F…: No such file` \u002F GitHub 404 | Bundled scripts not copied into the workdir | Read them from this skill's `scripts\u002F` folder with your file tools and save locally (Prerequisites); not on GitHub |\n| `setup_env.sh: HOME: unbound variable` | `HOME` unset under `set -u` | Fixed in the shipped script; if patching, `export HOME=\"${HOME:-\u002Ftmp}\"` first |\n| `PermissionError` on a symlink mid-run | pysisyphus symlinks on a mounted\u002Fs3fs dir | Run in a local dir (`\u002Ftmp\u002Frxn\u002F`), copy results back |\n| ΔG‡ negative or absurd | Hessian charge\u002Fsolvent ≠ pipeline, or raw input geometry used | Match `--chrg`\u002F`--uhf`\u002F`alpb` to `pipeline.yaml`; use the optimized endpoint geometry (Step 5) |\n| Barrier below separated reactants | Submerged barrier for ion + neutral | Expected in gas phase; reference the pre-reaction complex and\u002For add `alpb` |\n| NEB profile nearly flat, TS aborts | Endpoints in the same basin | Move the reacting fragment further out (Step 2) |\n| Path is chemically nonsensical | Permuted atom order between endpoints | Rebuild product from a copy of the reactant (Step 1) |\n| Job killed \u002F never finishes | System too large for the budget | Check `references\u002Ffeasibility.md`; split stages or shrink the model |\n| `qm` optimizer crashes on cycle 1 | QuickMin instability | Use `type: lbfgs` under `opt` (the template default) |\n| `No imaginary-mode trajectory found` | `ts_imaginary_mode_000.trj` absent | Ensure `tsopt: do_hess: True` ran; re-run tsopt |\n| Animation HTML blank | 3Dmol.js blocked (offline \u002F strict CSP) | Open with network access; the viewer loads 3Dmol from a CDN |\n\n## Bundled Resources\n\n- `scripts\u002Fsetup_env.sh` — installs xtb (GitHub release) + pysisyphus (PyPI), writes `env.sh`\n- `scripts\u002Fpipeline.yaml` — full preopt→NEB→TSopt→IRC→endopt template with inline comments\n- `scripts\u002Fcheck_result.py` — verification of the three gates (exit 0 = all pass); prints ΔE‡\n- `scripts\u002Fplot_irc.py` — builds `irc_energy_profile.png` (recomputes IRC-frame energies at the pipeline level)\n- `references\u002Ffeasibility.md` — measured timings, atom-count sizing, what DFT can\u002Fcan't do here\n- `references\u002Fenergetics.md` — ΔE‡\u002FΔH‡\u002FΔG‡ definitions, thermochemistry, reporting conventions\n\n## Related Skills\n\n- **molecular-visualization-3dmol** — supplies `mol_viewer.py`, which renders the TS imaginary-mode animation and can play back the IRC\u002FNEB path; materialize it alongside this skill's scripts\n- **rdkit-chemdraw-cdxml** — draw the reaction as a 2D scheme figure\n\n## References\n\n- [xtb documentation](https:\u002F\u002Fxtb-docs.readthedocs.io\u002F) — GFN2-xTB methods and CLI\n- [pysisyphus documentation](https:\u002F\u002Fpysisyphus.readthedocs.io\u002F) — COS\u002FNEB, TS optimizers, IRC\n- Bannwarth, Ehlert, Grimme, *J. Chem. Theory Comput.* 2019, 15, 1652 — GFN2-xTB method paper\n- Steinmetzer, Kupfer, Gräfe, *Int. J. Quantum Chem.* 2021, 121, e26550 — pysisyphus paper\n- [ASE](https:\u002F\u002Fwiki.fysik.dtu.dk\u002Fase\u002F) \u002F [PySCF](https:\u002F\u002Fpyscf.org\u002F) — geometry I\u002FO and DFT single points\n",{"name":5,"license":15,"description":7},"master","63f17866001c5ca854bf2fa0b678ce277133de5b","skills\u002Fawesome-skills\u002Fneb-irc-activation-energy",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 neb-irc-activation-energy",{"tool":40,"command":41},"bunx","bunx skills add bg-szy\u002FTOP-SKILLS --skill neb-irc-activation-energy",{"tool":43,"command":44},"pnpm","pnpm dlx skills add bg-szy\u002FTOP-SKILLS --skill neb-irc-activation-energy","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fawesome-skills\u002Fneb-irc-activation-energy\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",[],[]]