g_sham: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/bin/g_sham - from package: gromacs

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/bin/g_sham - from package: gromacs

You may install the required package with command apt-get install {package}
Error in other languages:
g_sham: bevel nie gevind nie
g_sham: comandă negăsită
g_sham: comando não encontrado
g_sham: commande introuvable
g_sham: command not found
g_sham: käsku ei ole
g_sham: không tìm thấy lệnh
g_sham: komanda nerasta
g_sham: Kommando nicht gefunden.
g_sham: kommandot finns inte
g_sham: komut yok
g_sham: nie znaleziono polecenia
g_sham: níor aimsíodh an t-ordú
g_sham: no se encontró la orden
g_sham: no s'ha trobat l'ordre
g_sham: opdracht niet gevonden
g_sham: parancs nem található
g_sham: perintah tidak ditemukan
g_sham: príkaz nenájdený
g_sham: příkaz nenalezen
g_sham: команда не найдена
g_sham: командата не е открита
g_sham: 命令找不到
g_sham: コマンドが見つかりません