From 243a201df4ddcd6220755db6282fefb319196b30 Mon Sep 17 00:00:00 2001 From: Geoff Hutchison Date: Mon, 25 Nov 2024 19:02:51 -0500 Subject: [PATCH 1/2] Only sign Windows releases since they require manual approval Signed-off-by: Geoff Hutchison --- .github/workflows/build_windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index d40c1a1ced..628ed84af2 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -135,8 +135,8 @@ jobs: path: ${{ runner.workspace }}/build/avogadroapp/Avogadro*.* name: ${{ matrix.config.artifact }} - - name: Sign Windows artifact - if: matrix.config.os == 'windows-latest' && github.ref == 'refs/heads/master' + - name: Sign Windows release + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/') uses: signpath/github-action-submit-signing-request@v1 with: api-token: '${{ secrets.SIGNPATH_API_TOKEN }}' From 6b051ff7bf312cdae0288c72144b61e7397bb34b Mon Sep 17 00:00:00 2001 From: Geoff Hutchison Date: Tue, 26 Nov 2024 12:10:13 -0500 Subject: [PATCH 2/2] Add support for MBIS variant of Hirshfeld charges in Orca Signed-off-by: Geoff Hutchison --- avogadro/quantumio/orca.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/avogadro/quantumio/orca.cpp b/avogadro/quantumio/orca.cpp index 52c15598f6..37cab18084 100644 --- a/avogadro/quantumio/orca.cpp +++ b/avogadro/quantumio/orca.cpp @@ -278,9 +278,17 @@ void ORCAOutput::processLine(std::istream& in, GaussianSet* basis) getline(in, key); //------------ } else if (Core::contains(key, "HIRSHFELD ANALYSIS")) { m_currentMode = HirshfeldCharges; + m_chargeType = "Hirshfeld"; for (unsigned int i = 0; i < 6; ++i) { getline(in, key); // skip header } + } else if (Core::contains(key, "MBIS ANALYSIS")) { + // MBIS analysis is similar to Hirshfeld, but with different headers + m_currentMode = HirshfeldCharges; + m_chargeType = "MBIS"; + for (unsigned int i = 0; i < 9; ++i) { + getline(in, key); // skip header + } } else if (Core::contains(key, "ATOMIC CHARGES")) { m_currentMode = Charges; // figure out what type of charges we have @@ -288,6 +296,10 @@ void ORCAOutput::processLine(std::istream& in, GaussianSet* basis) if (list.size() > 2) { m_chargeType = Core::trimmed(list[0]); // e.g. MULLIKEN or LOEWDIN } + // lowercase everything except the first letter + for (unsigned int i = 1; i < m_chargeType.size(); ++i) { + m_chargeType[i] = tolower(m_chargeType[i]); + } getline(in, key); // skip ------------ } else if (Core::contains(key, "VIBRATIONAL FREQUENCIES")) { m_currentMode = Frequencies; @@ -370,7 +382,7 @@ void ORCAOutput::processLine(std::istream& in, GaussianSet* basis) list = Core::split(key, ' '); while (!key.empty()) { - if (list.size() != 4) { + if (list.size() < 4) { break; } // e.g. index atom charge spin @@ -384,7 +396,7 @@ void ORCAOutput::processLine(std::istream& in, GaussianSet* basis) list = Core::split(key, ' '); } - m_partialCharges["Hirshfeld"] = charges; + m_partialCharges[m_chargeType] = charges; m_currentMode = NotParsing; break; }