Repository navigation
fix(saddle): refuse prfo_refine before the first force call - #869
Merged
Merged
Conversation
A min-mode saddle search, a min-mode process search and a nudged elastic band (NEB) job now check prfo_refine before any force call. They throw when the build has no rgsaddle, when the loaded rgsaddle library reports an application binary interface (ABI) older than 1.15, or when prfo_refine_force or prfo_refine_max_iterations is out of range. The MinModeSaddleSearch constructor runs the same check for other callers. Before, the check ran only after a converged search. A client without rgsaddle spent 279 force calls on the dimer search of the 13-atom Lennard-Jones (LJ13) test cluster. It then reported a potential evaluation failure. The band of that cluster took 283 force calls before the job stopped. Runs without prfo_refine are unchanged. test_prfo_refine is now built without rgsaddle too, where it checks the refusal.
The how-to and reference sections of the saddle search guide, the eon-schema docstring and the published schema now say that a client that cannot refine refuses the job before its first force call. The partitioned rational function optimization (P-RFO) step also cites Banerjee et al. 1985. The 2025 Journal of Chemical Theory and Computation entry gains its volume, issue and pages from Crossref.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pull request 867 added the opt-in partitioned rational function optimization (P-RFO) refinement through the rgsaddle Sella session.
Its checks of the rgsaddle library and of the
prfo_refine_*values ran only after the search converged.This change runs the same checks before the first force call, so a job that cannot refine stops at once.
requirePrfoRefineat the start ofrun.MinModeSaddleSearchconstructor calls it too, for other callers such as the Python bindings.std::runtime_errorfor a build without rgsaddle or a loaded library older than application binary interface (ABI) 1.15, andstd::invalid_argumentfor aprfo_refine_forcethat is not positive or aprfo_refine_max_iterationsbelow 1.prfo_refineoff nothing is called, and every output is unchanged.Measurements
All runs use the 13-atom Lennard-Jones (LJ13) test systems with the configurations of
test_prfo_refine.rgsaddle is the continuous integration (CI) pin, crate version 0.2.2 at ABI 1.18.
Counts are force calls before the job stopped, read from the potential registry.
Before this change, a client without rgsaddle spent 279 force calls on the dimer saddle search with
prfo_refine = true.It then reported termination reason 11, "Potential evaluation failed".
Its process search took 279 force calls and its NEB job 283 before each stopped on an unhandled exception.
A client with rgsaddle spent 821 force calls on the dimer saddle search with
prfo_refine_force = 0.It also reported termination reason 11.
That build took 821 force calls in the process search and 283 in the NEB job before the same unhandled exception.
After this change, all six jobs stop with zero force calls.
With valid keys the refinement is unchanged.
Before and after this change, the dimer run with
prfo_refine_force = 1e-5lowered the max-atom force ofsaddle.confrom 3.7e-3 to 4.3e-9 eV/Angstrom, in 946 force calls against 821 for the search alone.The NEB run refined the climbing image from 3.3e-3 to 6.6e-8 eV/Angstrom in 65 force calls, the curvature probe included.
saddle.con,mode.dat,neb.con,sp.con,sp_refined.conandresults.datapart from timings were the same before and after, with the keys on and off.Tests
test_prfo_refineis now built in every configuration.prfo_refine_force = 0and requires a refusal with zero force calls.prfo_refine = trueand must make no force call, next to the existing case for the default path.Docs
prfo_refinedescription in the eon-schema model and the published schema say the same.