From 889b729cb0c44468907518de41cff6f6f52c9911 Mon Sep 17 00:00:00 2001 From: mwolloch Date: Fri, 28 Jul 2023 12:42:22 +0200 Subject: [PATCH 1/9] Removed MaxForceHandler because it is removed from custodian since v2023.5.7 https://materialsproject.github.io/custodian/changelog.html#v2023-5-7 --- atomate/vasp/firetasks/run_calc.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/atomate/vasp/firetasks/run_calc.py b/atomate/vasp/firetasks/run_calc.py index a726a78dc..c4e491d31 100644 --- a/atomate/vasp/firetasks/run_calc.py +++ b/atomate/vasp/firetasks/run_calc.py @@ -14,7 +14,6 @@ FrozenJobErrorHandler, IncorrectSmearingHandler, LargeSigmaHandler, - MaxForceErrorHandler, MeshSymmetryErrorHandler, NonConvergingErrorHandler, PositiveEnergyErrorHandler, @@ -81,8 +80,6 @@ class RunVaspCustodian(FiretaskBase): handler_group: (str | list[ErrorHandler]) - group of handlers to use. See handler_groups dict in the code or the groups and complete list of handlers in each group. Alternatively, you can specify a list of ErrorHandler objects. - max_force_threshold: (float) - if >0, adds MaxForceErrorHandler. Not recommended for - nscf runs. scratch_dir: (str) - if specified, uses this directory as the root scratch dir. Supports env_chk. gzip_output: (bool) - gzip output (default=T) @@ -267,11 +264,6 @@ def run_task(self, fw_spec): else: handlers = handler_group - if self.get("max_force_threshold"): - handlers.append( - MaxForceErrorHandler(max_force_threshold=self["max_force_threshold"]) - ) - if self.get("wall_time"): handlers.append(WalltimeHandler(wall_time=self["wall_time"])) From 28162fb3bf16996267ffe1d884194cd04c37ce23 Mon Sep 17 00:00:00 2001 From: mwolloch Date: Fri, 28 Jul 2023 12:43:48 +0200 Subject: [PATCH 2/9] Updated BPARAM from 15.7 (appropriate for SCAN+rVV10) to 11.95 (appropriate for R2SCAN+rVV10) --- atomate/vasp/fireworks/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/atomate/vasp/fireworks/core.py b/atomate/vasp/fireworks/core.py index b15fcf692..1136b8030 100644 --- a/atomate/vasp/fireworks/core.py +++ b/atomate/vasp/fireworks/core.py @@ -243,7 +243,7 @@ def __init__( # Enable vdW for the SCAN step settings["_set"]["LUSE_VDW"] = True - settings["_set"]["BPARAM"] = 15.7 + settings["_set"]["BPARAM"] = 11.95 t.append(ModifyIncar(incar_dictmod=settings)) @@ -266,7 +266,7 @@ def __init__( # Disable vdW for the precondition step if vasp_input_set_params.get("vdw"): pre_opt_settings.update({"_unset": {"LUSE_VDW": True, - "BPARAM": 15.7, + "BPARAM": 11.95, "METAGGA": metagga_type}}) t.append(ModifyIncar(incar_dictmod=pre_opt_settings)) From f837799c681e50de01c3516464bb1a5827b560d5 Mon Sep 17 00:00:00 2001 From: mwolloch Date: Fri, 28 Jul 2023 13:07:43 +0200 Subject: [PATCH 3/9] removed max_force_threshold and RELAX_MAX_FORCE (its default) from the code. Those worked as an input for the removed MaxForceErrorHandler --- atomate/vasp/config.py | 3 --- atomate/vasp/fireworks/core.py | 4 ---- atomate/vasp/vasp_config.py | 1 - 3 files changed, 8 deletions(-) diff --git a/atomate/vasp/config.py b/atomate/vasp/config.py index 1c18cfc9a..8a842d353 100644 --- a/atomate/vasp/config.py +++ b/atomate/vasp/config.py @@ -18,9 +18,6 @@ # the initial relaxation of a structure optimization for faster performance HALF_KPOINTS_FIRST_RELAX = False -# maximum force allowed on atom for successful structure optimization -RELAX_MAX_FORCE = 0.25 - # this is a three-way toggle on what to do if your job looks OK, # but is actually unconverged (either electronic or ionic). # True -> mark job as COMPLETED, but defuse children. diff --git a/atomate/vasp/fireworks/core.py b/atomate/vasp/fireworks/core.py index 1136b8030..7292a64dc 100644 --- a/atomate/vasp/fireworks/core.py +++ b/atomate/vasp/fireworks/core.py @@ -27,7 +27,6 @@ from atomate.vasp.config import ( DB_FILE, HALF_KPOINTS_FIRST_RELAX, - RELAX_MAX_FORCE, VASP_CMD, VDW_KERNEL_DIR, ) @@ -65,7 +64,6 @@ def __init__( db_file=DB_FILE, force_gamma=True, job_type="double_relaxation_run", - max_force_threshold=RELAX_MAX_FORCE, auto_npar=">>auto_npar<<", half_kpts_first_relax=HALF_KPOINTS_FIRST_RELAX, parents=None, @@ -86,7 +84,6 @@ def __init__( db_file (str): Path to file specifying db credentials to place output parsing. force_gamma (bool): Force gamma centered kpoint generation job_type (str): custodian job type (default "double_relaxation_run") - max_force_threshold (float): max force on a site allowed at end; otherwise, reject job auto_npar (bool or str): whether to set auto_npar. defaults to env_chk: ">>auto_npar<<" half_kpts_first_relax (bool): whether to use half the kpoints for the first relaxation parents ([Firework]): Parents of this particular Firework. @@ -111,7 +108,6 @@ def __init__( RunVaspCustodian( vasp_cmd=vasp_cmd, job_type=job_type, - max_force_threshold=max_force_threshold, ediffg=ediffg, auto_npar=auto_npar, half_kpts_first_relax=half_kpts_first_relax, diff --git a/atomate/vasp/vasp_config.py b/atomate/vasp/vasp_config.py index ad13eae36..de8008568 100644 --- a/atomate/vasp/vasp_config.py +++ b/atomate/vasp/vasp_config.py @@ -12,7 +12,6 @@ LOBSTER_CMD, LOBSTERINPUT_FILES, LOBSTEROUTPUT_FILES, - RELAX_MAX_FORCE, SCRATCH_DIR, SMALLGAP_KPOINT_MULTIPLY, STABILITY_CHECK, From 018db1b2de1474cb5681fe58d524be1cc30e6a8d Mon Sep 17 00:00:00 2001 From: mwolloch Date: Fri, 28 Jul 2023 14:35:31 +0200 Subject: [PATCH 4/9] Changed the BPARAM value also for the test file. --- .../test_files/SCAN_structure_optimization_LiF_vdw/inputs/INCAR | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atomate/vasp/test_files/SCAN_structure_optimization_LiF_vdw/inputs/INCAR b/atomate/vasp/test_files/SCAN_structure_optimization_LiF_vdw/inputs/INCAR index 53ad93e0b..458e8e7d4 100644 --- a/atomate/vasp/test_files/SCAN_structure_optimization_LiF_vdw/inputs/INCAR +++ b/atomate/vasp/test_files/SCAN_structure_optimization_LiF_vdw/inputs/INCAR @@ -17,7 +17,7 @@ LMIXTAU = True LORBIT = 11 LREAL = Auto LUSE_VDW = True -BPARAM = 15.7 +BPARAM = 11.95 LVTOT = True LWAVE = False MAGMOM = 2*0.6 From ab17bccefa6908a99333bfe93e792e86bafe5e03 Mon Sep 17 00:00:00 2001 From: mwolloch Date: Tue, 1 Aug 2023 14:48:36 +0200 Subject: [PATCH 5/9] removed two more instances of "max_force_threshold" --- atomate/vasp/firetasks/run_calc.py | 1 - atomate/vasp/workflows/base/magnetism.py | 1 - 2 files changed, 2 deletions(-) diff --git a/atomate/vasp/firetasks/run_calc.py b/atomate/vasp/firetasks/run_calc.py index c4e491d31..9b771c221 100644 --- a/atomate/vasp/firetasks/run_calc.py +++ b/atomate/vasp/firetasks/run_calc.py @@ -97,7 +97,6 @@ class RunVaspCustodian(FiretaskBase): optional_params = [ "job_type", "handler_group", - "max_force_threshold", "scratch_dir", "gzip_output", "max_errors", diff --git a/atomate/vasp/workflows/base/magnetism.py b/atomate/vasp/workflows/base/magnetism.py index 689b8d51a..8d360a4d4 100644 --- a/atomate/vasp/workflows/base/magnetism.py +++ b/atomate/vasp/workflows/base/magnetism.py @@ -315,7 +315,6 @@ def _add_metadata(structure): vasp_input_set=vis, vasp_cmd=c["VASP_CMD"], db_file=c["DB_FILE"], - max_force_threshold=0.05, half_kpts_first_relax=False, name=name + " optimize", ) From 35b05d75a127341ea43010f2b02154f64a62f312 Mon Sep 17 00:00:00 2001 From: mwolloch Date: Tue, 1 Aug 2023 15:42:13 +0200 Subject: [PATCH 6/9] updated requirements to current versions --- requirements-ci.txt | 16 ++++++++-------- requirements.txt | 28 ++++++++++++++-------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/requirements-ci.txt b/requirements-ci.txt index a99e92fe2..a1314347a 100644 --- a/requirements-ci.txt +++ b/requirements-ci.txt @@ -1,8 +1,8 @@ -pymatgen==2023.3.10 -custodian==2023.3.10 -boto3==1.17.97 -Flask==2.1.3 -coverage==5.5 -moto==3.1.18 -pytest-cov==2.12.1 -pytest==6.2.4 +pymatgen==2023.7.20 +custodian==2023.7.22 +boto3==1.28.15 +Flask==2.3.2 +coverage==7.2.7 +moto==4.1.14 +pytest-cov==4.1.0 +pytest==7.4.0 diff --git a/requirements.txt b/requirements.txt index dac48b90d..e308b3610 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,16 +1,16 @@ -pymatgen==2023.3.10 -custodian==2023.3.10 +pymatgen==2023.7.20 +custodian==2023.7.22 FireWorks==2.0.3 -maggma==0.48.1 -monty==2022.9.9 -networkx==2.8.6 -numpy==1.23.3 -pandas==1.4.4 -paramiko==2.11.0 -pydash==5.1.0 +maggma==0.51.25 +monty==2023.5.8 +networkx==3.1 +numpy==1.25.1 +pandas==2.0.3 +paramiko==3.3.1 +pydash==7.0.6 pymatgen-analysis-diffusion==2022.7.21 -pymatgen-analysis-defects==2022.9.14 -pymongo==4.2.0 -ruamel.yaml==0.17.21 -scipy==1.9.1 -tqdm==4.64.1 +pymatgen-analysis-defects==2023.7.24 +pymongo==4.4.1 +ruamel.yaml==0.17.32 +scipy==1.11.1 +tqdm==4.65.0 From babb9f96718ddf6643a499ebd0af4c38903d23f7 Mon Sep 17 00:00:00 2001 From: mwolloch Date: Tue, 1 Aug 2023 16:32:08 +0200 Subject: [PATCH 7/9] added openbabel to CI requirements. Unfortunately the wheel for the official package is broken, so I resorted to using https://pypi.org/project/openbabel-wheel/ --- requirements-ci.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements-ci.txt b/requirements-ci.txt index a1314347a..60d6d1b40 100644 --- a/requirements-ci.txt +++ b/requirements-ci.txt @@ -6,3 +6,4 @@ coverage==7.2.7 moto==4.1.14 pytest-cov==4.1.0 pytest==7.4.0 +openbabel-wheel==3.1.1.16 From aafb7f5f4346adc49f593ada63f307261d831a08 Mon Sep 17 00:00:00 2001 From: mwolloch Date: Wed, 2 Aug 2023 10:27:24 +0200 Subject: [PATCH 8/9] updated setup.py to modern versions --- setup.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/setup.py b/setup.py index 7465ca74f..4e545c39e 100644 --- a/setup.py +++ b/setup.py @@ -23,34 +23,33 @@ }, zip_safe=False, install_requires=[ - "custodian>=2019.8.24", + "custodian>=2023.7.22", "FireWorks>=2.0.3", - "maggma>=0.44.0", - "monty>=2.0.6", + "maggma>=0.51.25", + "monty>=2023.5.8", "networkx", "numpy", "pandas", "paramiko", - "pydash>=4.1.0", - "pymatgen-analysis-diffusion", - "pymatgen-analysis-defects>=2022.9.14", - "pymatgen", + "pydash>=7.0.6", + "pymatgen-analysis-diffusion>=2022.7.21", + "pymatgen-analysis-defects>=2023.7.24", + "pymatgen>=2023.7.20", "pymongo", "pyyaml>=5.1.2", "ruamel.yaml", "scipy", - "tqdm>=4.7.4", + "tqdm>=4.65.0", ], extras_require={ "plotting": ["matplotlib>=1.5.2"], "phonons": ["phonopy>=1.10.8"], - "qchem": ["openbabel"], + "qchem": ["openbabel-wheel"], "defects": ["pymatgen-analysis-defects"], "complete": [ "matplotlib>=1.5.2", "phonopy>=1.10.8", - "openbabel", - "pymatgen-analysis-defects", + "openbabel-wheel", ], }, classifiers=[ From 61bda3417388bcacfbe238b2d6955d008d290a05 Mon Sep 17 00:00:00 2001 From: mwolloch Date: Wed, 2 Aug 2023 15:58:34 +0200 Subject: [PATCH 9/9] removed requirements.txt and requirements-ci.txt and updated setup.py to handle all dependencies. --- .github/workflows/test.yml | 1 - requirements-ci.txt | 9 --------- requirements.txt | 16 ---------------- setup.py | 6 ++++++ 4 files changed, 6 insertions(+), 26 deletions(-) delete mode 100644 requirements-ci.txt delete mode 100644 requirements.txt diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 254b18178..907004d2d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,7 +38,6 @@ jobs: - name: Install dependencies run: | - pip install -r requirements-ci.txt pip install .[complete] - name: pytest diff --git a/requirements-ci.txt b/requirements-ci.txt deleted file mode 100644 index 60d6d1b40..000000000 --- a/requirements-ci.txt +++ /dev/null @@ -1,9 +0,0 @@ -pymatgen==2023.7.20 -custodian==2023.7.22 -boto3==1.28.15 -Flask==2.3.2 -coverage==7.2.7 -moto==4.1.14 -pytest-cov==4.1.0 -pytest==7.4.0 -openbabel-wheel==3.1.1.16 diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index e308b3610..000000000 --- a/requirements.txt +++ /dev/null @@ -1,16 +0,0 @@ -pymatgen==2023.7.20 -custodian==2023.7.22 -FireWorks==2.0.3 -maggma==0.51.25 -monty==2023.5.8 -networkx==3.1 -numpy==1.25.1 -pandas==2.0.3 -paramiko==3.3.1 -pydash==7.0.6 -pymatgen-analysis-diffusion==2022.7.21 -pymatgen-analysis-defects==2023.7.24 -pymongo==4.4.1 -ruamel.yaml==0.17.32 -scipy==1.11.1 -tqdm==4.65.0 diff --git a/setup.py b/setup.py index 4e545c39e..c9eface9a 100644 --- a/setup.py +++ b/setup.py @@ -50,6 +50,12 @@ "matplotlib>=1.5.2", "phonopy>=1.10.8", "openbabel-wheel", + "boto3>=1.28.15", + "Flask>=2.3.2", + "coverage>=7.2.7", + "moto>=4.1.14", + "pytest-cov>=4.1.0", + "pytest>=7.4.0", ], }, classifiers=[