Skip to content

feat: add geomeTRIC optimizer backend#133

Merged
karmachoi merged 9 commits into
Open-Quantum-Platform:mainfrom
karmachoi:feat/geometric-optimizer
May 25, 2026
Merged

feat: add geomeTRIC optimizer backend#133
karmachoi merged 9 commits into
Open-Quantum-Platform:mainfrom
karmachoi:feat/geometric-optimizer

Conversation

@karmachoi
Copy link
Copy Markdown
Contributor

@karmachoi karmachoi commented May 25, 2026

Summary

  • Adds an optional lib=geometric optimizer backend using geomeTRIC's custom-engine interface.
  • Wires geomeTRIC into optimizer dispatch for state-specific minima, MECI, MECP, TS, and IRC calculations.
  • Adds [geometric] input defaults, including IRC direction handling (forward/backward, with reverse normalized to backward).
  • Exposes geomeTRIC constrained optimization through [geometric] constraints_file, enforce, and conmethod.
  • Adds runnable geomeTRIC examples and matching reference JSONs for minima, constrained minima, MECI, MECP, TS, MRSF-TS, and DFT IRC smoke coverage.
  • Adds focused regression tests for input validation, dispatch, constraints forwarding, and example/reference presence.

Scope

This PR is intentionally limited to geomeTRIC optimizer integration and examples.

Advanced guess-mode work is separate. OpenTrustRegion / BLAS / LAPACK build-system configuration, including early rejection of LINALG_LIB=none, was handled separately by PR #134 and has been merged into the base history used by this branch.

Test Plan

  • python3 -m unittest tests/test_geometric_optimizer.py -v
  • python3 -m py_compile pyoqp/oqp/library/libgeometric.py pyoqp/oqp/library/libscipy.py pyoqp/oqp/library/runfunc.py pyoqp/oqp/molecule/oqpdata.py pyoqp/oqp/utils/input_checker.py
  • openqp --run_tests examples/OPT/H2O_RHF-DFT_OPTIMIZE_GEOMETRIC.inp --nompi
  • openqp --run_tests examples/OPT/HCN_RHF-DFT_CONSTRAINED_GEOMETRIC.inp --nompi
  • openqp --run_tests examples/OPT/C2H4_BHHLYP-MRSFTDDFT_MECI_GEOMETRIC.inp --nompi
  • openqp --run_tests examples/OPT/C2H4_BHHLYP-MRSFTDDFT_MECP_GEOMETRIC.inp --nompi
  • openqp --run_tests examples/OPT/HCN_RHF-DFT_TS_GEOMETRIC.inp --nompi
  • openqp --run_tests examples/OPT/HCN_BHHLYP-MRSFTDDFT_TS_GEOMETRIC.inp --nompi
  • openqp --run_tests examples/OPT/HCN_RHF-DFT_IRC_GEOMETRIC.inp --nompi

cheolhochoi and others added 7 commits May 25, 2026 11:19
- Add geomeTRIC engine for state-specific optimization and MECI objectives
- Wire lib=geometric through optimizer dispatch and input validation
- Add dependency metadata and focused regression tests
- Add GeometricMECPOpt wrapper around the existing OpenQP MECP objective
- Wire lib=geometric for runtype=mecp
- Extend validation and dispatch regression tests
- Add geomeTRIC reference examples for minimum optimization, MECI, and MECP
- Include reference JSONs verified through openqp --run_tests
- Extend regression coverage to require geomeTRIC examples and references
- Add GeometricTSOpt using geomeTRIC transition mode
- Wire lib=geometric for runtype=ts and validate it
- Add HCN TS geomeTRIC example with reference JSON
- Add GeometricIRCOpt wrapper around state-specific gradients
- Wire runtype=irc through runner, optimizer dispatch, and input validation
- Add HCN geomeTRIC IRC example/reference and regression coverage
- Add constraints_file, enforce, and conmethod options under [geometric]
- Resolve constraint files relative to the OpenQP input file
- Add constrained HCN geomeTRIC example/reference coverage
- Use an initial Hessian for geomeTRIC TS searches by default
- Run full input validation for IRC optimize settings
- Add regression tests for TS Hessian and full IRC validation
- Refresh TS example references for Hessian-backed TS runs
Copy link
Copy Markdown
Contributor Author

@karmachoi karmachoi left a comment

Choose a reason for hiding this comment

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

Codex re-review after latest fixes:

No blocking issues found.

Focused local check run by Codex:

PYTHONDONTWRITEBYTECODE=1 python -m unittest tests/test_geometric_optimizer.py

Result: 15 tests OK.

Notes:

  • The earlier TS Hessian and full IRC input-validation findings were addressed in commit 03e73fa.
  • OpenTrustRegion/LINALG build-system items are out of scope for this PR and were handled separately by PR #134.

@karmachoi karmachoi merged commit 5e26ae4 into Open-Quantum-Platform:main May 25, 2026
5 checks passed
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.

1 participant