Tool System¶
The tool system is the core of codemol. Every action — loading structures, measuring distances, changing representations — is implemented as a tool module.
Key Concepts¶
- Tool — A Python module with a
run()function - Tool group — A directory containing related tools (e.g.,
tools/measurements/) - Auto-discovery — Tools are found at startup by scanning the
tools/directory - Dispatch — The runtime that routes commands to tools, handles argument fitting and scoping
27+ Groups, 200+ Tools¶
| Group | Tools | Purpose |
|---|---|---|
io |
load, clear, density, project | File I/O and PDB fetching |
representations |
cartoon, sticks, surface, ... (15) | Visual representations |
color |
bychain, byelement, spectrum, ... (10) | Coloring schemes |
measurements |
distance, angle, dihedral, contacts, ... (11) | Structural measurements |
analysis |
align, rmsd, clashes, pockets, ... (17) | Structural analysis |
interactions |
hbonds, saltbridges, pistacking, ... (6) | Interaction detection |
visibility |
show, hide | Object visibility |
selection |
select, nearby | Selection management |
labels |
label, smart, font, color, ... (9) | Atom/residue labels |
camera |
orient, zoom, turn, clip | Camera controls |
presets |
publication, presentation, ... (14) | One-click visual presets |
surface |
area, transparency, type | Surface analysis |
edit |
hadd, remove, alter, extract, ... (13) | Structure editing |
rendering |
lighting, background, shadows, ... (11) | Render settings |
docking |
load, info, cluster, split, ... (9) | Docking analysis |
trajectory |
load, play, rmsd, align, ... (8) | MD trajectories |
session |
save, load, list, update, delete | Session management |
timeline |
add, recall, list, export, ... (8) | Scene timeline |
crystal |
symexp, contacts, info | Crystal symmetry |
share |
create, join, status, stop, ... (6) | Shared sessions |
agents |
list, use, stop, status, config | AI agent control |
export |
png, ray | Image export |
search |
search, load | PDB search |
config |
list, set, interactive, dirs | Configuration |
info |
atoms, mass, ligand, list | Structure info |
movie |
setup, play, rock, export, stop | Movie creation |
media |
list, open, rename, delete | Media management |
alias |
alias | Command aliases |
Sections¶
- How Tools Work — The
run()contract and dispatch mechanics - Adding a New Tool — Step-by-step guide
- Selection Aliases — Built-in aliases and overrides
- Scoping — Multi-structure scoping