Skip to content

Fix AttributeError in VaspInput.as_dict() and add test for potcar_spe…#17

Open
cogsworth37 wants to merge 1 commit intomaterialsproject:mainfrom
cogsworth37:3821-Fix-AttributeError-VaspInput
Open

Fix AttributeError in VaspInput.as_dict() and add test for potcar_spe…#17
cogsworth37 wants to merge 1 commit intomaterialsproject:mainfrom
cogsworth37:3821-Fix-AttributeError-VaspInput

Conversation

@cogsworth37
Copy link
Copy Markdown

@cogsworth37 cogsworth37 commented Apr 7, 2026

…c handling

Fixes materialsproject/pymatgen#3821

closes

Summary

Major changes:

  • Fix AttributeError in VaspInput.as_dict(). when VaspInput(potcar_spec=True), the potcar key has a string value that doesn't have a dict() attribute.
  • Wrote unit tests to cover the scenario

Checklist

  • Google format doc strings added. Check with ruff.
  • Type annotations included. Check with mypy.
  • Tests added for new features/fixes.
  • If applicable, new classes/functions/modules have duecredit @due.dcite decorators to reference relevant papers by DOI (example)

Tip: Install pre-commit hooks to auto-check types and linting before every commit:

pip install -U pre-commit
pre-commit install

@cogsworth37 cogsworth37 requested a review from shyuep as a code owner April 7, 2026 03:05
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.

.as_dict() method on VaspInput causes an AttributeError

1 participant