

function plumed_preliminary_test(){
# check if the README contains the word GROMACS and if gromacs has been already configured
  grep -q ESPRESSO  README 1>/dev/null 2>/dev/null && test -f make.inc 
}

function plumed_before_patch(){
cp make.inc make.inc.old
PWD=`pwd`
echo "include  ${PWD}/Plumed.inc ">make.inc
awk '{if($1=="LIBS" && $2=="="){print $0" $(PLUMED_LOAD) "}else{print }}' make.inc.old >>make.inc
}

function plumed_after_revert(){
  mv make.inc.old make.inc
}

function plumed_patch_info(){
  echo ""
  echo "For more information on Quantum Espresso you should visit http://www.quantum-espresso.org"
  echo "This patch was kindly provided by Ralf Meyer, email: meyer.ralf(at)yahoo.com"
}

plumed_ignore_mpi=yes

