CPMD-3.13.1 Car-Parrinello Molecular Dynamics

As the CPMD mailing list shows, compiling CPMD often is a hurdle. That can be avoided: 

Here we describe a simple installation of CPMD on a single CPU 32-bit machine. It can be a Windows or a Linux box. We insert a Knoppix live DVD and restart the machine. In two minutes we get a running Linux system offering all the necessary programs and libraries to compile and run CPMD as explained below.

This has been tested with KNOPPIX-5.3 live DVDs.
  • Download KNOPPIX_V5.3.1DVD-2008-26-03-EN.iso (instead of EN you can also grab the DE language DVD) and burn the DVD.
  • Insert the DVD into your reader and restart the machine. KNOPPIX goes on-line as live operating system entirely in RAM having (usually) already established your internet connection.
With the following 8 steps (or fully automatically) you will have compiled CPMD and done a successful computation in less than 15 minutes.
  1. Start a browser and get cpmd3.13_1.tar.gz (you need a password) and cpmd-test.tar.gz (under /contrib) from http://www.cpmd.org
  2. tar xzvf cpmd3.13_1.tar.gz into /home/knoppix which creates ~/CPMD-3.13.1
  3. Go to ~/CPMD-3.13.1/SOURCE/CONFIGURE and make PC-GFORTRAN writeable
  4. Edit this file on line 12 to
    LFLAGS='-L/usr/lib/atlas -llapack -lblas'. Save the edited file.
  5. Go back to ../SOURCE and type
    ./mkconfig.sh PC-GFORTRAN > Makefile
  6. Now type make   the compilation starts, and in a few minutes the linker makes cpmd.x. Copy cp cpmd.x ..
  7. Unpack cpmd-test.tar.gz and go into directory ~/CPMD-test/properties. Copy b2h6-wf.inp and the two *.psp files into ~/CPMD-3.13.1
  8. In ~/CPMD-3.13.1 type
    ./cpmd.x b2h6-wf.inp > b2h6-wf.out
    The run optimizes the wavefunctions of B2H6 and takes about 5 min on a P4/3GHz machine. Compare b2h6-wf.out to the same file under /properties in CPMD-test
Congratulations! You have done it.
Run a few more of the test files. The other three *.inp files from /properties only take a few minutes and then you can produce all the instructive visualizations of orbitals and (charge-)densities shown in that file, using the visualizing manual of Axel Kohlmeyer.
With many other input files in the test suite you will find that you really need a 64-bit computer and preferably a (huge) cluster of those to start seriously with CPMD! This setup of CPMD is practical for educational purposes, familiarizing yourself with input and learning to understand output. Then look into the Fine Manual and start a few (smaller) jobs of your own. Study the excellent tutorial of Kohlmeyer and that of Marx and Hutter or Hutter's lecture notes.

Before closing Knoppix down, make sure to copy cpmd.x to an external device, e.g. an USB-stick. Otherwise you lose your work!

Notice: Compiling on these live-CD(DVD)s is ideal, because compiler, linker, libraries, username etc. are all given. Of course, you can copy the compilate cpmd.x to other Linux installations. Make sure to also copy the following three libraries: /usr/lib/libgfortran.so.2, /usr/lib/atlas/liblapack.so.3, and /usr/lib/atlas/libblas.so.3. If you copy the libraries into the same directories (as root) as here, no problems. You can also copy them into ~/CPMD-3.13.1 and then start cpmd.x with a small script cpmdloc.sh adding the correct library path: Type ./cpmdloc.sh inputfile > outputfile to run a CPMD job.

Another benefit from this CPMD installation: After termination of your live Linux there is no trace left of your CPMD escapades and you can startup your computer with the old, boring, programs!
Acknowledgment: I thank Axel Kohlmeyer for tips.


Return to main page of Qantumchemistry.