This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
ChimeraX is a molecular visualization application built with a plugin architecture called "bundles". The codebase is ~80% Python 3.11, ~20% C++, using Qt for the GUI.
make install # Full build including 50+ third-party dependencies
make build-minimal # Core components only
make uv-build # Modern uv-based build (faster)make test # Run all tests
make src.test # Run source tests only
pytest # Run pytest directlymake clean # Clean build artifacts
make distclean # Full clean including dependenciesChimeraX functionality is organized into "bundles" (plugins). Each bundle is a Python package with specific metadata.
bundle_name/
├── pyproject.toml # Modern config (preferred)
├── bundle_info.xml # Legacy config
├── src/ # Bundle source code
│ ├── __init__.py # BundleAPI implementation
│ ├── cmd.py # Command implementations
│ └── tool.py # GUI tools
├── tests/ # Bundle tests
└── Makefile # Build configuration
# From within a bundle directory:
make install # Build and install bundle
make wheel # Build Python wheel
make test # Run bundle tests
make install-editable # Install a bundle in editable mode for development
make uv-install # Fast install with uv
make uv-install-editable # Editable install for development
# Using ChimeraX devel commands:
devel install PATH # Build and install bundle
devel build PATH # Build wheel only
devel clean PATH # Clean build filesModern bundles use pyproject.toml with ChimeraX-specific sections:
[tool.chimerax]
min-session-version = 1
max-session-version = 1
categories = ["General"]
[tool.chimerax.command.mycommand]
category = "General"
description = "My custom command"
[tool.chimerax.tool."My Tool"]
category = "General"
description = "My custom tool"- src/bundles/core/: Fundamental APIs and infrastructure
- src/bundles/ui/: User interface framework
- src/bundles/atomic/: Molecular structure representation
- src/bundles/graphics/: 3D rendering and visualization
- Bundles declare dependencies in their configuration
- Runtime lazy loading for performance
- Each bundle implements a
BundleAPIclass as the interface to ChimeraX core - Commands, tools, file formats, and other features are registered through bundle APIs
- GNU Make with platform-specific configurations (Windows, macOS, Linux)
- Complex dependency management through
prereqs/system - Both traditional make and modern uv-based workflows supported
- src/bundles/: All bundle implementations (~100+ bundles)
- src/apps/: Application launchers and executables
- prereqs/: Third-party dependencies and custom Python build
- mk/: Build system configuration files
- docs/: Developer and user documentation
Do not run compilation, build, or test commands. This is a GUI application that is difficult to validate without eyes. The developer will test changes manually. Running build commands or test harnesses wastes context with irrelevant output.
Do not ask "would you like me to build/test this?" - just make the code changes and move on.
- Bundle APIs must be implemented in
src/__init__.py - Use
APP_PYTHON_EXEvariable for the ChimeraX Python executable - Tests use pytest with special ChimeraX session fixtures
- Modern bundles should prefer
pyproject.tomloverbundle_info.xml - The
toolshedcommand manages bundle installation/removal in built ChimeraX - When modifying code, add tests to cover the changes. Tests go in
tests/at the repo root or in bundle-specifictests/directories.