Skip to content

Hello-QM/catgo-LRG / server/catgo/workflow

catgo-workflow

Verified

Create and manage computational chemistry workflows with CatGo. Supports VASP, CP2K, ORCA, MLP, LAMMPS. Build OER/HER/CO2RR workflows, geometry optimization, frequency analysis, Gibbs energy calculations.

FileKindSize
SKILL.mdskill md3.8 KB
__init__.pyscript1.1 KB
builtins.pyscript4.7 KB
builtins_impl.pyscript21.2 KB
config.pyscript6.5 KB
db.pyscript25.3 KB
engine/__init__.pyscript615 B
engine/advancer.pyscript9.3 KB
engine/ai_diagnosis.pyscript3.8 KB
engine/batch_submitter.pyscript9.7 KB
engine/broadcast.pyscript1.8 KB
engine/collector.pyscript8.3 KB
engine/control_flow.pyscript5.7 KB
engine/engine_builtins.pyscript19.6 KB
engine/engine_registry.pyscript1.5 KB
engine/error_handler.pyscript3.6 KB
engine/hpc_utils.pyscript4.0 KB
engine/job_script.pyscript11.6 KB
engine/lifecycle.pyscript10.8 KB
engine/orca_progress.pyscript3.4 KB
engine/poller.pyscript11.7 KB
engine/resolver.pyscript2.7 KB
engine/result_collector.pyscript56.3 KB
engine/result_handler.pyscript5.6 KB
engine/scanner.pyscript52.0 KB
engine/smart_recovery.pyscript3.6 KB
engine/submitter.pyscript26.2 KB
engine/v1_monitor.pyscript2.7 KB
engine/vasp_submission.pyscript29.0 KB
graph_converter.pyscript6.5 KB
mcp_tools.pyscript7.5 KB
provenance.pyscript5.8 KB
reference.pyscript1.1 KB
service.pyscript4.0 KB
state_map.pyscript1.5 KB
states.pyscript7.5 KB
task_decorator.pyscript2.5 KB
task_ids.pyscript986 B
v1_compat.pyscript2.8 KB
workflow.pyscript12.0 KB

engine/orca_progress.py

View on GitHub
"""Pure ORCA stdout-tail parsers for calculation-stage progress.

Engine-internal helpers with no FE/wire-format dependencies. Used by the
poller to derive a coarse-grained progress stage from the tail of an ORCA
output file (geometry-opt/freq via :func:`get_orca_stage`, IRC via
:func:`get_orca_irc_stage`).
"""

from __future__ import annotations
import re


def get_orca_stage(tail_text: str) -> dict:
    """Parse ORCA output tail to determine current calculation stage.

    Markers are listed in chronological order. Returns the latest stage found.
    """
    stage_markers = [
        ("SCF ITERATIONS", "scf", "Converging SCF..."),
        ("Hessian", "hessian", "Setting up Hessian..."),
        ("Calculating the COSX Hessian", "hessian_cosx", "Computing Hessian (slowest step, ~54% of runtime)..."),
        ("Calculating normal modes", "normal_modes", "Deriving normal modes..."),
        ("VIBRATIONAL FREQUENCIES", "frequencies", "Computing vibrational frequencies..."),
        ("Thermochemistry", "thermochem", "Calculating thermochemistry..."),
        ("ORCA TERMINATED NORMALLY", "done", "Calculation complete"),
    ]
    current: dict = {"stage": "starting", "message": "Starting calculation..."}
    for marker, stage_key, message in stage_markers:
        if marker in tail_text:
            current = {"stage": stage_key, "message": message}
    return current


def get_orca_irc_stage(tail_text: str) -> dict:
    """Parse ORCA IRC output tail to determine current phase and step counts.

    Returns a dict with stage, message, and optional progress fields:
      hessian_current / hessian_total  — during numerical Hessian
      forward_steps / backward_steps   — during IRC path following
    """
    # Check phases in reverse chronological order so we return the latest
    if "BACKWARD IRC" in tail_text:
        # Count completed backward steps from the last step-data line pattern
        steps = re.findall(
            r"^\s+(\d+)\s+[-\d.]+\s+[-\d.]+\s+[\d.]+\s+[\d.]+",
            tail_text[tail_text.rfind("BACKWARD IRC"):],
            re.MULTILINE,
        )
        n = int(steps[-1]) + 1 if steps else 0
        return {"stage": "irc_backward", "message": f"Backward IRC: {n} step(s)", "backward_steps": n}

    if "FORWARD IRC" in tail_text:
        steps = re.findall(
            r"^\s+(\d+)\s+[-\d.]+\s+[-\d.]+\s+[\d.]+\s+[\d.]+",
            tail_text[tail_text.rfind("FORWARD IRC"):],
            re.MULTILINE,
        )
        n = int(steps[-1]) + 1 if steps else 0
        return {"stage": "irc_forward", "message": f"Forward IRC: {n} step(s)", "forward_steps": n}

    if "Calculating gradient on displaced geometry" in tail_text:
        # Find the highest displacement number seen so far
        matches = re.findall(
            r"Calculating gradient on displaced geometry\s+(\d+) \(of\s+(\d+)\)",
            tail_text,
        )
        if matches:
            current_n, total_n = int(matches[-1][0]), int(matches[-1][1])
            return {
                "stage": "irc_hessian",
                "message": f"Computing Hessian ({current_n}/{total_n})...",
                "hessian_current": current_n,
                "hessian_total": total_n,
            }
        return {"stage": "irc_hessian", "message": "Computing Hessian..."}

    if "Energy+Gradient Calculation" in tail_text:
        return {"stage": "irc_initial", "message": "Computing initial TS energy..."}

    return {"stage": "starting", "message": "Starting IRC calculation..."}
planning-and-task-breakdownaddyosmani/agent-skillsBreaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
screenpipethedotmack/claude-memSearch screen and audio history recorded by Screenpipe and optionally save selected context into claude-mem. Use when the user asks to recall desktop activity, a meeting, or something seen in another app through Screenpipe.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
contact-widgetnexu-io/open-designSelf-contained floating chat widget with welcome screen, social links, meeting button, and message input. Single HTML file, zero dependencies.Stars: 108kUpdated Claude CodeCodexVerifiedInstall
meeting-notesnexu-io/open-designMeeting notes page — title bar with attendees, agenda checklist, decisions block, action items table with owners + dates, and a "next meeting" footer. Use when the brief mentions "meeting notes", "minutes", "1:1 notes", "all-hands recap", or "会议纪要".Stars: 108kUpdated Claude CodeCodexVerifiedInstall