howto:geometry_optimisation
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
howto:geometry_optimisation [2018/01/25 11:52] – [Introduction] 219.142.99.14 | howto:geometry_optimisation [2024/01/15 09:23] (current) – oschuett | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== How to run Geometry Optimisation ====== | + | This page has been moved to: https:// |
- | + | ||
- | ===== Introduction ===== | + | |
- | This tutorial is designed | + | |
- | of a system (without changing the cell dimensions) using '' | + | |
- | use the relaxation of a water (H\(_2\)O) molecule as an example. | + | |
- | + | ||
- | The example files are contained in {{:geometry_optimisation.tgz|geometry_optimisation.tgz}} that comes with this tutorial. The calculation was carried out with '' | + | |
- | 2.4. | + | |
- | + | ||
- | It should be noted that before running the geometry optimisation, | + | |
- | the reader should have already know how to perform a simple | + | |
- | Kohn-Sham Density Functional Theory energy and force calculation | + | |
- | (this is covered in tutorial [[static_calculation|Calculating Energy and Forces using | + | |
- | QUICKSTEP]]), | + | |
- | grid cutoff for the static energy calculations (this is covered in | + | |
- | tutorial [[converging_cutoff|Converging the CUTOFF and REL_CUTOFF]]). | + | |
- | + | ||
- | DIIS (direct inversion in the iterative subspace or direct inversion of the iterative subspace), also known as Pulay mixing, is an extrapolation technique. DIIS was developed by Peter Pulay in the field of computational quantum chemistry with the intent to accelerate and stabilize the convergence of the Hartree–Fock self-consistent field method. | + | |
- | ===== Input Files ===== | + | |
- | The input file for a geometry calculation is shown below: | + | |
- | + | ||
- | <code cp2k> | + | |
- | & | + | |
- | PROJECT H2O | + | |
- | RUN_TYPE GEO_OPT | + | |
- | PRINT_LEVEL LOW | + | |
- | &END GLOBAL | + | |
- | & | + | |
- | METHOD QS | + | |
- | & | + | |
- | &CELL | + | |
- | ABC 12.4138 12.4138 12.4138 | + | |
- | &END CELL | + | |
- | & | + | |
- | O 12.235322 | + | |
- | H 12.415139 | + | |
- | H 11.922476 | + | |
- | &END COORD | + | |
- | &KIND H | + | |
- | BASIS_SET DZVP-GTH-PADE | + | |
- | POTENTIAL GTH-PADE-q1 | + | |
- | &END KIND | + | |
- | &KIND O | + | |
- | BASIS_SET DZVP-GTH-PADE | + | |
- | POTENTIAL GTH-PADE-q6 | + | |
- | &END KIND | + | |
- | &END SUBSYS | + | |
- | &DFT | + | |
- | BASIS_SET_FILE_NAME ./ | + | |
- | POTENTIAL_FILE_NAME ./ | + | |
- | &QS | + | |
- | EPS_DEFAULT 1.0E-7 | + | |
- | &END QS | + | |
- | & | + | |
- | CUTOFF 200 | + | |
- | NGRIDS 4 | + | |
- | REL_CUTOFF 30 | + | |
- | &END MGRID | + | |
- | &SCF | + | |
- | SCF_GUESS ATOMIC | + | |
- | EPS_SCF 1.0E-05 | + | |
- | MAX_SCF 200 | + | |
- | & | + | |
- | ALGORITHM STANDARD | + | |
- | &END DIAGONALIZATION | + | |
- | &MIXING T | + | |
- | ALPHA 0.5 | + | |
- | METHOD PULAY_MIXING | + | |
- | NPULAY 5 | + | |
- | &END MIXING | + | |
- | & | + | |
- | & | + | |
- | &END RESTART | + | |
- | &END PRINT | + | |
- | &END SCF | + | |
- | &XC | + | |
- | & | + | |
- | &END XC_FUNCTIONAL | + | |
- | &END XC | + | |
- | &END DFT | + | |
- | &END FORCE_EVAL | + | |
- | & | + | |
- | & | + | |
- | TYPE MINIMIZATION | + | |
- | MAX_DR | + | |
- | MAX_FORCE 1.0E-03 | + | |
- | RMS_DR | + | |
- | RMS_FORCE 1.0E-03 | + | |
- | MAX_ITER 200 | + | |
- | OPTIMIZER CG | + | |
- | &CG | + | |
- | MAX_STEEP_STEPS | + | |
- | RESTART_LIMIT 9.0E-01 | + | |
- | &END CG | + | |
- | &END GEO_OPT | + | |
- | & | + | |
- | & | + | |
- | COMPONENTS_TO_FIX XYZ | + | |
- | LIST 1 | + | |
- | &END FIXED_ATOMS | + | |
- | &END CONSTRAINT | + | |
- | &END MOTION | + | |
- | </ | + | |
- | + | ||
- | The reader should already be familiar with the [[http:// | + | |
- | [[http:// | + | |
- | must set [[http:// | + | |
- | + | ||
- | <code cp2k> | + | |
- | RUN_TYPE GEO_OPT | + | |
- | </ | + | |
- | + | ||
- | In this example, we note that we have chosen diagonalisation of the | + | |
- | Kohn-Sham Hamiltonian for the evaluation of wavefunctions, | + | |
- | Pulay mixing for the self-consistency loops. 5 histories are used | + | |
- | for Pulay mixing. | + | |
- | + | ||
- | The important section for geometry optimisation settings are | + | |
- | contained in subsection [[http:// | + | |
- | '' | + | |
- | dimensions do not change. Calculations which allows the relaxation | + | |
- | of the cell are covered in a separate tutorial. | + | |
- | + | ||
- | <code cp2k> | + | |
- | & | + | |
- | TYPE MINIMIZATION | + | |
- | MAX_DR | + | |
- | MAX_FORCE 1.0E-03 | + | |
- | RMS_DR | + | |
- | RMS_FORCE 1.0E-03 | + | |
- | MAX_ITER 200 | + | |
- | OPTIMIZER CG | + | |
- | &CG | + | |
- | MAX_STEEP_STEPS | + | |
- | RESTART_LIMIT 9.0E-01 | + | |
- | &END CG | + | |
- | &END GEO_OPT | + | |
- | </ | + | |
- | + | ||
- | The [[http:// | + | |
- | finding the local minima ('' | + | |
- | point transition state ('' | + | |
- | [[http:// | + | |
- | optimised geometry is reached. '' | + | |
- | the tolerance on the maximum and root-mean-square of atomic | + | |
- | displacements from the previous geometry optimisation iteration; | + | |
- | '' | + | |
- | the maximum and root-mean-square of atomic forces. The geometry is | + | |
- | considered to be optimised //only when all four criteria are | + | |
- | satisfied// | + | |
- | geometry optimisation iterations. [[http:// | + | |
- | finding the stationary points; in this example we have chosen the | + | |
- | conjugate gradients ('' | + | |
- | + | ||
- | The [[http:// | + | |
- | algorithm. In this case, we have configured it so that no steepest | + | |
- | descent steps are to be performed before the start of the conjugate | + | |
- | gradients algorithm; and the CG algorithm should be reset (and one | + | |
- | steepest descent step is performed) if the cosine of the angles | + | |
- | between two consecutive searching directions is less than 0.9. | + | |
- | + | ||
- | <code cp2k> | + | |
- | & | + | |
- | & | + | |
- | COMPONENTS_TO_FIX XYZ | + | |
- | LIST 1 | + | |
- | &END FIXED_ATOMS | + | |
- | &END CONSTRAINT | + | |
- | </ | + | |
- | + | ||
- | We can add constraints to atomic movements by using the [[http:// | + | |
- | subsection in '' | + | |
- | particular atoms using the [[http:// | + | |
- | [[http:// | + | |
- | be fixed, and in this case, the atoms will be completely pinned in | + | |
- | all directions ('' | + | |
- | given by the [[http:// | + | |
- | + | ||
- | <code cp2k> | + | |
- | LIST 1 2 3 ... N | + | |
- | </ | + | |
- | + | ||
- | The numbers to the right of '' | + | |
- | and correspond to the order (from top to bottom) of the atoms given | + | |
- | in the [[http:// | + | |
- | example, we have fixed the oxygen atom during geometry optimisation, | + | |
- | so that the water molecule will not move around while its structure | + | |
- | is being relaxed. | + | |
- | + | ||
- | + | ||
- | ===== Results ===== | + | |
- | The example is run using the serial version of the '' | + | |
- | + | ||
- | < | + | |
- | cp2k.sopt -o H2O.out H2O.inp & | + | |
- | </ | + | |
- | + | ||
- | After the job has finished, you should obtain the following files: | + | |
- | + | ||
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | + | ||
- | Again, the file '' | + | |
- | job. '' | + | |
- | each geometry optimisation step in the '' | + | |
- | set of atomic coordinates corresponds to the relaxed | + | |
- | structure. '' | + | |
- | '' | + | |
- | molecule. Should the job die for some reason, you can continue the | + | |
- | job using the latest atomic coordinates by using command: | + | |
- | + | ||
- | < | + | |
- | cp2k.sopt -o H2O.out H2O-1.restart & | + | |
- | </ | + | |
- | + | ||
- | You can of course also use '' | + | |
- | an input for further calculations using the relaxed atomic | + | |
- | structures. | + | |
- | + | ||
- | The files '' | + | |
- | atomic coordinates obtained from the previous 1, 2 and 3 geometry | + | |
- | optimisation iterations. '' | + | |
- | '' | + | |
- | + | ||
- | In the main output file '' | + | |
- | optimisation step, we will have the following information: | + | |
- | + | ||
- | < | + | |
- | -------- | + | |
- | | + | |
- | Total Energy | + | |
- | Real energy change | + | |
- | | + | |
- | Used time = | + | |
- | + | ||
- | | + | |
- | Max. step size | + | |
- | Conv. limit for step size = | + | |
- | | + | |
- | RMS step size = | + | |
- | Conv. limit for RMS step | + | |
- | | + | |
- | Max. gradient | + | |
- | Conv. limit for gradients | + | |
- | Conv. for gradients | + | |
- | RMS gradient | + | |
- | Conv. limit for RMS grad. = | + | |
- | Conv. for gradients | + | |
- | --------------------------------------------------- | + | |
- | </ | + | |
- | + | ||
- | The above output segment states that at the end of geometry | + | |
- | optimisation step 1, the total energy of the system is | + | |
- | -17.1643447508 (Ha) and none of the criteria for optimised geometry | + | |
- | has been reached. The iteration therefore will carry on, until all | + | |
- | criteria becomes "'' | + | |
- | + | ||
- | At the end of geometry optimisation, | + | |
- | like: | + | |
- | + | ||
- | < | + | |
- | -------- | + | |
- | | + | |
- | Total Energy | + | |
- | Real energy change | + | |
- | | + | |
- | Used time = | + | |
- | + | ||
- | | + | |
- | Max. step size | + | |
- | Conv. limit for step size = | + | |
- | | + | |
- | RMS step size = | + | |
- | Conv. limit for RMS step | + | |
- | | + | |
- | Max. gradient | + | |
- | Conv. limit for gradients | + | |
- | Conv. in gradients | + | |
- | RMS gradient | + | |
- | Conv. limit for RMS grad. = | + | |
- | Conv. in RMS gradients | + | |
- | --------------------------------------------------- | + | |
- | </ | + | |
- | + | ||
- | which clearly shows all criteria have been satisfied. | + | |
- | + | ||
- | The final Kohn-Sham energies can be obtained at the end of the | + | |
- | output: | + | |
- | + | ||
- | < | + | |
- | ******************************************************************************* | + | |
- | *** GEOMETRY OPTIMIZATION COMPLETED | + | |
- | ******************************************************************************* | + | |
- | + | ||
- | | + | |
- | + | ||
- | Number of electrons: | + | |
- | Number of occupied orbitals: | + | |
- | Number of molecular orbitals: | + | |
- | + | ||
- | Number of orbital functions: | + | |
- | Number of independent orbital functions: | + | |
- | + | ||
- | | + | |
- | + | ||
- | ASPC order: 3 | + | |
- | + | ||
- | B(1) = | + | |
- | B(2) = -3.428571 | + | |
- | B(3) = | + | |
- | B(4) = -0.571429 | + | |
- | B(5) = | + | |
- | + | ||
- | Extrapolation method: ASPC | + | |
- | + | ||
- | + | ||
- | SCF WAVEFUNCTION OPTIMIZATION | + | |
- | + | ||
- | | + | |
- | | + | |
- | 1 Pulay/Diag. 0.50E+00 | + | |
- | 2 Pulay/Diag. 0.50E+00 | + | |
- | + | ||
- | *** SCF run converged in 2 steps *** | + | |
- | + | ||
- | + | ||
- | | + | |
- | Core density on regular grids: | + | |
- | Total charge density on r-space grids: | + | |
- | Total charge density g-space grids: | + | |
- | + | ||
- | | + | |
- | Self energy of the core charge distribution: | + | |
- | Core Hamiltonian energy: | + | |
- | | + | |
- | | + | |
- | + | ||
- | Total energy: | + | |
- | + | ||
- | ENERGY| Total FORCE_EVAL ( QS ) energy (a.u.): | + | |
- | </ | + |
howto/geometry_optimisation.1516881175.txt.gz · Last modified: 2020/08/21 10:15 (external edit)