From ad21c32891b9d0f62b8b95f4f001f796ba00a41b Mon Sep 17 00:00:00 2001 From: Geoff Hutchison Date: Mon, 14 Oct 2024 18:27:21 -0400 Subject: [PATCH] Fixed to work with Q-chem example with intensities Signed-off-by: Geoff Hutchison --- avogadro/quantumio/molden.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/avogadro/quantumio/molden.cpp b/avogadro/quantumio/molden.cpp index 08beeb1b5..e551dca45 100644 --- a/avogadro/quantumio/molden.cpp +++ b/avogadro/quantumio/molden.cpp @@ -252,6 +252,7 @@ void MoldenFile::processLine(std::istream& in) // or we're at the next vibration if (m_vibDisplacements.size() == m_frequencies.size()) { // TODO: might need to go back to read intensities + in.seekg(currentPos); break; } } @@ -265,6 +266,12 @@ void MoldenFile::processLine(std::istream& in) if (list.size() == 2) m_RamanIntensities.push_back(Core::lexicalCast(list[1])); + if (m_IRintensities.size() == m_frequencies.size()) { + // we're done + break; + } + + currentPos = in.tellg(); getline(in, line); line = Core::trimmed(line); }