Skip to content

Updated ASET #122

Open
wateriousmelon2333 wants to merge 13 commits into
mainfrom
update-aset
Open

Updated ASET #122
wateriousmelon2333 wants to merge 13 commits into
mainfrom
update-aset

Conversation

@wateriousmelon2333

Copy link
Copy Markdown
Contributor
  1. Fixed ASET bug, now fragment allows atoms with more than 1 letter.
  2. Updated ASET so it can run on AVAS projected orbitals, prior to CASSCF.
  3. Updated McOptimizer so mix_inactive is false when parent method is ASET.
  4. Added one test case.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the ASET (Active Space Embedding Theory) implementation to support multi-letter atomic symbols, enable execution on AVAS-projected orbitals, and improve orbital optimization behavior. The key changes include:

  • Fixed regex pattern to properly handle atoms with 1-2 letter symbols (e.g., "Li", "Cl")
  • Extended ASET to accept AVAS as a parent method in addition to MCOptimizer
  • Updated MCOptimizer to disable inactive orbital mixing when parent method is ASET
  • Added test case demonstrating the AVAS→ASET→CASSCF workflow

Reviewed Changes

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

File Description
tests/orbitals/test_aset.py Added AVAS import and new test case for AVAS→ASET→CASSCF workflow
tests/orbitals/reference_aset_orbitals/test_aset_6_orbitals.npy Reference orbital data for new test case
forte2/orbitals/aset.py Updated fragment parsing regex, added AVAS support, new compute_g1_sf method, removed unused import
forte2/mcopt/mc_optimizer.py Added ASET import, conditional mix_inactive logic, fixed typo in comment

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

Comment thread forte2/orbitals/aset.py Outdated
Comment thread tests/orbitals/test_aset.py Outdated
Comment thread forte2/orbitals/aset.py Outdated
@wateriousmelon2333
wateriousmelon2333 force-pushed the update-aset branch 2 times, most recently from 91cc199 to 2addfb1 Compare January 21, 2026 16:55
wateriousmelon2333 and others added 7 commits April 2, 2026 14:33
2. Updated ASET so it can run on AVAS projected orbitals, prior to CASSCF.
3. Updated McOptimizer so mix_inactive is false when parent method is ASET.
4. Added one test case.
2. Updated ASET so it can run on AVAS projected orbitals, prior to CASSCF.
3. Updated McOptimizer so mix_inactive is false when parent method is ASET.
4. Added one test case.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@codecov

codecov Bot commented Apr 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.98%. Comparing base (6446c7d) to head (47af70e).

Files with missing lines Patch % Lines
forte2/orbitals/aset.py 72.22% 3 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #122      +/-   ##
==========================================
- Coverage   94.08%   92.98%   -1.10%     
==========================================
  Files         150      150              
  Lines       12988    13006      +18     
  Branches     1008     1011       +3     
==========================================
- Hits        12220    12094     -126     
- Misses        534      676     +142     
- Partials      234      236       +2     

☔ 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.

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.

2 participants