From 3c248d9dbefc9e2d79c8f19867ae58b4eae8fc49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Mon, 17 Feb 2025 13:17:47 +0100 Subject: [PATCH] fix inconsistencies in ORCA interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel Müller --- src/mindlessgen/prog/config.py | 2 +- src/mindlessgen/qm/orca.py | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/mindlessgen/prog/config.py b/src/mindlessgen/prog/config.py index 0162edd..ed931a6 100644 --- a/src/mindlessgen/prog/config.py +++ b/src/mindlessgen/prog/config.py @@ -741,7 +741,7 @@ class PostProcessConfig(BaseConfig): def __init__(self: PostProcessConfig) -> None: self._engine: str = "orca" - self._opt_cycles: int | None = 5 + self._opt_cycles: int | None = None self._optimize: bool = True self._debug: bool = False self._ncores: int = 4 diff --git a/src/mindlessgen/qm/orca.py b/src/mindlessgen/qm/orca.py index 31f2120..76e954a 100644 --- a/src/mindlessgen/qm/orca.py +++ b/src/mindlessgen/qm/orca.py @@ -171,7 +171,7 @@ def _gen_input( """ orca_input = f"! {self.cfg.functional} {self.cfg.basis}\n" orca_input += f"! DEFGRID{self.cfg.gridsize}\n" - orca_input += "! NoTRAH NoSOSCF SlowConv\n" + orca_input += "! NoTRAH\n" # "! AutoAux" keyword for super-heavy elements as def2/J ends at Rn if any(atom >= 86 for atom in molecule.ati): orca_input += "! AutoAux\n" @@ -179,9 +179,10 @@ def _gen_input( orca_input += "! OPT\n" if opt_cycles is not None: orca_input += f"%geom MaxIter {opt_cycles} end\n" - orca_input += ( - f"%scf\n\tMaxIter {self.cfg.scf_cycles}\n\tConvergence Medium\nend\n" - ) + orca_input += f"%scf\n\tMaxIter {self.cfg.scf_cycles}\n" + if not optimization: + orca_input += "\tConvergence Medium\n" + orca_input += "end\n" orca_input += f"%pal nprocs {ncores} end\n\n" orca_input += f"* xyzfile {molecule.charge} {molecule.uhf + 1} {xyzfile}\n" return orca_input