From a6e57d4298353b6804c6263d90952fbe78c221e4 Mon Sep 17 00:00:00 2001 From: Geoff Hutchison Date: Fri, 2 Feb 2024 20:07:11 -0500 Subject: [PATCH 1/2] Only use the obmm interface as a backup - prefer Python scripts Signed-off-by: Geoff Hutchison --- avogadro/qtplugins/forcefield/forcefield.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/avogadro/qtplugins/forcefield/forcefield.cpp b/avogadro/qtplugins/forcefield/forcefield.cpp index 285a9e2920..dbd734eff4 100644 --- a/avogadro/qtplugins/forcefield/forcefield.cpp +++ b/avogadro/qtplugins/forcefield/forcefield.cpp @@ -61,13 +61,13 @@ Forcefield::Forcefield(QObject* parent_) m_gradientTolerance = settings.value("gradientTolerance", 1.0e-4).toDouble(); settings.endGroup(); + refreshScripts(); + // add the openbabel calculators in case they don't exist Calc::EnergyManager::registerModel(new OBMMEnergy("MMFF94")); Calc::EnergyManager::registerModel(new OBMMEnergy("UFF")); Calc::EnergyManager::registerModel(new OBMMEnergy("GAFF")); - refreshScripts(); - QAction* action = new QAction(this); action->setEnabled(true); action->setText(tr("Optimize")); From b03ac7cddc82dee84ea35f57779a6fde86206083 Mon Sep 17 00:00:00 2001 From: Geoff Hutchison Date: Fri, 2 Feb 2024 20:16:39 -0500 Subject: [PATCH 2/2] Swap keyboard shortut for optimize geometry Signed-off-by: Geoff Hutchison --- avogadro/qtplugins/forcefield/forcefield.cpp | 3 ++- avogadro/qtplugins/openbabel/openbabel.cpp | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/avogadro/qtplugins/forcefield/forcefield.cpp b/avogadro/qtplugins/forcefield/forcefield.cpp index dbd734eff4..9c40925350 100644 --- a/avogadro/qtplugins/forcefield/forcefield.cpp +++ b/avogadro/qtplugins/forcefield/forcefield.cpp @@ -70,7 +70,8 @@ Forcefield::Forcefield(QObject* parent_) QAction* action = new QAction(this); action->setEnabled(true); - action->setText(tr("Optimize")); + action->setText(tr("Optimize Geometry")); + action->setShortcut(QKeySequence("Ctrl+Alt+O")); action->setData(optimizeAction); action->setProperty("menu priority", 920); connect(action, SIGNAL(triggered()), SLOT(optimize())); diff --git a/avogadro/qtplugins/openbabel/openbabel.cpp b/avogadro/qtplugins/openbabel/openbabel.cpp index 6abb19b2cc..68b6eb3893 100644 --- a/avogadro/qtplugins/openbabel/openbabel.cpp +++ b/avogadro/qtplugins/openbabel/openbabel.cpp @@ -45,7 +45,6 @@ OpenBabel::OpenBabel(QObject* p) auto* action = new QAction(this); action->setEnabled(true); action->setText(tr("Optimize Geometry")); - action->setShortcut(QKeySequence("Ctrl+Alt+O")); connect(action, SIGNAL(triggered()), SLOT(onOptimizeGeometry())); m_actions.push_back(action);