howto:install_with_plumed
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| howto:install_with_plumed [2014/09/30 12:39] – created 130.60.136.214 | howto: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) versions of PLUMED. | ||
| - | The current svn version | + | To use plumed, insert the following in the FREE_ENERGY section |
| - | A modified version of PLUMED as well as some test input files can be found at: [[https://drive.google.com/folderview? | + | < |
| - | The files '' | + | & |
| + | | ||
| + | | ||
| + | &END METADYN | ||
| + | </ | ||
| + | |||
| + | ===== 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 in version 2.7 (rev 15615 or later). | ||
| + | |||
| + | * Download the PLUMED library from [[http:// | ||
| + | |||
| + | * Modify your CP2K arch file to include the following: | ||
| + | |||
| + | < | ||
| + | include / | ||
| + | EXTERNAL_OBJECTS=$(PLUMED_STATIC_DEPENDENCIES) | ||
| + | </ | ||
| + | |||
| + | * '' | ||
| + | < | ||
| + | If using OpenMPI, you will also need to add '' | ||
| + | </ | ||
| + | |||
| + | * It is also possible to build PLUMED as a shared library, in which case instead of using '' | ||
| + | |||
| + | * Finally, build the CP2K binaries as normal: | ||
| + | |||
| + | < | ||
| + | make -j ARCH=Linux-x86-64-gfortran VERSION=popt | ||
| + | </ | ||
| + | |||
| + | ===== PLUMED 1.3 ===== | ||
| + | |||
| + | CP2K is already prepared for compilation with PLUMED and contains all the relevant interface code. | ||
| + | A modified version of PLUMED as well as some test input files can be found at: [[http://www.cp2k.org/ | ||
| + | The files '' | ||
| These files are also provided separately and can simply be copied into an existing plumed distribution. | These files are also provided separately and can simply be copied into an existing plumed distribution. | ||
| Line 10: | Line 47: | ||
| - | get the latest | + | Get a version (between revisions 14363 / 30-Sep-2014 and 16584 / 04-Feb-2016) of cp2k from the git repository. |
| - | svn checkout svn://svn.code.sf.net/p/cp2k/code/trunk cp2k-code | + | < |
| + | git clone https://github.com/cp2k/cp2k.git | ||
| + | </code> | ||
| + | Unpack the modified plumed-1.3 archive somewhere (the metadyn.c/ | ||
| - | unpack the modified plumed-1.3 archive somewhere (the metadyn.c/ | + | < |
| - | tar xjfv plumed-1.3.tar.bz2 | + | tar xjfv plumed-1.3.tar.bz2 |
| + | </ | ||
| | | ||
| - | set the environment variable $plumedir to the root directory of the plumed distribution | + | Set the environment variable |
| - | export plumedir=/ | + | |
| - | + | ||
| - | change into the cp2k root directory and symlink the plumed/ | + | |
| - | cd / | + | |
| - | ln -s $plumedir/ | + | |
| - | run the plumedpatch_cp2k script with parameter -patch, it should create a subdirectory src-plumed containing a number of cpp files and a plumed.inc | + | < |
| - | ./ | + | export plumedir=/ |
| + | </ | ||
| + | |||
| + | Change into the cp2k root directory and symlink the plumed/ | ||
| + | |||
| + | < | ||
| + | cd / | ||
| + | ln -s $plumedir/ | ||
| + | </ | ||
| + | |||
| + | Run the plumedpatch_cp2k script with parameter -patch, it should create a subdirectory src-plumed containing a number of cpp files and a plumed.inc | ||
| + | |||
| + | < | ||
| + | ./ | ||
| + | </ | ||
| | | ||
| - | Change into the src-plumed subdirectory; | + | Change into the src-plumed subdirectory; |
| - | cd src-plumed/ | + | < |
| - | make -f makefile_for_cp2k | + | cd src-plumed/ |
| + | make -f makefile_for_cp2k | ||
| + | </ | ||
| | | ||
| Make sure the following lines are present in your '' | Make sure the following lines are present in your '' | ||
| - | | + | < |
| - | PLUMEDINC | + | PLUMEDDIR |
| - | include $(PLUMEDINC) | + | PLUMEDINC |
| - | EXTERNAL_OBJECTS=$(OBJ_PLUMED) | + | include $(PLUMEDINC) |
| - | and '' | + | EXTERNAL_OBJECTS=$(OBJ_PLUMED) |
| + | </ | ||
| + | |||
| + | '' | ||
| - | 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 |
| - | make -j ARCH=Linux-x86-64-gfortran-plumed VERSION=popt cp2k | + | < |
| - | + | make -j ARCH=Linux-x86-64-gfortran-plumed VERSION=popt cp2k | |
| + | </ | ||
| test (e.g. using the provided testinput) and run | test (e.g. using the provided testinput) and run | ||
| - | To use plumed, insert the following in the FREE_ENERGY section of a cp2k input file: | + | <note important> |
| - | & | + | |
| - | USE_PLUMED .TRUE. | + | |
| - | PLUMED_INPUT_FILE ./ | + | |
| - | & | + | |
| - | + | ||
| - | <WRAP center round tip 60%> | + | |
| Every time you want to rebuild cp2k you will have to go through the two-step procedure of making the plumed objects first, and then building cp2k. | Every time you want to rebuild cp2k you will have to go through the two-step procedure of making the plumed objects first, and then building cp2k. | ||
| When running the regtest scripts, be sure to use the option -nobuild, to avoid deleting the plumed objects before running the tests. | When running the regtest scripts, be sure to use the option -nobuild, to avoid deleting the plumed objects before running the tests. | ||
| - | </WRAP> | + | </note> |
howto/install_with_plumed.1412080745.txt.gz · Last modified: (external edit)
