diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index f900fb9359..2245e0b1cb 100644 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -262,6 +262,7 @@ jobs: if [ -z "${P12_PASSWORD}" ]; then unset CODESIGN_IDENTITY # to prevent cpack failing when trying to sign fi + [[ ! "${GITHUB_REF}" =~ "tags" ]] && export SNAPSHOT_DATE=`date -j "+%d-%m-%y"` cpack ${{ matrix.config.cpack_flags }} working-directory: ${{ runner.workspace }}/build/avogadroapp env: diff --git a/.github/workflows/build_m1.yml b/.github/workflows/build_m1.yml index 87b4dcaf33..8da270d647 100644 --- a/.github/workflows/build_m1.yml +++ b/.github/workflows/build_m1.yml @@ -145,6 +145,8 @@ jobs: # signing occurs via avogadroapp cpack instructions fi # certificate exists fi # password exists + # remove any previous DMG in case they're still around + rm -f avogadroapp/*.dmg - name: Create Mac and Windows Packages shell: bash @@ -152,6 +154,7 @@ jobs: if [ -z "${P12_PASSWORD}" ]; then unset CODESIGN_IDENTITY # to prevent cpack failing when trying to sign fi + [[ ! "${GITHUB_REF}" =~ "tags" ]] && export SNAPSHOT_DATE=`date -j "+%d-%m-%y"` cpack ${{ matrix.config.cpack_flags }} working-directory: ${{ runner.workspace }}/build/avogadroapp env: diff --git a/avogadro/core/molecule.cpp b/avogadro/core/molecule.cpp index e2a4028407..e04046c925 100644 --- a/avogadro/core/molecule.cpp +++ b/avogadro/core/molecule.cpp @@ -1055,6 +1055,28 @@ void Molecule::perceiveBondsSimple(const double tolerance, const double min) Vector3 jpos = m_positions3d[j]; Vector3 diff = jpos - ipos; + // Don't automatically bond nobel gases to anything + switch (atomicNumber(i)) { + case 2: // He + case 10: // Ne + case 18: // Ar + case 36: // Kr + continue; + default: + break; + } + + // now for the other atom + switch (atomicNumber(j)) { + case 2: // He + case 10: // Ne + case 18: // Ar + case 36: // Kr + continue; + default: + break; + } + if (std::fabs(diff[0]) > cutoff || std::fabs(diff[1]) > cutoff || std::fabs(diff[2]) > cutoff || (atomicNumber(i) == 1 && atomicNumber(j) == 1))