dev:codestructure
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| dev:codestructure [2020/08/21 10:15] – external edit 127.0.0.1 | dev:codestructure [2026/10/14 08:42] (current) – fstein | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== CP2K Code Structure ====== | ====== CP2K Code Structure ====== | ||
| - | CP2K is a large, complex application which has many features, methods and algorithms implemented. | + | This page has been moved to [[https://manual.cp2k.org/trunk/development/code-structure.html]] |
| - | + | ||
| - | ====== File Names ====== | + | |
| - | Source files should have prefixes corresponding to their main functionalities. For example: | + | |
| - | + | ||
| - | * '' | + | |
| - | * '' | + | |
| - | * '' | + | |
| - | * '' | + | |
| - | * '' | + | |
| - | * '' | + | |
| - | * '' | + | |
| - | * '' | + | |
| - | * '' | + | |
| - | * '' | + | |
| - | * '' | + | |
| - | * '' | + | |
| - | * '' | + | |
| - | + | ||
| - | These prefixes are not exclusive, nor are they always logical. There are exceptions in code naming conventions, | + | |
| - | + | ||
| - | * '' | + | |
| - | + | ||
| - | ====== Overall Structure ====== | + | |
| - | + | ||
| - | * Extensive use of Fortran modules, and there are //no// global variables | + | |
| - | * Major parts of the CP2K code are compiled into separate libraries, for example: | + | |
| - | * '' | + | |
| - | * each library corresponds to a '' | + | |
| - | + | ||
| - | ====== Structure of Quickstep ====== | + | |
| - | + | ||
| - | Quickstep part of the CP2K code calculates the ab initio self-consistent Kohn-Sham energy and the associated forces of a periodic system. The calculation involves | + | |
| - | + | ||
| - | * Construction of the Kohn-Sham energy functional and Hamiltonian, | + | |
| - | * Mapping of operators represented as matrices in Gaussian basis onto the real space (RS) multi-grids (//collocation//). This is required for the computation of the Hartree potential, which is calculated in the planewave basis, and the exchange-correlation energy density functional | + | |
| - | * Mapping of functions defined on the RS grids into matrix elements represented in the Gaussian basis (// | + | |
| - | * Fast Fourier Transform that maps functions defined on each level of the RS multi-grid into the corresponding planewave coefficients; | + | |
| - | * Dense and Sparse linear algebra operations, e.g. matrix multiplications | + | |
| - | * Minimisation of the Kohn-Sham energy with respect to the electronic density matrix (using matrix operations) | + | |
| - | * Self-consistent cycle for the electronic charge density | + | |
| - | + | ||
| - | Most of the computational time are spent on: | + | |
| - | + | ||
| - | * Collocation | + | |
| - | * Integration | + | |
| - | * Linear algebraic operations | + | |
| - | * Fast Fourier Transforms | + | |
| - | + | ||
| - | ===== Data Structure of Key Variables ===== | + | |
| - | + | ||
| - | This subsection is the modules containing the definition the key data used in Quickstep calculations | + | |
| - | + | ||
| - | * Electronic density and its derivatives, | + | |
| - | * Module: '' | + | |
| - | * File: '' | + | |
| - | * Container type: '' | + | |
dev/codestructure.txt · Last modified: by fstein
