exercises:2019_conexs_newcastle:ex3
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
exercises:2019_conexs_newcastle:ex3 [2019/09/08 07:17] – [Part 3: ΔSCF calculations] abussy | exercises:2019_conexs_newcastle:ex3 [2020/08/21 10:15] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 2: | Line 2: | ||
- | In this exercise we are going to compute near-edge X-ray absorption spectra of bulk MgS and MgO, performing all-electron calculations with GAPW method, using the Transition Potential | + | In this exercise we are going to compute near-edge X-ray absorption spectra of bulk MgS and MgO, performing all-electron calculations with GAPW method, using the Transition Potential |
- | Before | + | Before |
Line 99: | Line 99: | ||
</ | </ | ||
- | Since we are going to perform calculations for bulk structures, and both systems have only two atoms in their unit cells, it is not necessary to have a separate .xyz file with the atomic positions. | + | Since both systems have only two atoms in their unit cells it is not necessary to have a separate .xyz file with the atomic positions. |
Do not forget to put in your work directory the files '' | Do not forget to put in your work directory the files '' | ||
- | To run the calculation, type in your terminal: | + | To run the calculation |
- | < | ||
- | ./cp2k.sopt -i MgO_opt.inp -o MgO_opt.out & | ||
- | </ | ||
After the calculation is finished, you can check the files created in your directory. First open the output file '' | After the calculation is finished, you can check the files created in your directory. First open the output file '' | ||
Line 121: | Line 118: | ||
cp2k prints out the coordinates for each step of the calculation (they are indicated in the file by the index i, right below the number of atoms), so in order to use the optimized geometry in the following calculations, | cp2k prints out the coordinates for each step of the calculation (they are indicated in the file by the index i, right below the number of atoms), so in order to use the optimized geometry in the following calculations, | ||
- | It is also important to check for warnings in your output file. In the end of the output | + | It is also important to check for warnings in your output file. In the end of the file you can find the following banner: |
< | < | ||
Line 158: | Line 155: | ||
</ | </ | ||
- | These are the lengths of the vectors a, b and c of the MgS unit cell. Both systems have rhombohedral unit cells, so the angles α, β and γ are the same. | + | In order to deal with a smaller number of atoms, we are declaring the structures of MgO and MgS using the rhombhedral unit cell, so the lengths of the lattice |
The last modification that needs to be done is regarding the atomic types. In this case we do not have oxygen in the system anymore, so the subsection ''& | The last modification that needs to be done is regarding the atomic types. In this case we do not have oxygen in the system anymore, so the subsection ''& | ||
Line 164: | Line 161: | ||
<note important> | <note important> | ||
- | Now the input is ready, and can be run in the same way as before, just changing | + | Now the input is ready and it can be run in the same way as before, just remember to change |
- | + | ||
- | < | + | |
- | ./cp2k.sopt -i MgS_opt.inp -o MgS_opt.out & | + | |
- | </ | + | |
After the calculation is finished, open the output file '' | After the calculation is finished, open the output file '' | ||
Line 179: | Line 172: | ||
&GLOBAL | &GLOBAL | ||
PROJECT_NAME MgX ! TASK: change X to O or S | PROJECT_NAME MgX ! TASK: change X to O or S | ||
- | RUN_TYPE ENERGY | + | RUN_TYPE ENERGY |
PRINT_LEVEL LOW | PRINT_LEVEL LOW | ||
FLUSH_SHOULD_FLUSH .TRUE. | FLUSH_SHOULD_FLUSH .TRUE. | ||
Line 188: | Line 181: | ||
&DFT | &DFT | ||
- | | + | !where to find all-electron basis sets and potentials |
- | POTENTIAL_FILE_NAME | + | BASIS_SET_FILE_NAME |
+ | POTENTIAL_FILE_NAME | ||
UKS | UKS | ||
Line 216: | Line 210: | ||
&SCF | &SCF | ||
- | MAX_SCF | + | MAX_SCF |
EPS_SCF 1.0E-5 | EPS_SCF 1.0E-5 | ||
SCF_GUESS ATOMIC | SCF_GUESS ATOMIC | ||
Line 226: | Line 220: | ||
&END MIXING | &END MIXING | ||
- | & | ||
- | EPS_SCF 1.0E-5 | ||
- | MAX_SCF 50 | ||
- | &END OUTER_SCF | ||
&END SCF | &END SCF | ||
Line 272: | Line 262: | ||
| | ||
| | ||
- | &END SMEAR | + | &END SMEAR |
&END SCF | &END SCF | ||
Line 312: | Line 302: | ||
ABC A B C | ABC A B C | ||
&END CELL | &END CELL | ||
- | |||
&KIND Mg | &KIND Mg | ||
Line 333: | Line 322: | ||
</ | </ | ||
- | ====MgO==== | + | ====MgS==== |
- | To compute the absorption spectra for the bulk MgO, first rename the input file changing the '' | + | To compute the absorption spectra for the bulk MgS, first rename the input file changing the '' |
< | < | ||
- | cp MgX_xas.inp | + | cp MgX_xas.inp |
</ | </ | ||
- | Now change all the '' | + | Now change all the '' |
The next step is to add the optimized coordinates of the system, that you can find them in the '' | The next step is to add the optimized coordinates of the system, that you can find them in the '' | ||
- | To run this calculation type in terminal: | + | <note important> |
- | < | + | To run this calculation proceed as you did before. |
- | ./cp2k.sopt -i MgO_xas.inp -o MgO_xas.out & | + | |
- | </ | + | |
This calculation should take longer than the geometry optimization to run. Once it is finished, check the number of warnings and if the calculation converged. Sometimes it does not converge within the maximum number of iterations we set in the input file. If this is the case, you can increase the number using the keyword '' | This calculation should take longer than the geometry optimization to run. Once it is finished, check the number of warnings and if the calculation converged. Sometimes it does not converge within the maximum number of iterations we set in the input file. If this is the case, you can increase the number using the keyword '' | ||
- | You can check in the working directory that some files were created. The absorption energies and intensities (oscillator strength) are written in the files named '' | + | You can check in the working directory that some files were created. The absorption energies and intensities (oscillator strength) are written in the files named '' |
The file looks like | The file looks like | ||
Line 376: | Line 363: | ||
</ | </ | ||
- | As an output you are going to get two files: '' | + | As an output you are going to get two files: '' |
- | In order to obtain the spectrum for atom 2, you can open the file '' | + | In order to obtain the spectrum for atom 2, you can open the file '' |
absorption spectrum. | absorption spectrum. | ||
- | |||
- | ====MgS==== | ||
- | |||
- | The exact same procedure can be done for the MgS, but now replacing the '' | ||
=====Part 3: ΔSCF calculations===== | =====Part 3: ΔSCF calculations===== | ||
- | Now, to finally finish the calculation, | + | Now, to finally finish the calculation, |
< | < | ||
Line 394: | Line 377: | ||
</ | </ | ||
- | For the MgO system, for example, run the calculation | + | instead of '' |
- | < | + | After the calculation |
- | ./cp2k.sopt -i MgO_dscf.inp -o MgO_dscf.out & | + | |
- | </ | + | |
- | + | ||
- | After the calculation | + | |
< | < | ||
- | Ionization potential of the excited atom: -49.38227966446617 | + | Ionization potential of the excited atom: -92.73815588900608 |
</ | </ | ||
in the output file. The energy is given in Hartree, and to convert it to electron volts multiply the value by 27.211. This is the energy of the first transition, and you can use this value to rigidly shift your absorption spectrum. | in the output file. The energy is given in Hartree, and to convert it to electron volts multiply the value by 27.211. This is the energy of the first transition, and you can use this value to rigidly shift your absorption spectrum. | ||
+ | =====Part 4: Changing basis set===== | ||
+ | |||
+ | Before performing the XAS calculations for the MgO system and compare the Mg absorption spectra, you can try to change the basis set you are using to run the absorption calculations to analyze differences it can bring to the description of the process. Try to perform the calculations using: | ||
+ | |||
+ | * pc-0 (smaller basis set) | ||
+ | * pob-TZVP (basis set for solid-state calculations) | ||
+ | * DZVP-all | ||
+ | * Ahlrichs-def2-SVP | ||
< | < | ||
+ | |||
+ | |||
+ | You can check the tutorial [[exercises: | ||
+ | |||
exercises/2019_conexs_newcastle/ex3.1567927030.txt.gz · Last modified: 2020/08/21 10:15 (external edit)