Skip to content

Commit

Permalink
PhononMaker document default values
Browse files Browse the repository at this point in the history
  • Loading branch information
janosh committed Nov 27, 2023
1 parent 831a102 commit 0c8eff8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/atomate2/cp2k/sets/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ def _combine_kpoints(*kpoints_objects: Kpoints) -> Kpoints:
weights = []

for kpoints_object in filter(None, kpoints_objects):
if not kpoints_object.style == Kpoints.supported_modes.Reciprocal:
if kpoints_object.style != Kpoints.supported_modes.Reciprocal:
raise ValueError(
"Can only combine kpoints with style=Kpoints.supported_modes.Reciprocal"
)
Expand Down
2 changes: 1 addition & 1 deletion src/atomate2/forcefields/flows/phonons.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def make(
)

if (
not self.use_symmetrized_structure == "primitive"
self.use_symmetrized_structure != "primitive"
and self.kpath_scheme != "seekpath"
):
raise ValueError(
Expand Down
32 changes: 15 additions & 17 deletions src/atomate2/vasp/flows/phonons.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,25 @@ class PhononMaker(Maker):
Parameters
----------
name : str
name : str = "phonon"
Name of the flows produced by this maker.
sym_reduce : bool
sym_reduce : bool = True
Whether to reduce the number of deformations using symmetry.
symprec : float
symprec : float = 1e-4
Symmetry precision to use in the
reduction of symmetry to find the primitive/conventional cell
(use_primitive_standard_structure, use_conventional_standard_structure)
and to handle all symmetry-related tasks in phonopy
displacement: float
displacement: float = 0.01
displacement distance for phonons
min_length: float
min_length: float = 20.0
min length of the supercell that will be built
prefer_90_degrees: bool
prefer_90_degrees: bool = True
if set to True, supercell algorithm will first try to find a supercell
with 3 90 degree angles
get_supercell_size_kwargs: dict
get_supercell_size_kwargs: dict = {}
kwargs that will be passed to get_supercell_size to determine supercell size
use_symmetrized_structure: str
use_symmetrized_structure: str or None = None
allowed strings: "primitive", "conventional", None
- "primitive" will enforce to start the phonon computation
Expand Down Expand Up @@ -106,7 +106,7 @@ class PhononMaker(Maker):
Keyword arguments passed to :obj:`generate_frequencies_eigenvectors`.
create_thermal_displacements: bool
Bool that determines if thermal_displacement_matrices are computed
kpath_scheme: str
kpath_scheme: str = "seekpath"
scheme to generate kpoints. Please be aware that
you can only use seekpath with any kind of cell
Otherwise, please use the standard primitive structure
Expand All @@ -116,7 +116,7 @@ class PhononMaker(Maker):
seekpath can be used with any kind of unit cell as
it relies on phonopy to handle the relationship
to the primitive cell and not pymatgen
code: str
code: str = "vasp"
determines the DFT code. currently only vasp is implemented.
This keyword might enable the implementation of other codes
in the future
Expand Down Expand Up @@ -195,20 +195,18 @@ def make(
)

if (
not self.use_symmetrized_structure == "primitive"
self.use_symmetrized_structure != "primitive"
and self.kpath_scheme != "seekpath"
):
raise ValueError(
"You can only use other kpath schemes with the primitive standard "
"structure"
)

if self.kpath_scheme not in [
"seekpath",
"hinuma",
"setyawan_curtarolo",
"latimer_munro",
]:
if (
self.kpath_scheme
not in "seekpath hinuma setyawan_curtarolo latimer_munro".split()
):
raise ValueError("kpath scheme is not implemented")

jobs = []
Expand Down

0 comments on commit 0c8eff8

Please sign in to comment.