Skip to content

Commit 33cbc86

Browse files
authored
Merge pull request #778 from MichaelWolloch/MaxForceHandler_and_R2SCAN_FIX
Max force handler and r2scan fixes
2 parents f4060e5 + 61bda34 commit 33cbc86

File tree

10 files changed

+19
-57
lines changed

10 files changed

+19
-57
lines changed

.github/workflows/test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ jobs:
3838
3939
- name: Install dependencies
4040
run: |
41-
pip install -r requirements-ci.txt
4241
pip install .[complete]
4342
4443
- name: pytest

atomate/vasp/config.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818
# the initial relaxation of a structure optimization for faster performance
1919
HALF_KPOINTS_FIRST_RELAX = False
2020

21-
# maximum force allowed on atom for successful structure optimization
22-
RELAX_MAX_FORCE = 0.25
23-
2421
# this is a three-way toggle on what to do if your job looks OK,
2522
# but is actually unconverged (either electronic or ionic).
2623
# True -> mark job as COMPLETED, but defuse children.

atomate/vasp/firetasks/run_calc.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
FrozenJobErrorHandler,
1515
IncorrectSmearingHandler,
1616
LargeSigmaHandler,
17-
MaxForceErrorHandler,
1817
MeshSymmetryErrorHandler,
1918
NonConvergingErrorHandler,
2019
PositiveEnergyErrorHandler,
@@ -81,8 +80,6 @@ class RunVaspCustodian(FiretaskBase):
8180
handler_group: (str | list[ErrorHandler]) - group of handlers to use. See handler_groups dict in the code or
8281
the groups and complete list of handlers in each group. Alternatively, you can
8382
specify a list of ErrorHandler objects.
84-
max_force_threshold: (float) - if >0, adds MaxForceErrorHandler. Not recommended for
85-
nscf runs.
8683
scratch_dir: (str) - if specified, uses this directory as the root scratch dir.
8784
Supports env_chk.
8885
gzip_output: (bool) - gzip output (default=T)
@@ -100,7 +97,6 @@ class RunVaspCustodian(FiretaskBase):
10097
optional_params = [
10198
"job_type",
10299
"handler_group",
103-
"max_force_threshold",
104100
"scratch_dir",
105101
"gzip_output",
106102
"max_errors",
@@ -267,11 +263,6 @@ def run_task(self, fw_spec):
267263
else:
268264
handlers = handler_group
269265

270-
if self.get("max_force_threshold"):
271-
handlers.append(
272-
MaxForceErrorHandler(max_force_threshold=self["max_force_threshold"])
273-
)
274-
275266
if self.get("wall_time"):
276267
handlers.append(WalltimeHandler(wall_time=self["wall_time"]))
277268

atomate/vasp/fireworks/core.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
from atomate.vasp.config import (
2828
DB_FILE,
2929
HALF_KPOINTS_FIRST_RELAX,
30-
RELAX_MAX_FORCE,
3130
VASP_CMD,
3231
VDW_KERNEL_DIR,
3332
)
@@ -65,7 +64,6 @@ def __init__(
6564
db_file=DB_FILE,
6665
force_gamma=True,
6766
job_type="double_relaxation_run",
68-
max_force_threshold=RELAX_MAX_FORCE,
6967
auto_npar=">>auto_npar<<",
7068
half_kpts_first_relax=HALF_KPOINTS_FIRST_RELAX,
7169
parents=None,
@@ -86,7 +84,6 @@ def __init__(
8684
db_file (str): Path to file specifying db credentials to place output parsing.
8785
force_gamma (bool): Force gamma centered kpoint generation
8886
job_type (str): custodian job type (default "double_relaxation_run")
89-
max_force_threshold (float): max force on a site allowed at end; otherwise, reject job
9087
auto_npar (bool or str): whether to set auto_npar. defaults to env_chk: ">>auto_npar<<"
9188
half_kpts_first_relax (bool): whether to use half the kpoints for the first relaxation
9289
parents ([Firework]): Parents of this particular Firework.
@@ -111,7 +108,6 @@ def __init__(
111108
RunVaspCustodian(
112109
vasp_cmd=vasp_cmd,
113110
job_type=job_type,
114-
max_force_threshold=max_force_threshold,
115111
ediffg=ediffg,
116112
auto_npar=auto_npar,
117113
half_kpts_first_relax=half_kpts_first_relax,
@@ -243,7 +239,7 @@ def __init__(
243239

244240
# Enable vdW for the SCAN step
245241
settings["_set"]["LUSE_VDW"] = True
246-
settings["_set"]["BPARAM"] = 15.7
242+
settings["_set"]["BPARAM"] = 11.95
247243

248244
t.append(ModifyIncar(incar_dictmod=settings))
249245

@@ -266,7 +262,7 @@ def __init__(
266262
# Disable vdW for the precondition step
267263
if vasp_input_set_params.get("vdw"):
268264
pre_opt_settings.update({"_unset": {"LUSE_VDW": True,
269-
"BPARAM": 15.7,
265+
"BPARAM": 11.95,
270266
"METAGGA": metagga_type}})
271267

272268
t.append(ModifyIncar(incar_dictmod=pre_opt_settings))

atomate/vasp/test_files/SCAN_structure_optimization_LiF_vdw/inputs/INCAR

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ LMIXTAU = True
1717
LORBIT = 11
1818
LREAL = Auto
1919
LUSE_VDW = True
20-
BPARAM = 15.7
20+
BPARAM = 11.95
2121
LVTOT = True
2222
LWAVE = False
2323
MAGMOM = 2*0.6

atomate/vasp/vasp_config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
LOBSTER_CMD,
1313
LOBSTERINPUT_FILES,
1414
LOBSTEROUTPUT_FILES,
15-
RELAX_MAX_FORCE,
1615
SCRATCH_DIR,
1716
SMALLGAP_KPOINT_MULTIPLY,
1817
STABILITY_CHECK,

atomate/vasp/workflows/base/magnetism.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,6 @@ def _add_metadata(structure):
315315
vasp_input_set=vis,
316316
vasp_cmd=c["VASP_CMD"],
317317
db_file=c["DB_FILE"],
318-
max_force_threshold=0.05,
319318
half_kpts_first_relax=False,
320319
name=name + " optimize",
321320
)

requirements-ci.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.

requirements.txt

Lines changed: 0 additions & 16 deletions
This file was deleted.

setup.py

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,34 +23,39 @@
2323
},
2424
zip_safe=False,
2525
install_requires=[
26-
"custodian>=2019.8.24",
26+
"custodian>=2023.7.22",
2727
"FireWorks>=2.0.3",
28-
"maggma>=0.44.0",
29-
"monty>=2.0.6",
28+
"maggma>=0.51.25",
29+
"monty>=2023.5.8",
3030
"networkx",
3131
"numpy",
3232
"pandas",
3333
"paramiko",
34-
"pydash>=4.1.0",
35-
"pymatgen-analysis-diffusion",
36-
"pymatgen-analysis-defects>=2022.9.14",
37-
"pymatgen",
34+
"pydash>=7.0.6",
35+
"pymatgen-analysis-diffusion>=2022.7.21",
36+
"pymatgen-analysis-defects>=2023.7.24",
37+
"pymatgen>=2023.7.20",
3838
"pymongo",
3939
"pyyaml>=5.1.2",
4040
"ruamel.yaml",
4141
"scipy",
42-
"tqdm>=4.7.4",
42+
"tqdm>=4.65.0",
4343
],
4444
extras_require={
4545
"plotting": ["matplotlib>=1.5.2"],
4646
"phonons": ["phonopy>=1.10.8"],
47-
"qchem": ["openbabel"],
47+
"qchem": ["openbabel-wheel"],
4848
"defects": ["pymatgen-analysis-defects"],
4949
"complete": [
5050
"matplotlib>=1.5.2",
5151
"phonopy>=1.10.8",
52-
"openbabel",
53-
"pymatgen-analysis-defects",
52+
"openbabel-wheel",
53+
"boto3>=1.28.15",
54+
"Flask>=2.3.2",
55+
"coverage>=7.2.7",
56+
"moto>=4.1.14",
57+
"pytest-cov>=4.1.0",
58+
"pytest>=7.4.0",
5459
],
5560
},
5661
classifiers=[

0 commit comments

Comments
 (0)