How zmactep/patinae works
Patinae is a GPU-first molecular viewer and toolkit for interactive research, structural analysis, scripting, and embedding. Its principal workflow is to load molecular structures, manipulate and analyze them through commands and selections, then display, inspect, and save the resulting scene or session. The repository separates molecular I/O, domain and scene state, command execution, analysis, rendering, and plugin integration, with native, Python, and web entry points. Several implementation details are not shown in the excerpts; links below rely on the README or explicit SOURCE INDEX references.
Main entry points: executor.rs Command runtime · host.rs Plugin host · app.rs Desktop app · traits.rs Structure I/O
Components 20
Core workflow
- Command runtime
crates/patinae-cmd/src/executor.rs - Application kernel
crates/patinae-framework/src/kernel.rs - Structure I/O
crates/patinae-io/src/traits.rs - Format readers
crates/patinae-io/src/pdb/parser.rs - Session interchange
crates/patinae-session/src/prs.rs
Molecular science
- Molecular model
crates/patinae-mol/src/molecule.rs - Selection language
crates/patinae-select/src/parser.rs - Structure analysis
crates/patinae-algos/src/align/kabsch.rs - Crystal symmetry
crates/patinae-algos/src/symmetry/crystal.rs - Molecular mechanics
crates/patinae-mm/src/energy.rs
Scene and rendering
- Scene session
crates/patinae-scene/src/session.rs - GPU renderer
crates/patinae-render/src/context.rs
Extensions
- Plugin host
crates/patinae-plugin-host/src/host.rs - Plugin SDK
crates/patinae-plugin/src/registrar.rs - Raytracer plugin
plugins/raytracer/src/pipeline.rs - AI plugin
plugins/ai/src/worker.rs
User interfaces
- Desktop app
patinae/src/app.rs - Web viewer
web/src/bridge.rs - Python API
python/src/lib.rs
Other components
- Researcher
Connections 19
- Researcher → Desktop app: uses
README.md - Researcher → Web viewer: uses
README.md - Researcher → Python API: scripts with
README.md - Desktop app → Command runtime: issues commands
README.md - Command runtime → Application kernel: runs through
- Command runtime → Structure I/O: loads and saves
README.md - Structure I/O → Format readers: dispatches formats
crates/patinae-io/src/traits.rs - Format readers → Molecular model: parses structures
crates/patinae-io/src/pdb/parser.rs - Command runtime → Selection language: evaluates selections
README.md - Command runtime → Structure analysis: runs alignment
README.md - Command runtime → Crystal symmetry: expands symmetry
README.md - Command runtime → Molecular mechanics: uses mechanics
- Command runtime → Scene session: changes scene
- Scene session → GPU renderer: feeds viewport
README.md - Command runtime → Session interchange: saves and loads
README.md - Desktop app → Plugin host: hosts plugins
README.md - Plugin SDK → Plugin host: registers extensions
- Plugin host → Raytracer plugin: loads plugin
README.md - Plugin host → AI plugin: loads plugin