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

update IO classes to latest upstream pymatgen #141

Merged
merged 3 commits into from
Jun 8, 2022
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
10 changes: 5 additions & 5 deletions docs/user/codes/vasp.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ Modifying input sets
--------------------

The inputs for a calculation can be modified in several ways. Every VASP job
takes a {obj}`.VaspInputSetGenerator` as an argument (`input_set_generator`). One
takes a {obj}`.VaspInputGenerator` as an argument (`input_set_generator`). One
option is to specify an alternative input set generator:

```python
Expand Down Expand Up @@ -295,13 +295,13 @@ Powerups return a copy of the original flow or Maker and do not modify it in pla
```

In addition to the ability to change INCAR parameters on-the-fly, the
{obj}`.VaspInputSetGenerator`, `Maker` object, and "powerups" allow for the manual
{obj}`.VaspInputGenerator`, `Maker` object, and "powerups" allow for the manual
modification of several additional VASP settings, such as the k-points
(`user_kpoints_settings`) and choice of pseudopotentials (`user_potcar_settings`).

If a greater degree of flexibility is needed, the user can define a default set of input
arguments (`config_dict`) that can be provided to the {obj}`.VaspInputSetGenerator`.
By default, the {obj}`.VaspInputSetGenerator` uses a base set of VASP input parameters
arguments (`config_dict`) that can be provided to the {obj}`.VaspInputGenerator`.
By default, the {obj}`.VaspInputGenerator` uses a base set of VASP input parameters
from {obj}`.BaseVaspSet.yaml`, which each `Maker` is built upon. If desired, the user can
define a custom `.yaml` file that contains a different base set of VASP settings to use.
An example of how this can be done is shown below for a representative static
Expand All @@ -310,7 +310,7 @@ calculation.
```
from atomate2.vasp.sets.core import StaticSetGenerator
from atomate2.vasp.jobs.core import StaticMaker
from atomate2.vasp.jobs.base import VaspInputSetGenerator
from atomate2.vasp.jobs.base import VaspInputGenerator
from monty.serialization import loadfn

# read in a custom config file
Expand Down
77 changes: 0 additions & 77 deletions src/atomate2/common/sets.py

This file was deleted.

6 changes: 3 additions & 3 deletions src/atomate2/vasp/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from atomate2.common.files import copy_files, get_zfile, gunzip_files, rename_files
from atomate2.utils.file_client import FileClient, auto_fileclient
from atomate2.utils.path import strip_hostname
from atomate2.vasp.sets.base import VaspInputSetGenerator
from atomate2.vasp.sets.base import VaspInputGenerator

__all__ = ["copy_vasp_outputs", "get_largest_relax_extension"]

Expand Down Expand Up @@ -143,7 +143,7 @@ def get_largest_relax_extension(

def write_vasp_input_set(
structure: Structure,
input_set_generator: VaspInputSetGenerator,
input_set_generator: VaspInputGenerator,
directory: Union[str, Path] = ".",
from_prev: bool = False,
apply_incar_updates: bool = True,
Expand All @@ -158,7 +158,7 @@ def write_vasp_input_set(
----------
structure : .Structure
A structure.
input_set_generator : .VaspInputSetGenerator
input_set_generator : .VaspInputGenerator
A VASP input set generator.
directory : str or Path
The directory to write the input files to.
Expand Down
18 changes: 9 additions & 9 deletions src/atomate2/vasp/jobs/amset.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from atomate2.utils.path import strip_hostname
from atomate2.vasp.jobs.base import BaseVaspMaker
from atomate2.vasp.jobs.core import HSEBSMaker, NonSCFMaker
from atomate2.vasp.sets.base import VaspInputSetGenerator
from atomate2.vasp.sets.base import VaspInputGenerator
from atomate2.vasp.sets.core import (
HSEBSSetGenerator,
HSEStaticSetGenerator,
Expand Down Expand Up @@ -50,7 +50,7 @@ class DenseUniformMaker(NonSCFMaker):
----------
name : str
The job name.
input_set_generator : .VaspInputSetGenerator
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`.
Expand All @@ -71,7 +71,7 @@ class DenseUniformMaker(NonSCFMaker):
"""

name: str = "dense uniform"
input_set_generator: VaspInputSetGenerator = field(
input_set_generator: VaspInputGenerator = field(
default_factory=lambda: NonSCFSetGenerator(
mode="uniform", reciprocal_density=1000, user_incar_settings={"LWAVE": True}
)
Expand All @@ -91,7 +91,7 @@ class StaticDeformationMaker(BaseVaspMaker):
----------
name : str
The job name.
input_set_generator : .VaspInputSetGenerator
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`.
Expand All @@ -112,7 +112,7 @@ class StaticDeformationMaker(BaseVaspMaker):
"""

name: str = "static deformation"
input_set_generator: VaspInputSetGenerator = field(
input_set_generator: VaspInputGenerator = field(
default_factory=lambda: StaticSetGenerator(
user_kpoints_settings={"reciprocal_density": 100},
user_incar_settings={"KSPACING": None},
Expand All @@ -133,7 +133,7 @@ class HSEStaticDeformationMaker(BaseVaspMaker):
----------
name : str
The job name.
input_set_generator : .VaspInputSetGenerator
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`.
Expand All @@ -154,7 +154,7 @@ class HSEStaticDeformationMaker(BaseVaspMaker):
"""

name: str = "static deformation"
input_set_generator: VaspInputSetGenerator = field(
input_set_generator: VaspInputGenerator = field(
default_factory=lambda: HSEStaticSetGenerator(
user_kpoints_settings={"reciprocal_density": 100},
user_incar_settings={"KSPACING": None},
Expand All @@ -171,7 +171,7 @@ class HSEDenseUniformMaker(HSEBSMaker):
----------
name : str
The job name.
input_set_generator : .VaspInputSetGenerator
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`.
Expand All @@ -192,7 +192,7 @@ class HSEDenseUniformMaker(HSEBSMaker):
"""

name: str = "dense uniform"
input_set_generator: VaspInputSetGenerator = field(
input_set_generator: VaspInputGenerator = field(
default_factory=lambda: HSEBSSetGenerator(
mode="uniform_dense",
zero_weighted_reciprocal_density=1000,
Expand Down
8 changes: 3 additions & 5 deletions src/atomate2/vasp/jobs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from atomate2.vasp.files import copy_vasp_outputs, write_vasp_input_set
from atomate2.vasp.run import run_vasp, should_stop_children
from atomate2.vasp.schemas.task import TaskDocument
from atomate2.vasp.sets.base import VaspInputSetGenerator
from atomate2.vasp.sets.base import VaspInputGenerator

__all__ = ["BaseVaspMaker", "vasp_job"]

Expand Down Expand Up @@ -83,7 +83,7 @@ class BaseVaspMaker(Maker):
----------
name : str
The job name.
input_set_generator : .VaspInputSetGenerator
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`.
Expand All @@ -104,9 +104,7 @@ class BaseVaspMaker(Maker):
"""

name: str = "base vasp job"
input_set_generator: VaspInputSetGenerator = field(
default_factory=VaspInputSetGenerator
)
input_set_generator: VaspInputGenerator = field(default_factory=VaspInputGenerator)
write_input_set_kwargs: dict = field(default_factory=dict)
copy_vasp_kwargs: dict = field(default_factory=dict)
run_vasp_kwargs: dict = field(default_factory=dict)
Expand Down
Loading