Skip to content

Commit

Permalink
Merge pull request #1337 from ghutchis/fix-ob-autodetect
Browse files Browse the repository at this point in the history
Fix autodetect for force field with inorganic complexes
  • Loading branch information
ghutchis authored Sep 11, 2023
2 parents 7ed1c8c + 9bf0590 commit 891a387
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions avogadro/qtplugins/openbabel/openbabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -837,13 +837,10 @@ QString OpenBabel::autoDetectForceField() const
*eleIter != "N" && *eleIter != "O" && *eleIter != "P" &&
*eleIter != "S") {
gaffValid = false;
mmff94Valid = false;

// These are supported by MMFF94 (but not GAFF)
if (*eleIter != "Fe" && *eleIter != "Li" && *eleIter != "Na" &&
*eleIter != "K" && *eleIter != "Zn" && *eleIter != "Ca" &&
*eleIter != "Cu" && *eleIter != "Mg" && *eleIter != "Na") {
mmff94Valid = false;
}
// MMFF94 supports isolated metal ions but it's safer to use UFF
// Fixes #1324
}
++eleIter;
}
Expand Down

0 comments on commit 891a387

Please sign in to comment.