讲义

How to Calculate Energy and Forces

Table of Contents

Introduction Input Files Running the Calculation Obtaining the Results Adding Smearing

  1. Introduction

  2. In this tutorial, we are going to show the reader how to perform a simple static self-consistent Kohn-Sham Density Functional Theory energy and force calculation on a system using QUICKSTEP.

  3. We will use face centred cubic bulk Si, with 8 atoms in a cubic unit cell as an example.

  4. The example files are contained in static_calculation.tgz.

  5. The calculations were carried out with CP2K version 2.4.

  6. The reader should note that the integration grid settings used in the example calculations have already chosen to be sufficient for the given accuracy.

  7. A separate tutorial is available to show how to achieve this.

  8. Input Files

  9. We first look at the input files required for this calculation. The necessary input files are:

    • 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

    • GTH_POTENTIALS: file containing parameters for the pseudopotentials that can be used by CP2K for this calculation

  10. A list of basis set and pseudopotential files may be found in cp2k/data/ that comes with a cp2k source release.

  11. These should cover most of the commonly used elements.

  12. The user will, however, need to produce their own main input file for a given calculation.

  13. Let us look at the main input: Si_bulk8.inp in detail.

  14. The name of this file can be arbitrary, so is the file extension.

  15. The input file is structured into ordered blocks and keywords, the order of which are unimportant.

  16. Each input block is referred to as a “section” in this tutorial, and some sections are “subsections” of other sections.

  17. Full definitions of the input file format and keywords is available via the ''CP2K'' input reference manual.

  18. The input file is shown below:

    &GLOBAL
    PROJECT Si_bulk8
    RUN_TYPE ENERGY_FORCE
    PRINT_LEVEL LOW
    &END GLOBAL
    &FORCE_EVAL
    METHOD Quickstep
    &SUBSYS
      &KIND Si
        ELEMENT   Si
        BASIS_SET DZVP-GTH-PADE
        POTENTIAL GTH-PADE-q4
      &END KIND
      &CELL
        A     5.430697500    0.000000000    0.000000000
        B     0.000000000    5.430697500    0.000000000
        C     0.000000000    0.000000000    5.430697500
      &END CELL
      &COORD
        Si    0.000000000    0.000000000    0.000000000
        Si    0.000000000    2.715348700    2.715348700
        Si    2.715348700    2.715348700    0.000000000
        Si    2.715348700    0.000000000    2.715348700
        Si    4.073023100    1.357674400    4.073023100
        Si    1.357674400    1.357674400    1.357674400
        Si    1.357674400    4.073023100    4.073023100
        Si    4.073023100    4.073023100    1.357674400
      &END COORD
    &END SUBSYS
    &DFT
      BASIS_SET_FILE_NAME  BASIS_SET
      POTENTIAL_FILE_NAME  GTH_POTENTIALS
      &QS
        EPS_DEFAULT 1.0E-10
      &END QS
      &MGRID
        NGRIDS 4
        CUTOFF 300
        REL_CUTOFF 60
      &END MGRID
      &XC
        &XC_FUNCTIONAL PADE
        &END XC_FUNCTIONAL
      &END XC
      &SCF
        SCF_GUESS ATOMIC
        EPS_SCF 1.0E-7
        MAX_SCF 300
        &DIAGONALIZATION  ON
          ALGORITHM STANDARD
        &END DIAGONALIZATION
        &MIXING  T
          METHOD BROYDEN_MIXING
          ALPHA 0.4
          NBROYDEN 8
        &END MIXING
      &END SCF
    &END DFT
    &PRINT
      &FORCES ON
      &END FORCES
    &END PRINT
    &END FORCE_EVAL
  19. The main sections in the input file are:

  20. ''GLOBAL'': contains general options for the CP2K run, such as the name of the job, the type of run etc.

  21. ''FORCE_EVAL'': contains all parameters associated with the evaluation of forces on atoms, this includes the initial atomic coordinates.

  22. We look at each section in detail. The GLOBAL section in Si_bulk8.inp is presented below

  23. We will be doing a static energy and force calculation, in this case, we must set ''RUN_TYPE'' to ENERGY_FORCE.

  24. Keyword ''PROJECT'' is an alias for PROJECT_NAME, which sets the root-name of the calculation, in this case Si_bulk8.

  25. Any output files automatically generated by CP2K will have the name prefixed by Si_bulk8.

  26. ''PRINT_LEVEL'' controls the default verbosity of the main output of CP2K, in this example, it is set to “low”.

  27. The verbosity of the output can be fine-tuned by overriding this setting in each individual subsection of the input.

  28. We now explain the section FORCE_EVAL line-by-line.

  29. The keyword ''METHOD'' chooses the method for evaluating the forces on atoms to QUICKSTEP, i.e.

  30. Density Functional Theory using the Gaussian and Planewaves (GPW) method.

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

  32. The subsection ''KIND'' gives definitions of elements in the calculation.

  33. There must be one KIND subsection per element.

  34. In this example, for Si, we have defined the basis set to be used: DZVP-GTH-PADE (double-ζ with polarisation basis optimised for Geodecker-Teter-Hutter PADE LDA pseudopotential); and the pseudopotential: GTH-PADE-q4 (Geodecker-Teter-Hutter PADE LDA pseudopotential with 4 valence electrons).

  35. The basis set and pseudopotential names must correspond to an existing entry in the corresponding basis set and pseudopotential files defined by ''BASIS_SET_FILE_NAME'' and ''POTENTIAL_FILE_NAME'' keywords in ''DFT'' subsection, in FORCE_EVAL section.

  36. The chosen basis for Si corresponds to parameters:

    Si DZVP-GTH-PADE
    2
    3  0  1  4  2  2
          1.2032422345   0.3290350445   0.0000000000   0.0474539126   0.0000000000
          0.4688409786  -0.2533118323   0.0000000000  -0.2594473573   0.0000000000
          0.1679863234  -0.7870946277   0.0000000000  -0.5440929303   0.0000000000
          0.0575619526  -0.1909898479   1.0000000000  -0.3624010364   1.0000000000
    3  2  2  1  1
          0.4500000000   1.0000000000
  37. in file BASIS_SET; and the chosen pseudopotential corresponds to parameters:

    Si GTH-PADE-q4 GTH-LDA-q4
      2    2
       0.44000000    1    -7.33610297
      2
       0.42273813    2     5.90692831    -1.26189397
                                          3.25819622
       0.48427842    1     2.72701346
  38. in file GTH_POTENTIALS.

  39. The subsection ''CELL'' defines the simulation unit cell used in a calculation.

  40. In this example, we define the unit cell as cubic, with lattice constant equal to 5.4306975 Angstroms.

  41. “Angstrom” is the default unit for cell vectors.

  42. ''A'', ''B'' and ''C'' are the first, second and third lattice (cell) vectors.

  43. There are many ways to define the cell, see ''CP2K'' input reference manual for more details.

  44. The initial atomic coordinates are specified in the ''COORD'' subsection.

  45. The default input format for atomic coordinates in CP2K is:

    <ATOM_KIND> X Y Z
  46. where X, Y and Z are Cartesian coordinates in Angstroms.

  47. This can be changed by configuring keyword ''SCALED'' to .TRUE., in the COORD subsection, which makes the coordinate input X Y Z to be fractional with respect to the lattice vectors.

  48. One can also change the unit for the Cartesian coordinates by setting the keyword ''UNIT'' with in the subsection.

  49. should be a label that corresponds to the definition of the elements in the ''KIND'' subsections.

  50. After the SUBSYS section in the input file Si_bulk8.inp follows the ''DFT'' subsection, which controls all aspects of the self-consistent Kohn-Sham Density Functional Theory calculation.

  51. This subsection is only relevant if and only if the METHOD keyword in FORCE_EVAL is set to QUICKSTEP.

    BASIS_SET_FILE_NAME  BASIS_SET
    POTENTIAL_FILE_NAME  GTH_POTENTIALS
  52. As already mentioned above, the keywords ''BASIS_SET_FILE_NAME'' and ''POTENTIAL_FILE_NAME'' set the files that contains basis set and pseudopotential parameters.

    &QS
    EPS_DEFAULT 1.0E-10
    &END QS
  53. The ''QS'' subsection contains general control parameters used by QUICKSTEP.

  54. ''EPS_DEFAULT'' sets the default value for all tolerances used within QUICKSTEP.

  55. The individual tolerances (EPS_*) can be set, and they will override the EPS_DEFAULT value.

    &MGRID
    NGRIDS 4
    CUTOFF 300
    REL_CUTOFF 60
    &END MGRID
  56. The ''MGRID'' subsection defines how the integration grid used in QUICKSTEP calculations should be setup.

  57. QUICKSTEP uses a multi-grid method for representing Gaussian functions numerically on the grid.

  58. Narrow and sharp Gaussians are mapped onto a finer grid than wider and smoother Gaussians.

  59. In this case, we are telling the code to set up 4 levels of multi-grids,

  60. with the planewave cutoff of the finest grid set to be 300 Ry,

  61. and with the grid spacing underneath any Gaussian functions to be finer than the equivalent planewave cutoff of 60 Ry.

  62. The users should read the tutorial “Converging the CUTOFF and REL_CUTOFF” for details on how these parameters affect the grid constructed, and how to define a sufficient grid for their calculation.

  63. In this example, the grid defined has already been found to be sufficient for the energy and force calculation.

  64. The ''XC'' subsection follows:

    &XC
    &XC_FUNCTIONAL PADE
    &END XC_FUNCTIONAL
    &END XC
  65. This defines which exchange-correlation density functional we want to use.

  66. In this we choose PADE LDA 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
    &DIAGONALIZATION
      ALGORITHM STANDARD
    &END DIAGONALIZATION
    &MIXING
      METHOD BROYDEN_MIXING
      ALPHA 0.4
      NBROYDEN 8
    &END MIXING
    &END SCF
  67. The ''SCF'' subsection defines all the settings related to methods used to find a self-consistent solution of the Kohn-Sham DFT formalism.

  68. ''SCF_GUESS'' sets how the initial trial electron density function ρ(→r) is to be generated.

  69. In this example (ATOMIC), the initial density is to be generated using overlapping of atomic charge densities.

  70. A good starting point for the electron density in the self-consistency loop is important in obtaining a convergent result quickly.

  71. ''EPS_SCF'' sets the tolerance of the charge density residual.

  72. This overrides the EPS_DEFAULT value set in QS subsection.

  73. ''MAX_SCF'' sets the maximum number of self-consistency loops QUICKSTEP is allowed to perform for each ground-state energy calculation.

    &DIAGONALIZATION  ON
    ALGORITHM STANDARD
    &END DIAGONALIZATION
  74. The ''DIAGONALIZATION '' subsection tells the code to use the traditional diagonalisation method for finding the ground state Kohn-Sham energy and electron density.

  75. The subsection heading also takes an argument, and in this case is set to “ON”, which equivalent to “.TRUE.” or “T”, and indicates that the diagonalisation method is turned on.

  76. One can also omit the value of the subsection heading, which defaults to “.TRUE.”.

  77. The alternative to diagonalisation is to use the Orbital Transform (OT) method, in which case, the user should either delete the DIAGONALIZATION block or change “ON” to “OFF” (or “.FALSE.”), and add the ''OT'' subsection instead.

  78. The ''ALGORITHM'' keyword sets the algorithm to use for diagonalisation of the Kohn-Sham Hamiltonian.

  79. “STANDARD” means the standard LAPACK/SCALAPACK subroutines are to be used for diagonalisation.

    &MIXING  T
    METHOD BROYDEN_MIXING
    ALPHA 0.4
    NBROYDEN 8
    &END MIXING
  80. The ''MIXING'' subsection contains all the parameters associated with charge mixing in a self-consistency calculation.

  81. The subsection also admits a value, which can be either .TRUE. (T) or .FALSE. (F), which switches charge mixing on or off.

  82. The default is .TRUE.. Note that this subsection only applies to the traditional diagonalisation method.

  83. The OT method uses a different approach for charge mixing, and is explained in other tutorials.

  84. The keyword ''ALPHA'' sets the mixing parameter; in this example 0.4 of the output density will be mixed with 0.6 of the input density to form the new input density in the next SCF iteration.

  85. The keyword ''METHOD'' sets the mixing method; in this case, we will use Broyden mixing.

  86. The keyword ''NBROYDEN'' is an alias to the parameter NBUFFER, and it sets the number of histories to be used in the Broyden mixing algorithm.

  87. The final ''PRINT'' subsection in FORCE_EVAL section:

    &PRINT
    &FORCES ON
    &END FORCES
    &END PRINT
  88. tells CP2K, in this case, to print out atomic forces in the main output of the calculation.

  89. Running the Calculation

  90. To run the calculation, the reader needs to have a working CP2K package compiled, and with the path to its binaries in the system PATH.

  91. The files Si_bulk8.inp, BASIS_SET and GTH_POTENTIAL should be in the same working directory.

  92. In this example, we will use the MPI version of CP2K. Type command:

    mpirun -n 2 cp2k.popt -o Si_bulk8.out Si_bulk8.inp &
  93. in the working directory to run CP2K in parallel with 2 MPI processes in the background.

  94. The -o option redirects the CP2K output to file Si_bulk8.out.

  95. Note that the -o option appends output of successive runs to Si_bulk8.out, so if the reader wants to start completely from afresh, they must delete Si_bulk8.out before running a new calculation.

  96. Obtaining the Results

  97. After the job has finished, we should obtain the following files:

    • Si_bulk8.out

    • Si_bulk8-RESTART.wfn

    • Si_bulk8-RESTART.wfn.bak-1

  98. The file Si_bulk8.out contains the main output of the job.

  99. Si_bulk8-RESTART.wfn is the final Kohn-Sham wavefunctions from the calculation.

  100. Si_bulk8-RESTART.wfn.bak- records the Kohn-Sham wavefunctions obtained from the -th previous SCF step; in this case, Si_bulk8-RESTART.wfn.bak-1 contains the wavefunctions obtained from the last SCF step.

  101. Should the reader want to start a new calculation from the previous calculated wavefunctions, they need to change the SCF_GUESS keyword in SCF subsection of FORCE_EVAL section to RESTART:

    SCF_GUESS RESTART

    provided that the new calculation shares the same PROJECT_NAME as the one that generated the wavefunctions.

  102. Otherwise, we would need to rename the restart wavefunction files to correspond to the project name of the new calculation.

  103. We now look at the main CP2K output in more detail.

    ```

    Number of electrons: 32

    Number of occupied orbitals: 16

    Number of molecular orbitals: 16

Number of orbital functions: 104 Number of independent orbital functions: 104

Extrapolation method: initial_guess

SCF WAVEFUNCTION OPTIMIZATION

Step Update method Time Convergence Total energy Change

1 NoMix/Diag. 0.40E+00    0.6     0.75558724       -32.2320848878 -3.22E+01
2 Broy./Diag. 0.40E+00    1.1     0.05667976       -31.1418135481  1.09E+00
3 Broy./Diag. 0.40E+00    1.1     0.09691469       -31.1974003416 -5.56E-02
4 Broy./Diag. 0.40E+00    1.1     0.00245608       -31.3378474040 -1.40E-01
5 Broy./Diag. 0.40E+00    1.1     0.00235460       -31.3009654398  3.69E-02
6 Broy./Diag. 0.40E+00    1.1     0.00007565       -31.2972158934  3.75E-03
7 Broy./Diag. 0.40E+00    1.1     0.00009004       -31.2977293749 -5.13E-04
8 Broy./Diag. 0.40E+00    1.1     0.00000186       -31.2978454163 -1.16E-04
9 Broy./Diag. 0.40E+00    1.1     0.00000252       -31.2978835492 -3.81E-05

10 Broy./Diag. 0.40E+00 1.1 5.6405E-09 -31.2978852054 -1.66E-06

SCF run converged in 10 steps

- The above shows a typical output from a self-consistent Kohn-Sham ground state calculation. 
- It states that we are using diagonalisation method with Broyden charge mixing, and it took 10 Broyden mixing steps (each containing a diagonalisation process to obtain the wavefunctions) to reach the required tolerance for self-consistency.

Electronic density on regular grids: -31.9999999889 0.0000000111 Core density on regular grids: 31.9999999939 -0.0000000061 Total charge density on r-space grids: 0.0000000051 Total charge density g-space grids: 0.0000000051

Overlap energy of the core charge distribution: 0.00000000005320 Self energy of the core charge distribution: -82.06393942512820 Core Hamiltonian energy: 18.06858429706010 Hartree energy: 42.41172824581682 Exchange-correlation energy: -9.71425832315952

Total energy: -31.29788520535761

ENERGY| Total FORCE_EVAL ( QS ) energy (a.u.): -31.297885372811002

ATOMIC FORCES in [a.u.]

Atom Kind Element X Y Z

 1      1      Si          0.00000000     0.00000000     0.00000000
 2      1      Si          0.00000000     0.00000001     0.00000001
 3      1      Si          0.00000001     0.00000001     0.00000000
 4      1      Si          0.00000001     0.00000000     0.00000001
 5      1      Si         -0.00000001    -0.00000001    -0.00000001
 6      1      Si         -0.00000001    -0.00000001    -0.00000001
 7      1      Si         -0.00000001    -0.00000001    -0.00000001
 8      1      Si         -0.00000001    -0.00000001    -0.00000001

SUM OF ATOMIC FORCES -0.00000000 -0.00000000 -0.00000000 0.00000000

- The above shows the results on final energies and forces. 
- One should always check if the total number of electrons calculated from the final electron density, in this case 31.9999999939, is correct.
- The results show that the force on the atoms are almost zero. 
- This means the system is more or less relaxed, and its geometry is close to its optimal at ground state.

5. <a name="5">Adding Smearing</a>
- 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, for metals or systems with a small gap, this may cause the calculation to be unstable, and the self-consistency loop may never converge, due to the discontinuity in the electron occupation function.
- To add smearing, we need to add the subsection ''SMEAR'' inside subsection SCF:

&SMEAR ON METHOD FERMI_DIRAC ELECTRONIC_TEMPERATURE [K] 300 &END SMEAR

- This tells QUICKSTEP to use a smearing function for the electron occupation. 
- In this example, we use the Fermi-Dirac smearing function, with the electron temperature being set to 300 K. 
- Note that, in CP2K, one can explicitly define the unit of a given input value by using a unit enclosed in square bracket, such as “[K]”, before the value.
- This is not all, since smearing may lead to occupation of molecular orbitals in the conduction band, we must tell CP2K to include extra, empty, molecular orbitals into the calculation, which otherwise would be omitted (for reducing computational cost). 
- To do this, we need to add the keyword ''ADDED_MOS'' in the SCF subsection:

ADDED_MOS 10

- In this example, we have asked CP2K to not to omit 10 of the lowest empty molecular orbitals in the calculation. 
- It should be noted that given a chosen basis set, there is a maximum number of molecular orbitals, i.e. the number of eigenvectors of the Hamiltonian, one can generate. 
- In theory, the maximum should be the rank of the Hamiltonian generated in the calculation.
- In the output of the calculation using smearing, we first notice that:

Number of electrons: 32 Number of occupied orbitals: 16 Number of molecular orbitals: 26

Number of orbital functions: 104 Number of independent orbital functions: 104

- unlike in the previous case with no smearing, now 26 molecular orbitals have been used during the calculation. 
- There are a total of 104 basis functions (“atom centred orbitals” spanned by Cartesian Gaussians) used in the calculation for the given basis set, so 26 is well within the limit of the calculation.

Electronic density on regular grids: -31.9999999889 0.0000000111 Core density on regular grids: 31.9999999939 -0.0000000061 Total charge density on r-space grids: 0.0000000051 Total charge density g-space grids: 0.0000000051

Overlap energy of the core charge distribution: 0.00000000005320 Self energy of the core charge distribution: -82.06393942512820 Core Hamiltonian energy: 18.06842027191411 Hartree energy: 42.41184371469986 Exchange-correlation energy: -9.71419454555998 Electronic entropic energy: -0.00001687947145 Fermi energy: 0.20867150262130

Total energy: -31.29788686349247

ENERGY| Total FORCE_EVAL ( QS ) energy (a.u.): -31.297887031736590

- In the final energy section of the output, we notice that there is an extra entropy (TS) term:

Electronic entropic energy: -0.00001687947145

- This should be small for the calculation to be a reliable approximation to the zero electron temperature result. 
- The final free energy is the sum of the total DFT energy and the entropic energy. The total DFT energy is given by:

Total energy: -31.29788686349247

and the final free energy extrapolated for TS→0 is given by:

ENERGY| Total FORCE_EVAL ( QS ) energy (a.u.): -31.297887031736590

- This is the energy to be quoted as the final result.


---
## [cp2k计算Si的单点能](https://www.cp2k.org/howto:static_calculation)
## [keywords list](https://manual.cp2k.org/#gsc.tab=0)
### [cp2k input file](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT.html)

&GLOBAL PROJECT Si_bulk8 RUN_TYPE ENERGY_FORCE PRINT_LEVEL LOW &END GLOBAL

[GLOBAL](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/GLOBAL.html)
[PROJECT](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/GLOBAL.html#PROJECT_NAME) Si_bulk8
[RUN_TYPE](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/GLOBAL.html#RUN_TYPE) ENERGY_FORCE
[PRINT_LEVEL](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/GLOBAL.html#PRINT_LEVEL) LOW

&FORCE_EVAL METHOD Quickstep &SUBSYS &KIND Si ELEMENT Si BASIS_SET DZVP-GTH-PADE POTENTIAL GTH-PADE-q4 &END KIND &CELL A 5.430697500 0.000000000 0.000000000 B 0.000000000 5.430697500 0.000000000 C 0.000000000 0.000000000 5.430697500 &END CELL &COORD Si 0.000000000 0.000000000 0.000000000 Si 0.000000000 2.715348700 2.715348700 Si 2.715348700 2.715348700 0.000000000 Si 2.715348700 0.000000000 2.715348700 Si 4.073023100 1.357674400 4.073023100 Si 1.357674400 1.357674400 1.357674400 Si 1.357674400 4.073023100 4.073023100 Si 4.073023100 4.073023100 1.357674400 &END COORD &END SUBSYS

[FORCE_EVAL](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL.html) #计算能量和受力的部分
[METHOD](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL.html#METHOD) #计算受力的方法,包括FIST,QMMM,QS,NNP,EIP等
[STRESS_TENSOR](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL.html#STRESS_TENSOR) #是否计算晶胞的应力
[SUBSYS](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL/SUBSYS.html) #控制原子坐标、晶胞参数、元素/原子的基组赝势等信息
[CELL](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL/SUBSYS/CELL.html) #定义晶胞边长,也可以从其他文件里读取晶胞的信息,比如CIF、XSC文件,通过[CELL_FILE_FORMAT](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL/SUBSYS/CELL.html#CELL_FILE_FORMAT)和[CELL_FILE_NAME](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL/SUBSYS/CELL.html#CELL_FILE_NAME)
[COORD](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL/SUBSYS/COORD.html)
[KIND](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL/SUBSYS/KIND.html)
[ELEMENT](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL/SUBSYS/KIND.html#ELEMENT)
[BASIS_SET](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL/SUBSYS/KIND.html#BASIS_SET)
[POTENTIAL](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL/SUBSYS/KIND.html#POTENTIAL)

&DFT BASIS_SET_FILE_NAME BASIS_SET POTENTIAL_FILE_NAME GTH_POTENTIALS &QS EPS_DEFAULT 1.0E-10 &END QS &MGRID NGRIDS 4 CUTOFF 300 REL_CUTOFF 60 &END MGRID &XC &XC_FUNCTIONAL PADE &END XC_FUNCTIONAL &END XC

**[DFT](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL/DFT.html)
[BASIS_SET_FILE_NAME](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL/DFT.html#BASIS_SET_FILE_NAME)
[POTENTIAL_FILE_NAME](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL/DFT.html#POTENTIAL_FILE_NAME)
[QS](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL/DFT/QS.html) #控制DFT等计算的一些参数精度
[EPS_DEFAULT](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL/DFT/QS.html#EPS_DEFAULT)
[EXTRAPOLATION](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL/DFT/QS.html#EXTRAPOLATION) #控制波函数外推的一些方法,建议用ASPC
[EXTRAPOLATION_ORDER](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL/DFT/QS.html#EXTRAPOLATION_ORDER) #一般用默认值3
[MGRID](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL/DFT/MGRID.html) 
[NGRIDS](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL/DFT/MGRID.html#NGRIDS) #NGRIDS控制的就是几套网格,每套网格的截断能不一样,一般用默认值NGRIDS 4
[CUTOFF](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL/DFT/MGRID.html#list_CUTOFF) #CUTOFF是整体网格精度的最高值,单位是Ry(Rydberg),设置取决于体系中元素的种类,默认280 Ry
[REL_CUTOFF](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL/DFT/MGRID.html#REL_CUTOFF) #REL_CUTOFF 参数控制有多少网格点落到最精细的级别,默认为40 Ry,一般设置到50 或60 Ry
[XC](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL/DFT/XC.html)
[XC_FUNCTIONAL](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL/DFT/XC/XC_FUNCTIONAL.html)
[PADE](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL/DFT/XC/XC_FUNCTIONAL/PADE.html)
[PBE](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL/DFT/XC/XC_FUNCTIONAL/PBE.html)
[VDW_POTENTIAL](https://manual.cp2k.org/cp2k-8_1-branch/CP2K_INPUT/FORCE_EVAL/DFT/XC/VDW_POTENTIAL.html)**
&SCF
  SCF_GUESS ATOMIC
  EPS_SCF 1.0E-7
  MAX_SCF 300
  &DIAGONALIZATION  ON
    ALGORITHM STANDARD
  &END DIAGONALIZATION
  &MIXING  T
    METHOD BROYDEN_MIXING
    ALPHA 0.4
    NBROYDEN 8
  &END MIXING
&END SCF

&END DFT &PRINT &FORCES ON &END FORCES &END PRINT &END FORCE_EVAL

``` SCF SCF_GUESS EPS_SCF MAX_SCF DIAGONALIZATION ALGORITHM MIXING METHOD ALPHA PRINT FORCES DOS PDOS MULLIKEN ELF_CUBE MO_CUBES

最后更新于