

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.sys 
}

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

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

function plumed_patch_info(){
  echo ""
  echo "For more information on Quantum Espresso you should visit http://www.quantum-espresso.org"
}

plumed_ignore_mpi=yes

