Skip to content

Fix AttributeError in ABACUS Gamma post-processing (self.addfix -> self.add_fix)#1920

Open
Sreekant13 wants to merge 1 commit into
deepmodeling:masterfrom
Sreekant13:fix/gamma-add-fix-attribute-typo
Open

Fix AttributeError in ABACUS Gamma post-processing (self.addfix -> self.add_fix)#1920
Sreekant13 wants to merge 1 commit into
deepmodeling:masterfrom
Sreekant13:fix/gamma-add-fix-attribute-typo

Conversation

@Sreekant13

@Sreekant13 Sreekant13 commented Jun 30, 2026

Copy link
Copy Markdown

Fixes #1900.

Gamma.__stru_fix referenced self.addfix, but the attribute is self.add_fix (set in __init__). This raised an AttributeError whenever add_fix was enabled during ABACUS Gamma post-processing. Corrected the spelling to match.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed an issue in Abaqus post-processing where structure-fix handling could fail due to an incorrect setting reference.
    • Improved stability for runs that use fix-point adjustments.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3b6c3a2b-0715-44a8-bb93-3b4cda606428

📥 Commits

Reviewing files that changed from the base of the PR and between 7af5246 and 8fd2b8f.

📒 Files selected for processing (1)
  • dpgen/auto_test/Gamma.py

📝 Walkthrough

Walkthrough

A single-line fix in dpgen/auto_test/Gamma.py corrects an attribute reference within Gamma.__stru_fix, changing self.addfix to self.add_fix to resolve an AttributeError during ABACUS Gamma post-processing when fixed directions are enabled.

Changes

Attribute Typo Fix

Layer / File(s) Summary
Correct attribute reference
dpgen/auto_test/Gamma.py
Gamma.__stru_fix now reads self.add_fix instead of the misspelled self.addfix when building fix_xyz, matching the attribute used by VASP and LAMMPS fix paths.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main fix: correcting the ABACUS Gamma add_fix attribute typo.
Linked Issues check ✅ Passed The change matches issue #1900 by replacing self.addfix with self.add_fix in Gamma ABACUS post-processing.
Out of Scope Changes check ✅ Passed The patch is narrowly scoped to the reported typo fix and adds no unrelated changes.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 49.80%. Comparing base (7af5246) to head (8fd2b8f).

Files with missing lines Patch % Lines
dpgen/auto_test/Gamma.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1920   +/-   ##
=======================================
  Coverage   49.80%   49.80%           
=======================================
  Files          83       83           
  Lines       14986    14986           
=======================================
  Hits         7464     7464           
  Misses       7522     7522           

☔ View full report in Codecov by Harness.
📢 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.

@njzjz njzjz requested a review from pxlxingliang July 1, 2026 02:32
@Sreekant13 Sreekant13 requested a review from pxlxingliang July 2, 2026 02:58
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.

[Code scan] Fix ABACUS Gamma add_fix attribute typo

2 participants