exercises:2025_cp2k_crystallography:ex1
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| exercises:2025_cp2k_crystallography:ex1 [2025/09/22 20:02] – bsertcan | exercises:2025_cp2k_crystallography:ex1 [2025/09/26 13:06] (current) – bsertcan | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| 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. | 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 ===== | ===== Input files ===== | ||
| - | We first look at the input files required for this calculation, | + | We first look at the files required for this calculation, |
| * '' | * '' | ||
| Line 24: | Line 22: | ||
| ===== Input structure ===== | ===== Input structure ===== | ||
| - | Let us look at the main input: '' | + | Let us look at the main input: '' |
| The main sections in the input file are: | The main sections in the input file are: | ||
| - | * '' | + | * '' |
| - | * '' | + | * '' |
| - | Example | + | We now look at each section in detail, starting with the '' |
| < | < | ||
| &GLOBAL | &GLOBAL | ||
| Line 39: | Line 37: | ||
| &END GLOBAL | &END GLOBAL | ||
| </ | </ | ||
| + | Here we perform a static energy calculation; | ||
| - | Here we perform a static energy calculation. '' | ||
| - | '' | ||
| - | Next, we examine the '' | + | Next, we examine the '' |
| + | |||
| + | '' | ||
| + | |||
| + | The keyword '' | ||
| + | density functional theory using the Gaussian and Plane Waves (GPW) method. | ||
| + | |||
| + | The subsection '' | ||
| + | calculation. | ||
| + | < | ||
| + | & | ||
| + | &CELL | ||
| + | ABC 5.94 12.274 5.806 | ||
| + | ALPHA_BETA_GAMMA 90.0 90.0 90.0 | ||
| + | &END CELL | ||
| + | & | ||
| + | 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 | ||
| + | </ | ||
| + | |||
| + | The subsection '' | ||
| + | |||
| + | The initial atomic coordinates are specified in the '' | ||
| + | ''< | ||
| + | where $X$, $Y$, $Z$ are Cartesian coordinates in Å. This can be changed by configuring keyword '' | ||
| + | |||
| + | <note classic> | ||
| + | **Task:** Obtain the CIF file from the WebCSD (Refcode LALNIN23) and load it into CP2K in place of manual coordinates. You can compare your input to the example [[https:// | ||
| + | </ | ||
| + | |||
| + | The subsection '' | ||
| + | |||
| + | The basis set and pseudopotential names must correspond to an existing entry in the corresponding basis set and pseudopotential files defined by the '' | ||
| + | <note classic> | ||
| + | **Task:** Identify where these files are located. | ||
| + | </ | ||
| + | |||
| + | <note important> | ||
| + | **Hint:** The path where CP2K is located is printed in the beginning of the output file. | ||
| + | </ | ||
| + | |||
| + | After the '' | ||
| + | |||
| + | < | ||
| + | BASIS_SET_FILE_NAME | ||
| + | POTENTIAL_FILE_NAME | ||
| + | </ | ||
| + | |||
| + | As already mentioned above, the keywords '' | ||
| + | < | ||
| + | &QS | ||
| + | EPS_DEFAULT 1.0E-10 | ||
| + | &END QS | ||
| + | </ | ||
| + | |||
| + | General control parameters for QUICKSTEP are specified in the '' | ||
| + | |||
| + | < | ||
| + | & | ||
| + | NGRIDS 4 | ||
| + | CUTOFF 300 | ||
| + | REL_CUTOFF 60 | ||
| + | &END MGRID | ||
| + | </ | ||
| + | |||
| + | The '' | ||
| + | |||
| + | <note classic> | ||
| + | **Task:** Increase the grid parameters and compare how this affects both the energy and the computational time. | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | &XC | ||
| + | & | ||
| + | &END XC_FUNCTIONAL | ||
| + | &END XC | ||
| + | </ | ||
| + | |||
| + | This subsection defines which exchange–correlation density functional we want to use. In this case we choose the PBE functional, which is consistent with the basis set and pseudopotential we have chosen. | ||
| + | < | ||
| + | &SCF | ||
| + | SCF_GUESS ATOMIC | ||
| + | EPS_SCF 1.0E-7 | ||
| + | MAX_SCF 300 | ||
| + | & | ||
| + | ALGORITHM STANDARD | ||
| + | &END DIAGONALIZATION | ||
| + | & | ||
| + | METHOD BROYDEN_MIXING | ||
| + | ALPHA 0.4 | ||
| + | NBROYDEN 8 | ||
| + | &END MIXING | ||
| + | &END SCF | ||
| + | </ | ||
| + | |||
| + | The '' | ||
| + | |||
| + | '' | ||
| + | |||
| + | < | ||
| + | & | ||
| + | ALGORITHM STANDARD | ||
| + | &END DIAGONALIZATION | ||
| + | </ | ||
| + | |||
| + | The '' | ||
| + | |||
| + | < | ||
| + | &MIXING T | ||
| + | METHOD BROYDEN_MIXING | ||
| + | ALPHA 0.4 | ||
| + | NBROYDEN 8 | ||
| + | &END MIXING | ||
| + | </ | ||
| + | |||
| + | The '' | ||
| + | |||
| + | ===== Running the calculation and analysing the output files ===== | ||
| + | |||
| + | To run the calculation, | ||
| + | |||
| + | < | ||
| + | cp2k.psmp -o Lalanine.out Lalanine.inp & | ||
| + | </ | ||
| + | |||
| + | This launches CP2K in the background. The option '' | ||
| + | |||
| + | After the job has finished, the following files should be present: | ||
| + | - '' | ||
| + | - '' | ||
| + | |||
| + | The file '' | ||
| + | |||
| + | If you want to start a new calculation from previously calculated wavefunctions, | ||
| + | < | ||
| + | SCF_GUESS RESTART | ||
| + | </ | ||
| - | ``` METHOD Quickstep``` | + | This requires that the new calculation uses the same '' |
| + | <note classic> | ||
| + | **Task:** Try this and check how it affects the computational time. | ||
| + | </ | ||
| + | In the output file, CP2K reports quantities such as the number of electrons, the number of occupied orbitals, the SCF convergence behaviour, the total energy, and the atomic forces. During the class we will examine these sections of the output in detail. | ||
exercises/2025_cp2k_crystallography/ex1.1758571358.txt.gz · Last modified: by bsertcan
