Mandatory and recommended patches tested against CP2K trunk svn version 19 Dec 2012 (NB).
   svn://svn.code.sf.net/p/cp2k/code/trunk

MANDATORY patches for cp2k source:
  cp2k_motion_utils.F.patch (fixes output for parsing by cp2k_driver)

RECOMMENDED patches:
  cp2k_reftraj.patch (enables &REFTRAJ&WAIT in cp2k, which QUIP uses for cp2k_filepot persistent connections)
  cp2k_colvar_restraint_constraint_print.patch (printing of of atoms/restraint forces for COLVARs.
      Not actually used by QUIP, just useful for pure CP2K umbrella integration)

OPTIONAL patches:
  cp2k_silica.patch (CV: Silica potential)

OUTDATED patches:
  cp2k_wfn_read.patch (makes cp2k only check for wfn existence on ionode, as of 13 Nov 2012 in CP2K SVN trunk)
  cp2k_speed.patch (improves speed, especially for QM/MM in parallel, with force error < 1e-9, as of 13 Nov 2012 in CP2K SVN trunk)
  cp2k_fft_lib.patch (fixes dependencies for MKL fft library, as of 13 Nov 2012 in CP2K SVN trunk)

  cp2k_speed.patch.outdated (speed improvements that are now, as of 20 April 2011, in the CP2K
                             CVS repository)
  cp2k_exyz.patch.OUTDATED (OUTDATED, no need for EXYZ reading anyway, all additional
    information (beyond plain XYZ) is transmitted via CELL section and PSF file.
    Enables CP2K reading of our extended xyz format.)
    verified to be compatible with cp2k data structures as of 15 Dec 2010.
  cp2k_topology_pdb.F.patch.OUTDATED (OUTDATED, don't use if you enable exyz reading, which is more 
    accurate and only supported way right now)

Use them by going to the CP2K cp2k/src directory, and running
  patch -l -F 4 -p0 < path_to_your_QUIP_Core/cp2k_driver/cp2k_motion_utils.F.patch
  patch -l -F 4 -p0 < path_to_your_QUIP_Core/cp2k_driver/cp2k_speed.patch
  patch -l -F 4 -p0 < path_to_your_QUIP_Core/cp2k_driver/cp2k_fft_lib.patch
  patch -l -F 4 -p0 < patch_to_your_QUIP_Core/cp2k_driver/cp2k_colvar_restraint_constraint_print.patch
  patch -l -F 4 -p0 < patch_to_your_QUIP_Core/cp2k_driver/cp2k_reftraj.patch

Add to your path the cp2k programs:
  serial: cp2k.serial 
  parallel: cp2k.popt (the driver runs it with 4 proc: mpirun -np 4 cp2k.popt)
Or just pass the cp2k_program=path_to_your_program/cp2k.sopt argument to the filepot

Files needed for CP2K runs:
  POTENTIAL
  MM_POTENTIAL
  BASIS_SETS
  charmm.pot : force field
  all_res.CHARMM.lib: motif library
