Skip to content

Add DIIS ROHF feature#361

Open
v-boqinzhang wants to merge 36 commits intomainfrom
gh-feature/diis_rohf
Open

Add DIIS ROHF feature#361
v-boqinzhang wants to merge 36 commits intomainfrom
gh-feature/diis_rohf

Conversation

@v-boqinzhang
Copy link
Contributor

No description provided.

Copy link
Contributor

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

This pull request adds support for Restricted Open-shell Hartree-Fock (ROHF) calculations with DIIS (Direct Inversion in the Iterative Subspace) convergence acceleration. The implementation refactors the existing DIIS code into a more flexible architecture that supports RHF, UHF, and the newly added ROHF methods.

Changes:

  • Refactored DIIS implementation into a base class (DIISBase) with derived classes for different SCF flavors (RestrictedUnrestrictedDIIS for RHF/UHF, ROHFDIIS for ROHF)
  • Added ROHF-specific effective Fock matrix construction following Guest-Saunders (1974) formalism
  • Introduced rohf_enabled flag throughout the codebase (SCFConfig, SCFImpl, SCFAlgorithm, ERI classes) to enable ROHF support
  • Added validation to prevent unsupported ROHF+GDM and ROHF+DIIS_GDM combinations
  • Separated density matrix update logic from eigenproblem solving into a new virtual method update_density_matrix

Reviewed changes

Copilot reviewed 32 out of 32 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
cpp/include/.../scf_algorithm.h Added rohf_enabled parameter, update_density_matrix method, and updated documentation
cpp/include/.../scf.h Added rohf_enabled boolean flag to SCFConfig
cpp/include/.../eri.h Added rohf_enabled parameter to ERI base class constructor
cpp/src/.../scf_algorithm.cpp Implemented rohf_enabled support in create(), added update_density_matrix(), updated check_convergence with ROHF handling
cpp/src/.../diis_base.h/cpp Created DIISBase abstract base class from refactored DIIS implementation
cpp/src/.../rohf_diis.h/cpp Implemented ROHFDIIS class with effective Fock matrix construction for ROHF
cpp/src/.../restricted_unrestricted_diis.h/cpp Implemented RestrictedUnrestrictedDIIS for RHF/UHF cases
cpp/src/.../diis.h Removed (replaced by diis_base.h and derived classes)
cpp/src/.../asahf.h/cpp Updated to derive from DIISBase instead of DIIS
cpp/src/.../gdm.h/cpp Added rohf_enabled parameter (for future support)
cpp/src/.../diis_gdm.h/cpp Added rohf_enabled parameter and validation to reject ROHF temporarily
cpp/src/.../scf_impl.h/cpp Added rohf_enabled flag, num_orbital_sets tracking, updated initialization logic
cpp/src/.../eri/*.h/cpp Added rohf_enabled parameter to all ERI implementations
cpp/src/.../scf.cpp Enabled ROHF when scf_type="restricted" and system is open-shell
cpp/tests/ut_common.hpp Added create_oh_structure() helper function
cpp/tests/test_scf.cpp Added tests for ROHF with DIIS and ROHF+GDM error handling
python/tests/test_scf.py Added Python test for ROHF with DIIS
cpp/src/.../CMakeLists.txt Updated to include new source files

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

@v-boqinzhang v-boqinzhang self-assigned this Feb 10, 2026
Copilot AI review requested due to automatic review settings February 11, 2026 23:36
Copy link
Contributor

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 32 out of 32 changed files in this pull request and generated 1 comment.


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

wavefunction91
wavefunction91 previously approved these changes Feb 13, 2026
@wavefunction91 wavefunction91 linked an issue Feb 13, 2026 that may be closed by this pull request
@v-boqinzhang v-boqinzhang marked this pull request as ready for review February 18, 2026 21:12
Copilot AI review requested due to automatic review settings February 18, 2026 21:12
Copy link
Contributor

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 31 out of 31 changed files in this pull request and generated 4 comments.


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

Copy link
Contributor

Copilot AI commented Feb 18, 2026

@v-boqinzhang I've opened a new pull request, #371, to work on those changes. Once the pull request is ready, I'll request review from you.

@v-boqinzhang
Copy link
Contributor Author

@copilot No, I just need a new OVERVIEW for the current PR, not a new PR. Please generate the new overview and close the PR you created.

Copilot AI mentioned this pull request Feb 18, 2026
Copy link
Contributor

Copilot AI commented Feb 18, 2026

@v-boqinzhang I've opened a new pull request, #372, to work on those changes. Once the pull request is ready, I'll request review from you.

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.

Add ROHF to QDK SCF

3 participants

Comments