Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
janosh committed Jun 4, 2024
1 parent eca133b commit d6bb092
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
9 changes: 2 additions & 7 deletions custodian/vasp/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1343,16 +1343,11 @@ def correct(self, directory="./"):
# sigma_new = [E_entropy(new) / E_entropy(current) ]**(0.5) * sigma_current,
# Practically, E_entropy(new) = 1 meV/atom
if sigma > self.min_sigma:
updated_sigma = max(self.min_sigma, 0.8 * (self.e_entropy_tol / self.entropy_per_atom) ** (0.5) * sigma)
actions.append(
{
"dict": "INCAR",
"action": {
"_set": {
"SIGMA": max(
self.min_sigma, 0.8 * (self.e_entropy_tol / self.entropy_per_atom) ** (0.5) * sigma
)
}
},
"action": {"_set": {"SIGMA": updated_sigma}},
}
)
elif ismear != 0:
Expand Down
13 changes: 1 addition & 12 deletions tests/vasp/test_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,18 +815,7 @@ def test_check_with_non_kspacing_wf(self) -> None:

class LargeSigmaHandlerTest(PymatgenTest):
def setUp(self) -> None:
copy_tmp_files(
self.tmp_path,
*[
f"large_sigma/{f}"
for f in (
"INCAR",
"POSCAR",
"OUTCAR_fail_sigma_check.gz",
"OUTCAR_pass_sigma_check.gz",
)
],
)
copy_tmp_files(self.tmp_path, **glob("large_sigma/*", root_dir=TEST_FILES))

def test_check_correct_large_sigma(self) -> None:
# first check should reduce sigma
Expand Down

0 comments on commit d6bb092

Please sign in to comment.