Skip to content

CREST Adapter#807

Open
calvinp0 wants to merge 9 commits intomainfrom
crest_adapter
Open

CREST Adapter#807
calvinp0 wants to merge 9 commits intomainfrom
crest_adapter

Conversation

@calvinp0
Copy link
Member

@calvinp0 calvinp0 commented Nov 27, 2025

Addition of CREST Adapter that complements the heuristic adapter.

This pull request adds support for the CREST conformer and transition state (TS) search method to the ARC project, along with several related improvements and code cleanups. The most important changes include integrating CREST as a TS search adapter, updating configuration and constants, and enhancing the heuristics TS search logic for better provenance tracking and code clarity.

CREST Integration:

  • Added CREST as a supported TS search method: updated JobEnum (arc/job/adapter.py), included CREST in the list of adapters and RMG family mapping, and registered it as a default incore adapter (arc/job/adapters/common.py, arc/job/adapters/ts/__init__.py). [1] [2] [3] [4]
  • Implemented a new test suite for CREST input generation (arc/job/adapters/ts/crest_test.py).
  • Added a Makefile target and installation script for CREST (Makefile). [1] [2]

Constants and Configuration:

  • Added the angstrom_to_bohr conversion constant to both Cython and Python constants modules (arc/constants.pxd, arc/constants.py). [1] [2] [3]

Heuristics TS Search Enhancements and Refactoring:

  • Refactored heuristics TS search logic to track and combine method provenance for TS guesses, allowing for more precise attribution when multiple methods contribute to a guess (arc/job/adapters/ts/heuristics.py). [1] [2] [3] [4]
  • Improved code readability and maintainability by reformatting imports and function calls, and clarifying data structures and comments in heuristics TS search (arc/job/adapters/ts/heuristics.py). [1] [2] [3] [4] [5] [6] [7]
    .

This comment was marked as resolved.

This comment was marked as resolved.

@calvinp0 calvinp0 force-pushed the crest_adapter branch 2 times, most recently from 3e88c36 to 7674f5f Compare February 2, 2026 09:49
@calvinp0 calvinp0 requested a review from Copilot February 2, 2026 12:10

This comment was marked as resolved.

Copy link

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

This comment was marked as resolved.

Adds a CREST TS search adapter for finding transition state conformers,
leveraging heuristics-generated guesses and CREST's conformer search capabilities.

This allows ARC to explore TS geometries using CREST.

Adds method source to TS guesses from CREST

Ensures CREST is recorded as a method source when a TS guess from CREST is deemed unique and considered as a possible TS guess.
This change ensures proper provenance tracking for TS guesses.

Improves error logging in CREST adapter

Enhances error messages in the CREST adapter to provide more context when failing to determine H abstraction atoms.
The error message now includes the reaction label and crest seed iteration number, which aids in debugging.

Improves CREST TS search robustness

Addresses potential errors in CREST TS searches by:

- Preventing crashes due to missing digits in atom labels by raising a ValueError if `extract_digits` fails to find digits.
- Handling cases where no H-abstraction atoms can be determined from the distance matrix, preventing related errors and skipping the corresponding seed.
- Removes unused local_path argument from h_abstraction function
Adds a script to install CREST using a dedicated conda environment.
Integrates CREST into the `install_all.sh` script and the help message.
Also adds a `--no-rmg` flag in `install_all.sh` to optionally skip RMG-Py installation, and ensures PyRDL is installed only when ARC is installed.

Corrects a problem with the AutoTST activation/deactivation hooks and ensures that RMG-Py's path is correctly removed from the PATH and PYTHONPATH.
Also ensures TS-GCN can be correctly installed into its environment.

Sanitizes paths for AutoTST hook activation

Ensures that paths containing special characters are properly escaped
when writing the AutoTST activation hook. This prevents issues with
the hook failing to activate correctly when the AutoTST repository
or current working directory contain characters that are interpreted
specially by the shell.
Adds the CREST adapter as an option for transition state (TS) guess generation, particularly for H_Abstraction reactions, improving the exploration of potential TS geometries.

Includes CREST in the default list of in-core adapters and allows it to be used in heuristics.

The heuristic adapter now passes the local path of the files to the h_abstraction method so the geometries are saved to the appropriate folders.
Saves the method used to generate the TS guesses in the file name so the geometries generated with CREST are clearly labeled as such.

Refactors TS guess method source handling

Updates TS guess generation to correctly handle multiple method sources.
Specifically, it normalizes the method sources for TS guesses by aggregating
method labels. Also, removes the unused `path` argument from the
`h_abstraction` function, streamlining the H_Abstraction TS guess generation.
Adds a function to reorder XYZ strings between atom-first and coordinate-first formats, with optional unit conversion.
Also introduces a backward compatible wrapper with a deprecation warning.

Uses constants for unit conversion factors

Replaces hardcoded unit conversion factors with values from the `constants` module. Also, determines atom ordering more robustly by inspecting only the first line.

Corrects angstrom to bohr conversion factor

The conversion factor between angstrom and bohr was inverted, which led to incorrect geometry conversions.

This commit corrects the conversion factor to ensure proper unit conversion when dealing with xyz coordinates.
Removes input files and submit script related to a specific server time limit test case.
The `err.txt` file is renamed to `wall_exceeded.txt` and moved to the `trsh` folder.
@calvinp0 calvinp0 force-pushed the crest_adapter branch 2 times, most recently from 9be935e to eab7647 Compare February 4, 2026 20:14
Enables the usage of CREST as a TS adapter.

The implementation includes:
- Adding 'crest' to the list of available TS adapters.
- Implementing a function to automatically detect the CREST executable in various locations (standalone builds, conda environments, PATH).
- Providing instructions for activating the CREST environment, if necessary.

This allows ARC to leverage CREST for enhanced transition state search capabilities.

Improves crest executable search logic

Refactors the crest executable search to more reliably locate the correct version by normalizing path joining.

Updates the documentation for clarity.

Makes crest standalone directory configurable

Allows users to configure the directory where standalone crest builds are located.

This enables greater flexibility in managing crest installations, especially
in environments where the default location (/Local/ce_dana) is not suitable.

Exports all settings variables

Makes all settings variables available for import in other modules,
which is needed by the CREST adapter.
Adds a `method_sources` attribute to the `TSGuess` class to track all
methods/sources that generated a particular transition state guess, allowing
for more comprehensive provenance information. This improves the clustering
of similar TS guesses. Normalizes method sources to a unique, ordered,
lowercase list.
Adds the angstrom to bohr conversion factor.

This conversion factor is required for the CREST adapter.
Introduces a function to generate unique project names for parallel test execution using xdist. This prevents collisions when cleaning up project directories, ensuring reliable test execution.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant