Skip to content

fix(abacus-plot): fix reshape parameter and PDOS plotting issues#7455

Merged
mohanchen merged 1 commit into
deepmodeling:developfrom
mintleaf84:fix-abacus-plot-issues
Jun 8, 2026
Merged

fix(abacus-plot): fix reshape parameter and PDOS plotting issues#7455
mohanchen merged 1 commit into
deepmodeling:developfrom
mintleaf84:fix-abacus-plot-issues

Conversation

@mintleaf84

Copy link
Copy Markdown

Reminder

  • Have you linked an issue with this pull request?
  • Have you added adequate unit tests and/or case tests for your pull request?
  • Have you noticed possible changes of behavior below or in the linked issue?
  • Have you explained the changes of codes in core modules of ESolver, HSolver, ElecState, Hamilt, Operator or Psi? (ignore if not applicable)

Linked Issue

Fix #6864

Unit Tests and/or Case Tests for my changes

No additional tests required. These are simple Python code fixes.

What's changed?

  • Fix np.reshape() call in PDOS._read() method: remove invalid newshape keyword argument that causes TypeError in newer numpy versions
  • Fix PDOS plotting in _parial_plot() method: remove unnecessary reassignment of dosplot.ax after _plot() calls, which caused AttributeError when dosplot.ax was incorrectly assigned

Any changes of core modules? (ignore if not applicable)

No changes to core modules. The modifications are only in the tools/plot-tools/abacus_plot/dos.py Python script.

- Remove invalid 'newshape' keyword from np.reshape() call
- Remove unnecessary reassignment of dosplot.ax after _plot() calls

Fixes deepmodeling#6864
@mohanchen mohanchen added Bugs Bugs that only solvable with sufficient knowledge of DFT Refactor Refactor ABACUS codes labels Jun 8, 2026
@mohanchen

Copy link
Copy Markdown
Collaborator

Thanks for your contribution!

@mohanchen mohanchen added the Interfaces Interfaces with other packages label Jun 8, 2026

@mohanchen mohanchen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks.

@mohanchen mohanchen merged commit dd2de6e into deepmodeling:develop Jun 8, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bugs Bugs that only solvable with sufficient knowledge of DFT Interfaces Interfaces with other packages Refactor Refactor ABACUS codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

abacus-plot is not functioning properly

2 participants