User Tools

Site Tools


exercises:2025_cp2k_crystallography:ex1

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

The keyword METHOD specifies QUICKSTEP as the approach for evaluating the forces on the atoms, i.e. density functional theory using the Gaussian and Plane Waves (GPW) method.

The subsection SUBSYS defines the simulation unit cell and the initial coordinates of the atoms in the calculation.

&SUBSYS
  &CELL
    ABC 5.94 12.274 5.806
    ALPHA_BETA_GAMMA 90.0 90.0 90.0
  &END CELL
  &COORD
    H 2.524500 3.041497 1.962428
    ...
  &END COORD
  &KIND H
    ELEMENT H
    BASIS_SET DZVP-GTH-PBE
    POTENTIAL GTH-PBE-q1
  &END KIND
  &KIND C
    ELEMENT C
    BASIS_SET DZVP-GTH-PBE
    POTENTIAL GTH-PBE-q4
  &END KIND
  &KIND N
    ELEMENT N
    BASIS_SET DZVP-GTH-PBE
    POTENTIAL GTH-PBE-q5
  &END KIND
  &KIND O
    ELEMENT O
    BASIS_SET DZVP-GTH-PBE
    POTENTIAL GTH-PBE-q6
  &END KIND
&END SUBSYS
exercises/2025_cp2k_crystallography/ex1.1758571674.txt.gz · Last modified: by bsertcan