Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add KspacingMetalHandler to VASP _DEFAULT_HANDLERS #600

Merged
merged 6 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ requires-python = ">=3.9"
dependencies = [
"PyYAML",
"click",
"custodian>=2023.3.10",
"custodian>=2024.2.15",
"emmet-core>=0.70.5",
"jobflow>=0.1.11",
"monty>=2023.9.25",
Expand Down Expand Up @@ -73,7 +73,7 @@ strict = [
"cclib==1.8",
"chgnet==0.3.4",
"click==8.1.7",
"custodian==2023.10.9",
"custodian==2024.2.15",
"dscribe==2.1.0",
"emmet-core==0.77.1",
"ijson==3.2.3",
Expand Down
2 changes: 2 additions & 0 deletions src/atomate2/vasp/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from custodian.vasp.handlers import (
FrozenJobErrorHandler,
IncorrectSmearingHandler,
KspacingMetalHandler,
LargeSigmaHandler,
MeshSymmetryErrorHandler,
NonConvergingErrorHandler,
Expand Down Expand Up @@ -52,6 +53,7 @@
StdErrHandler(),
LargeSigmaHandler(),
IncorrectSmearingHandler(),
KspacingMetalHandler(),
)
_DEFAULT_VALIDATORS = (VasprunXMLValidator(), VaspFilesValidator())

Expand Down
7 changes: 7 additions & 0 deletions tests/vasp/test_base.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from __future__ import annotations

import pytest
from custodian.vasp.handlers import ErrorHandler
from pymatgen.core import Lattice, Structure

from atomate2.vasp.run import _DEFAULT_HANDLERS
from atomate2.vasp.sets.base import _get_magmoms


Expand Down Expand Up @@ -51,3 +53,8 @@ def test_get_magmoms_with_specie() -> None:
assert struct[0].specie.spin is None
out = _get_magmoms(struct)
assert out == [0.6, 0.6]


def test_default_handlers():
assert len(_DEFAULT_HANDLERS) >= 8
assert all(isinstance(handler, ErrorHandler) for handler in _DEFAULT_HANDLERS)
Loading