Skip to main content

Project Structure

A ChimeraX bundle project generated by echi init has the following structure:

my-tool/
├── pyproject.toml # Bundle metadata and build config
├── src/
│ ├── __init__.py # Bundle initialization
│ └── cmd.py # Command implementation (varies by bundle type)
├── tests/ # Test files (for echi test)
│ └── test_*.py # pytest test modules
├── scripts/
│ └── smoke.cxc # Smoke test script
└── README.md

Key Files

pyproject.toml

The central configuration file for your bundle. Contains:

  • Bundle metadata (name, version, description)
  • ChimeraX-specific configuration (commands, tools, etc.)
  • Build system configuration

src/

Source code for your bundle. The layout depends on the bundle type:

Bundle TypeMain Source File
commandsrc/cmd.py
tool, tool-htmlsrc/tool.py
formatsrc/open.py
fetchsrc/fetch.py
selectorsrc/selector.py
presetsrc/preset.py
cppsrc/chimerax/<package>/cmd.py + _extension.cpp

scripts/smoke.cxc

A ChimeraX command script for quick smoke testing. Run with:

echi test --smoke

tests/

Directory for pytest test files. Run with:

echi test