Skip to content

Add GoFlow and RitS TS search adapters#887

Open
alongd wants to merge 6 commits into
mainfrom
goflow
Open

Add GoFlow and RitS TS search adapters#887
alongd wants to merge 6 commits into
mainfrom
goflow

Conversation

@alongd
Copy link
Copy Markdown
Member

@alongd alongd commented May 7, 2026

Summary

Adds GoFlow and RitS, two flow-matching ML TS-guess adapters, sharing
the same lifecycle, the same Tier-1 / Tier-2 test split, and the same
"warn + skip" behavior when their respective env (goflow_env / rits_env)
or pretrained checkpoint is unavailable.

  • GoFlow — flow-matching, E(3)-equivariant network that predicts TS
    geometries from atom-mapped reactant + product SMILES. RDB7-trained, so it
    enforces a runtime domain guard ({H, C, N, O, F}, ≤100 atoms) and is
    not added to all_families_ts_adapters. Now part of the default
    ts_adapters list (replaces GCN and xtb_gsm in the default).
  • RitS — flow-matching network that predicts TS geometries directly from
    atom-mapped reactant + product 3D structures. Handles bimolecular
    reactions and charged species, so it is added to
    all_families_ts_adapters. Heavyweight env, kept opt-in only via
    ts_adapters: ['rits', ...].

Sister-repo path discovery is consolidated into a single
arc/settings/external_paths.py (with matching test module). Both adapters
are inlined into the main CI lane (cached env + checkpoint per adapter), so
their Tier-2 end-to-end tests actually run on every PR.

Sources

GoFlow

RitS

@alongd alongd requested review from Copilot and kfir4444 May 7, 2026 18:57
Copy link
Copy Markdown

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

Note

Copilot was unable to run its full agentic suite in this review.

Adds GoFlow as a TS-guess adapter in ARC, with an installer, settings discovery, and CI coverage for a CPU-only GoFlow lane.

