diff --git a/avogadro/calc/lennardjones.h b/avogadro/calc/lennardjones.h index ca31279113..821b6827a4 100644 --- a/avogadro/calc/lennardjones.h +++ b/avogadro/calc/lennardjones.h @@ -35,6 +35,8 @@ class AVOGADROCALC_EXPORT LennardJones : public EnergyCalculator return "Universal Lennard-Jones potential"; } + bool acceptsIons() const override { return true; } + bool acceptsRadicals() const override { return true; } bool acceptsUnitCell() const override { return true; } Core::Molecule::ElementMask elements() const override { return (m_elements); } diff --git a/avogadro/qtplugins/forcefield/scriptenergy.cpp b/avogadro/qtplugins/forcefield/scriptenergy.cpp index 293d1cac02..1a117b94a2 100644 --- a/avogadro/qtplugins/forcefield/scriptenergy.cpp +++ b/avogadro/qtplugins/forcefield/scriptenergy.cpp @@ -122,7 +122,9 @@ Real ScriptEnergy::value(const Eigen::VectorXd& x) QString::number(x[i + 1]).toUtf8() + " " + QString::number(x[i + 2]).toUtf8() + "\n"; } + // qDebug() << " wrote coords "; QByteArray result = m_interpreter->asyncWriteAndResponse(input); + // qDebug() << " got result " << result; // go through lines in result until we see "AvogadroEnergy: " QStringList lines = QString(result).remove('\r').split('\n'); @@ -325,7 +327,7 @@ void ScriptEnergy::readMetaData() m_inputFormat = inputFormatTmp; // check ions, radicals, unit cells - /* + /* e.g., "unitCell": False, "gradients": True, "ion": False, diff --git a/avogadro/qtplugins/forcefield/scriptenergy.h b/avogadro/qtplugins/forcefield/scriptenergy.h index 9aab7bf0a1..3c4a6d5db2 100644 --- a/avogadro/qtplugins/forcefield/scriptenergy.h +++ b/avogadro/qtplugins/forcefield/scriptenergy.h @@ -61,9 +61,9 @@ class ScriptEnergy : public Avogadro::Calc::EnergyCalculator Core::Molecule::ElementMask elements() const override { return m_elements; } bool supportsGradients() const { return m_gradients; } - bool supportsIons() const { return m_ions; } - bool supportsRadicals() const { return m_radicals; } - bool supportsUnitCells() const { return m_unitCells; } + bool acceptsIons() const override { return m_ions; } + bool acceptsRadicals() const override { return m_radicals; } + bool acceptsUnitCell() const override { return m_unitCells; } // This will check if the molecule is valid for this script // and then start the external process