Skip to content
Merged
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
53 changes: 18 additions & 35 deletions src/atomate2/vasp/jobs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from __future__ import annotations

import logging
import warnings
from dataclasses import dataclass, field
from typing import TYPE_CHECKING, Literal

Expand All @@ -26,6 +27,7 @@

if TYPE_CHECKING:
from pathlib import Path
from typing import Any

from jobflow import Response
from pymatgen.core.structure import Structure
Expand Down Expand Up @@ -206,41 +208,6 @@ class TightRelaxConstVolMaker(BaseVaspMaker):
)


@dataclass
class TightConstVolRelaxMaker(BaseVaspMaker):
"""
Maker to create tight VASP relaxation jobs.

Parameters
----------
name : str
The job name.
input_set_generator : .VaspInputGenerator
A generator used to make the input set.
write_input_set_kwargs : dict
Keyword arguments that will get passed to :obj:`.write_vasp_input_set`.
copy_vasp_kwargs : dict
Keyword arguments that will get passed to :obj:`.copy_vasp_outputs`.
run_vasp_kwargs : dict
Keyword arguments that will get passed to :obj:`.run_vasp`.
task_document_kwargs : dict
Keyword arguments that will get passed to :obj:`.TaskDoc.from_directory`.
stop_children_kwargs : dict
Keyword arguments that will get passed to :obj:`.should_stop_children`.
write_additional_data : dict
Additional data to write to the current directory. Given as a dict of
{filename: data}. Note that if using FireWorks, dictionary keys cannot contain
the "." character which is typically used to denote file extensions. To avoid
this, use the ":" character, which will automatically be converted to ".". E.g.
``{"my_file:txt": "contents of the file"}``.
"""

name: str = "tight relax"
input_set_generator: VaspInputGenerator = field(
default_factory=TightRelaxConstVolSetGenerator
)


@dataclass
class NonSCFMaker(BaseVaspMaker):
"""
Expand Down Expand Up @@ -643,3 +610,19 @@ def make(
self.write_additional_data.setdefault("transformations:json", tjson)

return super().make.original(self, structure, prev_dir)


def __getattr__(name: str) -> Any:
if name == "TightConstVolRelaxMaker":
warnings.warn(
(
"`TightConstVolRelaxMaker` is a duplicate of "
" `TightRelaxConstVolMaker`, and will be removed on "
"1 October, 2026. Please migrate to `TightRelaxConstVolMaker`."
),
DeprecationWarning,
stacklevel=2,
)
return TightRelaxConstVolMaker

raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
Loading