Changes:

  • Added GoFlow TS adapter + subprocess-based inference script (keeps heavy ML deps out of ARC’s main env)
  • Added GoFlow installer + wiring into install_all.sh, Makefile, and a dedicated CI job
  • Added settings finders + Tier-1/Tier-2 unit tests for settings, adapter helpers, and end-to-end execution

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
devtools/install_goflow.sh New installer for cloning goflow_lean, creating goflow_env, and acquiring/validating artifacts
devtools/install_all.sh Adds optional GoFlow install step and --no-goflow flag + flag whitelist entry
arc/settings/settings_test.py Unit tests for GoFlow settings finders and exported globals
arc/settings/settings.py Adds GoFlow to settings globals and adds helper functions to find repo/ckpt/feat_dict
arc/main_test.py Updates expected serialized ts_adapters list to include goflow
arc/job/adapters/ts/goflow_ts.py New JobAdapter implementation for GoFlow TS guesses
arc/job/adapters/ts/goflow_test.py Tier-1 helper tests + Tier-2 env-gated end-to-end tests
arc/job/adapters/ts/init.py Imports GoFlow adapter module so it registers
arc/job/adapters/scripts/goflow_script_test.py Tests for stdlib-only helper functions in the GoFlow script
arc/job/adapters/scripts/goflow_script.py New standalone GoFlow inference runner executed inside goflow_env
arc/job/adapters/common.py Includes goflow in default_incore_adapters
arc/job/adapter.py Adds JobEnum.goflow
Makefile Adds install-goflow target and excludes GoFlow from install-ci
.github/workflows/ci.yml Adds a dedicated GoFlow install + test job (CPU lane) with caching

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread arc/settings/settings.py Outdated
Comment thread arc/settings/settings.py Outdated
Comment thread arc/settings/settings.py Outdated
Comment thread arc/settings/settings_test.py Outdated
Comment thread arc/settings/settings_test.py Outdated
Comment thread arc/job/adapters/ts/goflow_ts.py Outdated
Comment thread arc/job/adapters/ts/goflow_ts.py Outdated
Comment thread devtools/install_goflow.sh Outdated
Comment thread devtools/install_goflow.sh Outdated
Comment thread .github/workflows/ci.yml Outdated
Comment thread arc/job/adapters/scripts/goflow_script_test.py Fixed
Comment thread arc/job/adapters/ts/goflow_test.py Fixed
Comment thread arc/job/adapters/ts/goflow_test.py Fixed
Comment thread arc/job/adapters/ts/goflow_test.py Fixed
Comment thread arc/job/adapters/ts/goflow_test.py Fixed
Comment thread arc/job/adapters/ts/goflow_test.py Fixed
Comment thread arc/job/adapters/ts/goflow_test.py Fixed
Comment thread arc/job/adapters/ts/goflow_test.py Fixed
Comment thread arc/job/adapters/ts/goflow_test.py Fixed
Comment thread arc/settings/settings_test.py Fixed
@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.79%. Comparing base (5869abc) to head (370348e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #887      +/-   ##
==========================================
+ Coverage   60.43%   60.79%   +0.36%     
==========================================
  Files         103      106       +3     
  Lines       31165    31683     +518     
  Branches     8126     8219      +93     
==========================================
+ Hits        18835    19263     +428     
- Misses       9968    10038      +70     
- Partials     2362     2382      +20     
Flag Coverage Δ
functionaltests 60.79% <ø> (+0.36%) ⬆️
unittests 60.79% <ø> (+0.36%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread arc/job/adapters/ts/goflow_test.py Dismissed
Comment thread arc/job/adapters/ts/goflow_test.py Dismissed
Comment thread arc/job/adapters/ts/goflow_test.py Fixed
Copy link
Copy Markdown

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

Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.

Comment thread arc/settings/settings_test.py
Comment thread arc/settings/settings_test.py Outdated
Comment thread Makefile Outdated
Comment thread arc/job/adapters/ts/goflow_test.py Outdated
Comment thread arc/job/adapters/scripts/goflow_script_test.py Dismissed
Comment thread arc/settings/goflow_paths_test.py Fixed
@alongd alongd force-pushed the goflow branch 2 times, most recently from b588a29 to 4f3407d Compare May 9, 2026 09:05
@alongd alongd requested a review from Copilot May 9, 2026 09:06
Comment thread arc/settings/external_paths_test.py Dismissed
@alongd alongd changed the title Added the GoFlow TS search adapter Add GoFlow and RitS TS search adapters May 9, 2026
Copy link
Copy Markdown

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

Copilot reviewed 23 out of 23 changed files in this pull request and generated 13 comments.

Comments suppressed due to low confidence (1)

arc/settings/settings.py:198

  • output_filenames was updated for rits, but there is still no entry for goflow. JobAdapter falls back to 'output.out' when a job_adapter key is missing, which can break queue/pipe bookkeeping for the GoFlow adapter (it actually produces/consumes output.yml). Consider adding a goflow: 'output.yml' mapping here for consistency with the adapter’s staged files.
output_filenames = {'cfour': 'output.out',
                    'gaussian': 'input.log',
                    'gcn': 'output.yml',
                    'mockter': 'output.yml',
                    'molpro': 'input.out',
                    'onedmin': 'output.out',
                    'orca': 'input.log',
                    'orca_neb': 'input.log',
                    'qchem': 'output.out',
                    'rits': 'output.yml',
                    'terachem': 'output.out',
                    'torchani': 'output.yml',
                    'xtb': 'output.out',
                    'openbabel':'output.yml',
                    }

Comment thread arc/settings/settings.py
Comment on lines 100 to 105
# TS methods to try when appropriate for a reaction (other than user guesses which are always allowed):
ts_adapters = ['heuristics', 'AutoTST', 'GCN', 'xtb_gsm', 'orca_neb']
# Note: 'RitS' is intentionally NOT in the default — its env (rits_env +
# pretrained ckpt) is heavyweight, so users opt in explicitly via
# ``ts_adapters: ['rits', ...]`` in their input.yml.
ts_adapters = ['heuristics', 'AutoTST', 'goflow', 'orca_neb']

Comment thread docs/source/TS_search.rst Outdated
Comment on lines +70 to +72
GoFlow is **opt-in only** — its inference stack is heavyweight and the model is RDB7-trained,
so it is intentionally absent from the default ``ts_adapters`` list. The adapter enforces a
runtime domain guard:
Comment on lines +29 to +39
def test_ts_adapters_includes_goflow_by_default(self):
"""GoFlow is enabled by default — case-insensitive match (the default
list uses 'goflow' lowercase)."""
self.assertIn('goflow', [a.lower() for a in settings_mod.ts_adapters])

def test_ts_adapters_does_not_include_rits_by_default(self):
"""RitS's env (rits_env + pretrained ckpt) is heavyweight, so it must
stay opt-in. Users enable it via ``ts_adapters: ['rits', ...]`` in
their input.yml."""
self.assertNotIn('RitS', settings_mod.ts_adapters)
self.assertNotIn('rits', settings_mod.ts_adapters)
Comment thread arc/main_test.py
Comment on lines 59 to 63
job_types=self.job_types1,
species=[spc1],
level_of_theory='ccsd(t)-f12/cc-pvdz-f12//b3lyp/6-311+g(3df,2p)',
ts_adapters=['heuristics', 'AutoTST', 'GCN', 'xtb_gsm'],
ts_adapters=['heuristics', 'AutoTST', 'GCN', 'xtb_gsm', 'goflow'],
)
Comment thread devtools/install_rits.sh Outdated
Comment on lines +114 to +120
VER=$(nvcc --version | grep -oP "release \K[0-9]+\.[0-9]+" | head -n1)
CUDA_VARIANT=$(map_cuda_to_variant "$VER")
echo "🔍 nvcc reports CUDA $VER → using PyG variant '$CUDA_VARIANT'"
elif command -v nvidia-smi &>/dev/null; then
# The 'CUDA Version' field in nvidia-smi is the *driver's max supported* CUDA, which is the
# right ceiling for binary wheel compatibility (not driver_version, which is a different number).
VER=$(nvidia-smi 2>/dev/null | grep -oP "CUDA Version: \K[0-9]+\.[0-9]+" | head -n1 || true)
Comment thread arc/job/adapters/ts/rits_test.py Outdated
Comment on lines +127 to +129
HAS_RITS = _rits_environment_ready()


Comment on lines +56 to +59
def test_returns_none_when_no_repo_and_no_env_var(self):
os.environ.pop('ARC_GOFLOW_CKPT', None)
self.assertIsNone(external_paths.find_goflow_ckpt(repo_path=None))

Comment on lines +95 to +98
def test_returns_none_when_no_repo_and_no_env_var(self):
os.environ.pop('ARC_GOFLOW_FEAT_DICT', None)
self.assertIsNone(external_paths.find_goflow_feat_dict(repo_path=None))

Comment on lines +175 to +178
def test_returns_none_when_no_repo_and_no_env_var(self):
os.environ.pop('ARC_RITS_CKPT', None)
self.assertIsNone(external_paths.find_rits_ckpt(repo_path=None))

Comment on lines 75 to +82
}

all_families_ts_adapters = []
all_families_ts_adapters = ['rits']
adapters_that_do_not_require_a_level_arg = ['xtb', 'torchani']

# Default is "queue", "pipe" will be called whenever needed. So just list 'incore'.
default_incore_adapters = ['autotst', 'crest', 'gcn', 'heuristics', 'kinbot', 'openbabel', 'torchani', 'psi4', 'xtb', 'xtb_gsm']
default_incore_adapters = ['autotst', 'crest', 'gcn', 'goflow', 'heuristics', 'kinbot', 'openbabel', 'psi4',
'rits', 'torchani', 'xtb', 'xtb_gsm']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants