A Moorhen fork that quacks like a Coot.
PyKeko is a macOS desktop application for the interactive macromolecular visualization and model building of structures determined by X-ray crystallography and cryo-EM.
Under the hood it is Moorhen, Coot's C++ engine (libcootapi, CCP4, Clipper, MMDB, GEMMI, RDKit) compiled to WebAssembly and wrapped in a TypeScript/React interface. PyKeko packages that into a self-contained, one-click .app/.dmg and tunes it to feel like Coot 0.9.x - with similar keyboard shortcuts, defaults, and workflow primitives — while adding features of its own: a PyMOL command-language scripting console and a PyMOL--R-style RPC server, command-line integration, a residue torsion editor, Claude-MCP control, and more.
Named for the pūkeko bird — the Australasian swamphen — a New Zealand cousin of coots and moorhens.
PyKeko is an independent project not affiliated with or endorsed by the Moorhen or Coot teams — but built on their extensive work (see Credits).
Coot 0.9.x renders through XQuartz/GLX, which does not work on recent macOS versions (Tahoe done broke it). PyKeko requires no XQuartz, no CCP4 install, and no compiler — download the .dmg and go. A lot of crystallographers miss the the feel of pre-v1.0 Coot...
⬇ Download the latest PyKeko.dmg · Full install guide
- Open the DMG and drag PyKeko to your Applications folder.
- First launch (the build is unsigned): right-click the app → Open, or run
xattr -dr com.apple.quarantine /Applications/PyKeko.app.
Already on an earlier version? See upgrading — your settings and the pykeko command-line tool carry over.
Requires macOS 15.x (Tahoe) on Apple Silicon. Nothing else to install — Electron, the WebAssembly Coot engine, and the monomer libraries are all bundled. Fully offline except for "Fetch from PDB".
A rolling snapshot of the bigger additions across the 0.2.x line. Full per-release notes →
- Real desktop session save/restore —
File → Save session…writes a single.pykekofile (full scene: molecules, maps, per-rep colour rules, camera, vectors, 2D overlays, view settings);Open session…rehydrates it. Drag-drop onto the window also works. - Portable Mol* viewer export —
File → Export portable viewer (.html)produces a single self-contained HTML file (Mol* under the hood) that reproduces your visible scene (representations, colour rules, ligand spheres, density …) for sharing or embedding. Optional density map embedding gives a "rolling cube" that tracks the recipient's camera, à la Coot. - Shell-style scripting history —
Calculate → Interactive scripting's modal now has per-mode↑/↓history,Cmd/Ctrl+Enterto submit, and persistence across reloads. Works for both PyMOL and JavaScript modes. - Command-line integration —
pykeko model.pdb data.mtz ligand.cifopens files (the.cifattaching as a dictionary, not spawning a new molecule);pykeko 7sj3fetches by PDB id;pykeko script.pmlruns a PyMOL-style script. A second launch ofpykekohands its files to the running window (PyMOL-Rstyle);--newopens a fresh one. Install the command from Preferences → Install command-line launcher. - Residue torsion editor — right-click a residue → Edit torsions: rotate φ/ψ/χ angles with a live Ramachandran plot tracking the sliders.
pykeko_remote.py— a PyMOL--R-style Python client that drives a running PyKeko from your own scripts (load / refine / screenshot / run PyMOL commands / …).- Coot-style defaults — black background, hydrogens shown when present, PyMOL as the default scripting language. Updated keyboard shortcuts shown with
'm'.
Model building (inherited from Coot, via Moorhen). Real-space refinement (single → triple → sphere → chain → all), rotamer fitting, peptide flips, mutations, add/delete of atoms and residues, terminal-residue building, jiggle fit, ligand fitting, map manipulation and contouring, geometry/validation analysis, and reading/writing PDB, mmCIF, MTZ, and CCP4/MRC maps — all locally, no server.
Added by PyKeko on top of Moorhen:
| Area | What you get |
|---|---|
| Command line | open files, fetch by PDB id, run .pml scripts, ligand-dictionary auto-attach, single-instance file handoff |
| PyMOL scripting | run PyMOL commands inside the app — a command-language translator in Interactive Scripting: full selection algebra, representations, colours, measurements, and settings; .pml files run directly |
| PyMOL RPC server | drive a running PyKeko from outside — a built-in localhost RPC control server (PyKeko's take on PyMOL's -R), scripted from Python via the bundled pykeko_remote.py client, or from Claude via PyKekoMCP |
| Torsion editor | backbone φ/ψ + sidechain χ sliders with a live Ramachandran plot |
| NCS ghosts | overlay every NCS-related chain transformed onto a chosen master chain (g) |
| Cyclers | step through validation outliers (n), difference-map peaks (p), ligands (l), and NCS mates (o) straight from the keyboard |
| Coot ergonomics | Coot 0.9-style shortcuts and defaults, single-water-at-crosshairs (w), drag-atoms-with-refinement (d) |
Full keyboard-shortcut table and per-feature writeups: Moorhen-PyKeko/README-MH.md · PyMOL command reference: docs/pymol-translator.md.
Brief map below — each repo's own README goes in-depth on its internals.
| Repo | What it is |
|---|---|
| Moorhen-PyKeko | The fork of moorhen-coot/Moorhen: the TypeScript/React UI plus the WebAssembly Coot engine, with PyKeko's added C++ bindings, in-page control bridge, PyMOL translator, and Coot-style UX. The app's brains. |
| PyKeko | The Electron wrapper that turns the web app into a native macOS .app / .dmg, serves the bundle, runs the token-authenticated control server, and installs the pykeko command. The shell. |
| PyKekoMCP | A Model Context Protocol server that lets Claude drive a running PyKeko — load coordinates/maps, navigate, refine, edit, screenshot. The Claude bridge. |
| .github | Org-level files: this profile page and the shared issue templates. |
PyKeko exists only because of the work it builds on:
- Moorhen — the Moorhen team's WebAssembly port of Coot and its React UI. PyKeko is a fork of their project, under their BSD-3-Clause license.
- Coot — Paul Emsley and the Coot developers (MRC-LMB), the original program this whole lineage descends from.
- CCP4, Clipper, MMDB, GEMMI, RDKit, and the other libraries Moorhen compiles to WebAssembly.
Licenses: PyKeko and PyKekoMCP are MIT; Moorhen-PyKeko follows upstream Moorhen's BSD-3-Clause license. See each repo's LICENSE.