User Tools

Site Tools


howto:static_calculation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
howto:static_calculation [2014/02/09 14:57] – static_calculation renamed to howto:static_calculation oschuetthowto:static_calculation [2020/08/21 10:15] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== Introduction ======+====== How to Calculate Energy and Forces ======
  
 +===== Introduction =====
 In this tutorial, we are going to show the reader how to perform a In this tutorial, we are going to show the reader how to perform a
 simple static self-consistent Kohn-Sham Density Functional Theory simple static self-consistent Kohn-Sham Density Functional Theory
Line 14: Line 15:
 achieve this. achieve this.
  
-====== Input Files ====== 
  
 +===== Input Files =====
 We first look at the input files required for this calculation. The We first look at the input files required for this calculation. The
 necessary input files are: necessary input files are:
Line 21: Line 22:
   * ''Si_bulk8.inp'': the main input file for the calculation, which defines the system and the job parameters   * ''Si_bulk8.inp'': the main input file for the calculation, which defines the system and the job parameters
   * ''BASIS_SET'': file containing parameters for the basis sets that can be used by ''CP2K'' for this calculation   * ''BASIS_SET'': file containing parameters for the basis sets that can be used by ''CP2K'' for this calculation
-  * ''POTENTIAL'': file containing parameters for the pseudopotentials that can be used by ''CP2K'' for this calculation+  * ''GTH_POTENTIALS'': file containing parameters for the pseudopotentials that can be used by ''CP2K'' for this calculation
  
 A list of basis set and pseudopotential files may be found in A list of basis set and pseudopotential files may be found in
-''cp2k/tests/QS/'' that comes with a ''cp2k'' source release. These+''cp2k/data/'' that comes with a ''cp2k'' source release. These
 should cover most of the commonly used elements. The user will, should cover most of the commonly used elements. The user will,
 however, need to produce their own main input file for a given however, need to produce their own main input file for a given
Line 122: Line 123:
  
 We will be doing a static energy and force calculation, in this We will be doing a static energy and force calculation, in this
-case, we must set [[http://manual.cp2k.org/trunk/CP2K_INPUT/GLOBAL.html#desc_RUN_TYPE|''RUNTYPE'']] to ''ENERGY_FORCE''. Keyword [[http://manual.cp2k.org/trunk/CP2K_INPUT/GLOBAL.html#desc_PROJECT_NAME|''PROJECT'']] is an+case, we must set [[http://manual.cp2k.org/trunk/CP2K_INPUT/GLOBAL.html#desc_RUN_TYPE|''RUN_TYPE'']] to ''ENERGY_FORCE''. Keyword [[http://manual.cp2k.org/trunk/CP2K_INPUT/GLOBAL.html#desc_PROJECT_NAME|''PROJECT'']] is an
 alias for ''PROJECT_NAME'', which sets the root-name of the alias for ''PROJECT_NAME'', which sets the root-name of the
 calculation, in this case ''Si_bulk8''. Any output files automatically calculation, in this case ''Si_bulk8''. Any output files automatically
Line 195: Line 196:
 </code> </code>
  
-in file ''BASIS_SETS''; and the chosen pseudopotential corresponds to+in file ''BASIS_SET''; and the chosen pseudopotential corresponds to
 parameters: parameters:
  
Line 208: Line 209:
 </code> </code>
  
-in file ''GTH_POTENTIAL''.+in file ''GTH_POTENTIALS''.
  
 The subsection [[http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/SUBSYS/CELL.html|''CELL'']] defines the simulation unit cell used in a The subsection [[http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/SUBSYS/CELL.html|''CELL'']] defines the simulation unit cell used in a
Line 380: Line 381:
 tells ''CP2K'', in this case, to print out atomic forces in the main tells ''CP2K'', in this case, to print out atomic forces in the main
 output of the calculation. output of the calculation.
-====== Running the Calculation ====== 
  
 +
 +===== Running the Calculation =====
 To run the calculation, the reader needs to have a working ''CP2K'' To run the calculation, the reader needs to have a working ''CP2K''
 package compiled, and with the path to its binaries in the system package compiled, and with the path to its binaries in the system
Line 388: Line 390:
 use the MPI version of ''CP2K''. Type command: use the MPI version of ''CP2K''. Type command:
 <code> <code>
-mpirun -n 2 -o Si_bulk8.out Si_bulk8.inp &+mpirun -n 2 cp2k.popt -o Si_bulk8.out Si_bulk8.inp &
 </code> </code>
 in the working directory to run ''CP2K'' in parallel with 2 MPI in the working directory to run ''CP2K'' in parallel with 2 MPI
Line 396: Line 398:
 to start completely from afresh, they must delete ''Si_bulk8.out'' to start completely from afresh, they must delete ''Si_bulk8.out''
 before running a new calculation. before running a new calculation.
-====== Obtaining the Results ====== 
  
 +===== Obtaining the Results =====
 After the job has finished, we should obtain the following files: After the job has finished, we should obtain the following files:
  
Line 497: Line 499:
 means the system is more or less relaxed, and its geometry is close means the system is more or less relaxed, and its geometry is close
 to its optimal at ground state. to its optimal at ground state.
-====== Adding Smearing ====== 
  
 +
 +===== Adding Smearing =====
 In the example so far, we have not used any smearing on electron In the example so far, we have not used any smearing on electron
 occupation. This is fine for system with a large band gap. However, occupation. This is fine for system with a large band gap. However,
howto/static_calculation.1391957861.txt.gz · Last modified: 2020/08/21 10:15 (external edit)