Skip to main content

ORCA high-throughput pipeline orchestrator

Project description

Orcastrator

Orcastrator is a Python toolkit and CLI for automating ORCA quantum-chemistry calculations.

Features:

  • Simple TOML-based configuration
  • Automatic directory and scratch management
  • Multi-stage pipelines with caching and chaining (opt → freq → sp)
  • Parallel execution across molecules
  • SLURM batch script generation

Version: 3.0.0 License: MIT Requirements: Python ≥3.11

Installation

uv tool install orcastrator

Quickstart

  1. Generate a template configuration:

    orcastrator init
    
  2. Edit orcastrator.toml:

    # Core paths (relative to this file)
    output_dir = "output"
    molecules_dir = "molecules"
    
    # Resources
    cpus = 8
    mem_per_cpu_gb = 4
    workers = 2
    scratch_dir = "/scratch"
    
    # Workflow settings
    overwrite = false
    debug = false
    
    # Molecule filtering (optional)
    # include = ["mol1", "mol2"]
    # exclude = ["mol3"]
    rerun_failed = false
    
    # Pipeline stages
    [[stages]]
    name = "opt"
    keywords = ["D4", "TPSS", "def2-SVP", "OPT"]
    
    [[stages]]
    name = "freq"
    keywords = ["D4", "TPSS", "def2-SVP", "FREQ"]
    keep = ["*.gbw"]  # Copy wavefunction from previous stage
    
    [[stages]]
    name = "sp"
    keywords = ["D4", "TPSSh", "def2-TZVP"]
    keep = ["*.gbw"]
    
  3. Run the pipeline:

    orcastrator run orcastrator.toml
    
  4. (Optional) Submit to SLURM:

    orcastrator slurm orcastrator.toml
    orcastrator slurm --no-submit orcastrator.toml  # just generate script
    

Configuration Reference

Core Settings

  • output_dir - Output directory for results (relative to config file)
  • molecules_dir - Directory containing .xyz files (relative to config file)
  • cpus - Total CPU cores available
  • mem_per_cpu_gb - Memory per CPU core in GB
  • workers - Number of parallel workers (molecules processed simultaneously)
  • scratch_dir - Scratch directory for temporary files (default: /scratch)

Workflow Settings

  • overwrite - Rerun all calculations (default: false)
  • debug - Enable debug logging (default: false)
  • include - List of molecule names to include (optional)
  • exclude - List of molecule names to exclude (optional)
  • rerun_failed - Only rerun previously failed molecules (default: false)

SLURM Settings (Optional)

  • nodelist - SLURM node list (e.g., ["node001", "node002"])
  • exclude_nodes - SLURM nodes to exclude
  • timelimit - SLURM time limit (format: HH:MM:SS)

Stage Configuration

Each [[stages]] block defines a calculation step:

  • name - Unique stage identifier
  • keywords - ORCA keywords (e.g., ["OPT", "TPSS", "def2-SVP"])
  • blocks - Additional ORCA % blocks (e.g., ["%scf maxiter 150 end"])
  • mult - Override multiplicity for this stage (optional)
  • charge - Override charge for this stage (optional)
  • keep - File patterns to copy from previous stage (e.g., ["*.gbw", "*.xyz"])

Architecture

Orcastrator 3.0.0 uses a streamlined architecture for better maintainability:

src/
├── config.py    # Pydantic-based configuration
├── molecule.py  # Molecule representation
├── engine.py    # ORCA execution and scratch management
├── runner.py    # Parallel workflow execution
└── cli.py       # Command-line interface

Key improvements in 3.0.0:

  • 27% code reduction (1,775 → 1,303 lines)
  • Flat configuration structure (no unnecessary nesting)
  • ProcessPoolExecutor for parallel execution
  • Content hashing for cache validation
  • Loguru for structured logging

Migration from 2.0.x

Version 3.0.0 is backward compatible. Legacy config format is automatically converted:

Old format (still works):

[main]
cpus = 4

[molecules]
directory = "molecules"

[[step]]
name = "opt"

New format (recommended):

cpus = 4
molecules_dir = "molecules"

[[stages]]
name = "opt"

No changes required to existing workflows.

Examples

Basic Optimization and Frequency

output_dir = "results"
molecules_dir = "molecules"
cpus = 4
mem_per_cpu_gb = 2

[[stages]]
name = "opt"
keywords = ["OPT", "B3LYP", "def2-SVP"]

[[stages]]
name = "freq"
keywords = ["FREQ", "B3LYP", "def2-SVP"]
keep = ["*.gbw"]

High-Level Single Point

output_dir = "results"
molecules_dir = "molecules"
cpus = 8
mem_per_cpu_gb = 4
workers = 2

[[stages]]
name = "opt"
keywords = ["OPT", "TPSS", "def2-SVP", "D4"]

[[stages]]
name = "sp"
keywords = ["DLPNO-CCSD(T)", "def2-TZVPP", "def2-TZVPP/C"]
blocks = ["%scf maxiter 200 end"]
keep = ["*.gbw"]

Selective Processing

output_dir = "results"
molecules_dir = "molecules"
cpus = 4

# Only process specific molecules
include = ["benzene", "toluene", "phenol"]

[[stages]]
name = "opt"
keywords = ["OPT", "PBE0", "def2-TZVP"]

XYZ File Format

Molecule files should include charge and multiplicity in the comment line:

JSON format (recommended):

12
{"charge": 0, "mult": 1}
C    0.000000    0.000000    0.000000
H    1.089000    0.000000    0.000000
...

Simple format:

12
charge=0 mult=1
C    0.000000    0.000000    0.000000
H    1.089000    0.000000    0.000000
...

Development

Dependencies:

  • click - CLI framework
  • pydantic - Configuration validation
  • loguru - Structured logging
  • jinja2 - SLURM template rendering
  • toml - Configuration parsing

Testing:

uv run python -m src.cli --version
uv run python -m src.cli init --slim

Project structure:

  • src/ - Main codebase (3.0.0)
  • orcastrator/ - Legacy codebase (2.0.x, deprecated)
  • test/ - Integration tests

License

MIT License - see LICENSE file for details.

Project details


Release history Release notifications | RSS feed

This version

3.0.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

orcastrator-3.0.0.tar.gz (28.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

orcastrator-3.0.0-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file orcastrator-3.0.0.tar.gz.

File metadata

  • Download URL: orcastrator-3.0.0.tar.gz
  • Upload date:
  • Size: 28.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.9

File hashes

Hashes for orcastrator-3.0.0.tar.gz
Algorithm Hash digest
SHA256 2cf1513b0db8266c058d164d9f87b27c89d13282ab254a0242d696713a79dd30
MD5 31ac915190b17a125791c40dbfba58d7
BLAKE2b-256 959c1a01d1b4074768b06a0ca6fe1de7ac6bfeb7e30319b67036f4385bbac0b4

See more details on using hashes here.

File details

Details for the file orcastrator-3.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for orcastrator-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d1d4558b5299d37f9e9997584bf8728915e2edae579032fc26c1e02450545786
MD5 d8051eff93c7249aa1b5d4897fdbe9d3
BLAKE2b-256 a0a5922c2835c7a2ba45219fe50657200283fc0d1c7db3dc4c5c1b7ccefe1386

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page