Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

feat(cli): Implement place Subcommand and Core CLI Framework#23

Merged
TKanX merged 118 commits intomainfrom
feature/22-implement-cli-place-subcommand-for-core-workflow-execution
Aug 5, 2025
Merged

feat(cli): Implement place Subcommand and Core CLI Framework#23
TKanX merged 118 commits intomainfrom
feature/22-implement-cli-place-subcommand-for-core-workflow-execution

Conversation

@TKanX
Copy link
Member

@TKanX TKanX commented Aug 5, 2025

Summary:

Introduces a comprehensive command-line interface (scream-cli) to drive the core scream-core workflows. The centerpiece is the place subcommand, which provides a rich set of options for protein sidechain placement, configuration overrides, and parallel execution. The CLI is built on a robust framework that includes asynchronous execution with Tokio, a sophisticated configuration merging system, a local data manager for handling forcefields and rotamer libraries, and an interactive terminal UI for progress reporting.

Changes:

  • Implemented place Subcommand:

    • Created a place subcommand using clap to execute the core placement workflow.
    • Supports essential arguments like --input, --output, and --config.
    • Implemented a rich set of CLI flags to override specific configuration values, such as --s-factor, --num-solutions, --no-refinement, and a generic --set KEY=VALUE option.
  • Developed a Sophisticated Configuration System:

    • Implemented a layered configuration system that loads settings from a TOML file and merges them with overrides from CLI arguments.
    • The system intelligently resolves logical names for data files (e.g., amber@rmsd-1.0) into actual file paths using the DataManager.
  • Created a Local Data Management System:

    • data Subcommand: Implemented a new command to manage local data, including download, path, set-path, and reset-path.
    • DataManager: A struct responsible for handling the default data directory, downloading data packs from a remote source, and resolving logical names to file paths.
  • Introduced an Interactive Terminal UI:

    • UiManager: Developed an asynchronous UI manager using tokio and indicatif.
    • It displays multi-line progress bars for phases and tasks, spinners for indeterminate operations, and integrates seamlessly with tracing for log output without corrupting the progress display.
    • The UI is driven by a ProgressReporter callback system from scream-core, decoupling the core logic from its presentation.
  • Established CLI Application Framework:

    • main.rs: Set up an asynchronous tokio runtime to manage the UI and workflow tasks concurrently.
    • logging.rs: Implemented a tracing setup that directs logs to both a file and the UiManager for console display.
    • error.rs: Defined a central CliError enum for structured and user-friendly error handling.
    • Organized code into logical modules: cli, commands, config, data, ui, etc.

TKanX added 30 commits July 29, 2025 23:16
… rotamer libraries, forcefields, delta params, and placement registries
TKanX added 19 commits August 4, 2025 09:20
@TKanX TKanX requested a review from Copilot August 5, 2025 20:45
@TKanX TKanX self-assigned this Aug 5, 2025
@TKanX TKanX added the enhancement ✨ New feature or request label Aug 5, 2025
@TKanX TKanX linked an issue Aug 5, 2025 that may be closed by this pull request
26 tasks
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a comprehensive command-line interface (scream-cli) for the scream-core library, enabling users to execute protein side-chain placement with rich configuration options, parallel execution, and interactive progress reporting. The implementation follows a robust architectural pattern with asynchronous task management, sophisticated configuration merging, and a local data management system.

  • Implements the core place subcommand with extensive CLI arguments and configuration file support
  • Establishes a local data management system with download capabilities and file resolution
  • Integrates an interactive terminal UI with progress bars and real-time status updates

Reviewed Changes

Copilot reviewed 27 out of 32 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
crates/scream-core/src/workflows/place.rs Updates to workflow signatures and parameterization integration
crates/scream-core/src/engine/progress.rs Enhanced progress reporting with new event types
crates/scream-core/src/core/models/residue.rs Improved atom name handling for duplicate atoms
crates/scream-core/src/engine/placement.rs Better error handling and atom pool management
crates/scream-cli/src/main.rs Async application framework with UI management
crates/scream-cli/src/cli.rs Comprehensive CLI argument parsing and validation

@TKanX TKanX force-pushed the feature/22-implement-cli-place-subcommand-for-core-workflow-execution branch from 1da8480 to 214cf4e Compare August 5, 2025 21:38
@TKanX TKanX merged commit f1cf729 into main Aug 5, 2025
2 checks passed
@TKanX TKanX deleted the feature/22-implement-cli-place-subcommand-for-core-workflow-execution branch August 5, 2025 21:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement ✨ New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement CLI place Subcommand for Core Workflow Execution

2 participants