#! /bin/bash

function _gromacs_bin_dir() {
  local arch
  arch='SSE2'
  case $( sysctl -a | grep '^hw.optional\..*: 1$' ) in
    *avx512f*)
      test -d "/Users/distiller/project/miniconda/conda-bld/gromacs_1615970215028/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/bin.AVX_512" &&         "/Users/distiller/project/miniconda/conda-bld/gromacs_1615970215028/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/bin.AVX_512/identifyavx512fmaunits" | grep -q '2' &&         arch='AVX_512'
    ;;
    *\ avx2\ * | *avx2_0*)
      test -d "/Users/distiller/project/miniconda/conda-bld/gromacs_1615970215028/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/bin.AVX2_256" &&         arch='AVX2_256'
    ;;
    *\ avx\ * | *avx1_0*)
      test -d "/Users/distiller/project/miniconda/conda-bld/gromacs_1615970215028/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/bin.AVX_256" &&         arch='AVX_256'
  esac
  printf '%s' "/Users/distiller/project/miniconda/conda-bld/gromacs_1615970215028/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/bin.${arch}"
}

. "$( _gromacs_bin_dir )/GMXRC" "${@}"
