Skip to content

Commit

Permalink
Use OB code if GPL plugins are used. Otherwise scripts & obmm
Browse files Browse the repository at this point in the history
Signed-off-by: Geoff Hutchison <[email protected]>
  • Loading branch information
ghutchis committed Feb 3, 2024
1 parent 0d195b8 commit 5ab05dc
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions avogadro/qtplugins/forcefield/forcefield.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,21 @@ Forcefield::Forcefield(QObject* parent_)

// add the openbabel calculators in case they don't exist
#ifdef BUILD_GPL_PLUGINS
// These directly use Open Babel and are fast
Calc::EnergyManager::registerModel(new OBEnergy("MMFF94"));
Calc::EnergyManager::registerModel(new OBEnergy("UFF"));
Calc::EnergyManager::registerModel(new OBEnergy("GAFF"));
#else
#endif

refreshScripts();

#ifndef BUILD_GPL_PLUGINS
// These call obmm and can be slow
Calc::EnergyManager::registerModel(new OBMMEnergy("MMFF94"));
Calc::EnergyManager::registerModel(new OBMMEnergy("UFF"));
Calc::EnergyManager::registerModel(new OBMMEnergy("GAFF"));
#endif

refreshScripts();

QAction* action = new QAction(this);
action->setEnabled(true);
action->setText(tr("Optimize Geometry"));
Expand Down

0 comments on commit 5ab05dc

Please sign in to comment.