Skip to content

Commit

Permalink
Support SOS-MP2 and SCS-MP2 (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhollas authored Aug 16, 2023
1 parent fe307c3 commit 21f0d4d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions aiidalab_ispg/app/atmospec_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,15 @@ def _observe_gs_sync(self, change):
self.ground_state_settings.basis.value
)
gs_method = self.ground_state_settings.method.value
if gs_method.lower() not in ("ri-mp2", "mp2"):
if "mp2" not in gs_method.lower():
self.excited_state_settings.tddft_functional.value = gs_method

def _observe_gs_method(self, change):
"""Update TDDFT functional if ground state functional is changed"""
gs_method = change["new"]
if gs_method is not None and (
self.excited_state_settings.ground_state_sync.value
and gs_method.lower() not in ("ri-mp2", "mp2")
and "mp2" not in gs_method.lower()
):
self.excited_state_settings.tddft_functional.value = gs_method

Expand Down Expand Up @@ -311,7 +311,7 @@ def _add_optimization_orca_params(self, base_orca_parameters, basis, gs_method):
opt_params["input_keywords"].append("AnFreq")
# For MP2, analytical frequencies are only available without Frozen Core
# TODO: Add this to optimization workflow
if gs_method.lower() in ("ri-mp2", "mp2"):
if "mp2" in gs_method.lower():
opt_params["input_keywords"].append("NoFrozenCore")
opt_params["input_keywords"].append(f"{basis}/C")
opt_params["input_blocks"]["mp2"] = {"maxcore": MEMORY_PER_CPU}
Expand Down
2 changes: 1 addition & 1 deletion aiidalab_ispg/app/optimization_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def _build_orca_params(self, params: OptimizationParameters) -> dict:
input_keywords.append(f"CPCM({params.solvent})")

# For MP2, analytical frequencies are only available without Frozen Core
if params.method.lower() in ("ri-mp2", "mp2"):
if "mp2" in params.method.lower():
input_keywords.append("NoFrozenCore")
input_keywords.append(f"{params.basis}/C")
input_blocks["mp2"] = {"maxcore": MEMORY_PER_CPU}
Expand Down

0 comments on commit 21f0d4d

Please sign in to comment.