User Tools

Site Tools


howto:install_with_plumed

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
howto:install_with_plumed [2015/02/26 14:29] ibethunehowto:install_with_plumed [2020/08/21 10:15] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== How to Compile and Install CP2K with PLUMED ====== ====== How to Compile and Install CP2K with PLUMED ======
  
-CP2K supports the current (2.x) and previous (1.3) versions of PLUMED.  Please scroll down to the relevant set of instructions depending on which version you wish to use.+CP2K supports the current (2.x) versions of PLUMED.  PLUMED 1.3 support is available in CP2K releases 2.4 up to 3.0. Please scroll down to the relevant set of instructions depending on which version you wish to use.
  
 To use plumed, insert the following in the FREE_ENERGY section of a cp2k input file: To use plumed, insert the following in the FREE_ENERGY section of a cp2k input file:
Line 13: Line 13:
 ===== PLUMED 2.x ===== ===== PLUMED 2.x =====
  
-CP2K may be used with PLUMED version 2.x without requiring source code patches - the interface to PLUMED is already included in CP2K since revision 15100 (24-Feb-2015).  To build a version of CP2K with PLUMED 2 follow the instructions below:+CP2K may be used with PLUMED version 2.x without requiring source code patches - the interface to PLUMED is already included in CP2K in version 2.7 (rev 15615 or later).  To build a version of CP2K with PLUMED 2 follow the instructions below:
  
-  * Download the PLUMED library from [[http://www.plumed-code.org/get-it]], build and install following the instructions in the PLUMED documentation.+  * Download the PLUMED library from [[http://www.plumed.org/]], build and install following the instructions in the PLUMED documentation.
  
   * Modify your CP2K arch file to include the following:   * Modify your CP2K arch file to include the following:
Line 24: Line 24:
 </code> </code>
  
-  * ''-D<nowiki>__</nowiki>PLUMED2'' should be added to your DFLAGS and ''-lz -ldl -lstdc++'' to your LDFLAGS+  * ''-D<nowiki>__</nowiki>PLUMED2'' should be added to your DFLAGS and ''-lz -ldl -lstdc++'' to your LIBS variable 
 +<note> 
 +If using OpenMPI, you will also need to add ''-lmpi_cxx -lrt'' to LIBS 
 +</note>
  
-  * It is also possible to build PLUMED as a shared library, in which case instead of using ''EXTERNAL_OBJECTS'' simply add ''-lplumed'' to  the LDFLAGS above.+  * It is also possible to build PLUMED as a shared library, in which case instead of using ''EXTERNAL_OBJECTS'' simply add ''-lplumed'' to the LIBS above.
  
   * Finally, build the CP2K binaries as normal:   * Finally, build the CP2K binaries as normal:
Line 44: Line 47:
  
  
-Get the latest version (newer than revision 14363 / 30-Sep-2014) of cp2k from the svn repository.+Get version (between revisions 14363 / 30-Sep-2014 and 16584 / 04-Feb-2016) of cp2k from the git repository.
  
 <code> <code>
-svn checkout svn://svn.code.sf.net/p/cp2k/code/trunk cp2k-code+git clone https://github.com/cp2k/cp2k.git
 </code> </code>
  
Line 89: Line 92:
 </code> </code>
  
-''-D__PLUMED_CP2K'' should be specified among the ''DFLAGS'' and ''-lstdc++'' in the ''LDFLAGS''+''-D__PLUMED_CP2K'' should be specified among the ''DFLAGS'' and ''-lstdc++'' in the ''LIBS''
    
 Compile cp2k [only cp2k, not the other binaries of the package] as usual on your system Compile cp2k [only cp2k, not the other binaries of the package] as usual on your system
howto/install_with_plumed.1424960950.txt.gz · Last modified: 2020/08/21 10:15 (external edit)