This is an old revision of the document!
Exercise 1: Electronic energy of the L-alanine crystal
Most parts of this exercise are adapted from the cubic Si example on the CP2K “How to” website: How to Calculate Energy and Forces
As a first step, we perform a static self-consistent Kohn–Sham density functional theory (DFT) calculation to obtain the electronic energy. Our model system is the L-alanine crystal, consisting of 13 atoms per molecule and 4 molecules in the unit cell.
The example input and output files are in … The calculations were performed with CP2K version 2025.1.
Input files
We first look at the input files required for this calculation, which are:
- Lalanine.inp: the main input file for the calculation, which defines the system and the job parameters
- Lalanine.cif: the coordinate file when defined externally
Parameter files:
- BASIS_SET: file containing parameters for the basis sets
- GTH_POTENTIALS: file containing parameters for the pseudopotentials
A list of basis set and pseudopotential files may be found in `cp2k/data/`, which comes with a CP2K source release.
Input structure
Let us look at the main input: Lalanine.inp in detail.
The main sections in the input file are:
- GLOBAL: contains general options for the CP2K run
- FORCE_EVAL: contains parameters for forces and initial atomic coordinates
Example GLOBAL section: ``` &GLOBAL PROJECT LALANINE RUN_TYPE ENERGY PRINT_LEVEL MEDIUM &END GLOBAL ```
Here we perform a static energy calculation. `RUN_TYPE` must be set to `ENERGY`. `PROJECT` sets the root name of the calculation. `PRINT_LEVEL` controls verbosity.
Next, we examine the FORCE_EVAL section: ``` METHOD Quickstep```
