Skip to content

Commit

Permalink
Merge pull request #214 from arosen93/deepsource-autofix-410176b2
Browse files Browse the repository at this point in the history
Refactor `if` expression
  • Loading branch information
Andrew-S-Rosen authored Apr 7, 2023
2 parents 68e8dc3 + ef01fe5 commit 94cc46f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions quacc/recipes/gulp/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ def make(self, atoms: Atoms) -> Dict[str, Any]:

default_keywords = {
"gfnff": self.gfnff,
"gwolf": True if self.gfnff and atoms.pbc.any() else False,
"gwolf": bool(self.gfnff and atoms.pbc.any()),
}
default_options = {
"dump every gulp.res": True,
"output cif gulp.cif": True if atoms.pbc.any() else False,
"output xyz gulp.xyz": False if atoms.pbc.any() else True,
"output cif gulp.cif": bool(atoms.pbc.any()),
"output xyz gulp.xyz": not atoms.pbc.any(),
}

keywords = merge_dicts(
Expand Down Expand Up @@ -138,14 +138,14 @@ def make(self, atoms: Atoms) -> Dict[str, Any]:
default_keywords = {
"opti": True,
"gfnff": self.gfnff,
"gwolf": True if self.gfnff and atoms.pbc.any() else False,
"conp": True if self.volume_relax and atoms.pbc.any() else False,
"conv": True if not self.volume_relax or not atoms.pbc.any() else False,
"gwolf": bool(self.gfnff and atoms.pbc.any()),
"conp": bool(self.volume_relax and atoms.pbc.any()),
"conv": bool(not self.volume_relax or not atoms.pbc.any()),
}
default_options = {
"dump every gulp.res": True,
"output cif gulp.cif": True if atoms.pbc.any() else False,
"output xyz gulp.xyz": False if atoms.pbc.any() else True,
"output cif gulp.cif": bool(atoms.pbc.any()),
"output xyz gulp.xyz": not atoms.pbc.any(),
}

keywords = merge_dicts(
Expand Down

0 comments on commit 94cc46f

Please sign in to comment.