Skip to content

Tutorial TDDFT

Xavier Andrade edited this page Sep 8, 2016 · 32 revisions

Authors: Xavier Andrade and Alfredo Correa

In this tutorial you will learn how to do an Ehrenfest-TDDFT molecular-dynamics simulation with Qball. We will be doing a calculation of electronic stopping of a proton in Aluminum. This is the force that fast particule feels when entering a material.

First, we generate a file with the coordinates of an aluminum supercell with 32 atoms (for actual calculations you probably need a larger cell). Call it al32.sys and copy the following content:

 set cell 15.306 0.0 0.0 0.0 15.306 0.0 0.0 0.0 15.306
 species aluminum Al.xml
 atom   Al1   aluminum   0.000000    0.000000    0.000000
 atom   Al2   aluminum   3.826500    3.826500    0.000000
 atom   Al3   aluminum   3.826500    0.000000    3.826500
 atom   Al4   aluminum   0.000000    3.826500    3.826500
 atom   Al5   aluminum  -7.653000    0.000000    0.000000
 atom   Al6   aluminum  -3.826500    3.826500    0.000000
 atom   Al7   aluminum  -3.826500    0.000000    3.826500
 atom   Al8   aluminum  -7.653000    3.826500    3.826500
 atom   Al9   aluminum   0.000000   -7.653000    0.000000
 atom   Al10  aluminum   3.826500   -3.826500    0.000000
 atom   Al11  aluminum   3.826500   -7.653000    3.826500
 atom   Al12  aluminum   0.000000   -3.826500    3.826500
 atom   Al13  aluminum   0.000000    0.000000   -7.653000
 atom   Al14  aluminum   3.826500    3.826500   -7.653000
 atom   Al15  aluminum   3.826500    0.000000   -3.826500
 atom   Al16  aluminum   0.000000    3.826500   -3.826500
 atom   Al17  aluminum   0.000000   -7.653000   -7.653000
 atom   Al18  aluminum   3.826500   -3.826500   -7.653000
 atom   Al19  aluminum   3.826500   -7.653000   -3.826500
 atom   Al20  aluminum   0.000000   -3.826500   -3.826500
 atom   Al21  aluminum  -7.653000    0.000000   -7.653000
 atom   Al22  aluminum  -3.826500    3.826500   -7.653000
 atom   Al23  aluminum  -3.826500    0.000000   -3.826500
 atom   Al24  aluminum  -7.653000    3.826500   -3.826500
 atom   Al25  aluminum  -7.653000   -7.653000    0.000000
 atom   Al26  aluminum  -3.826500   -3.826500    0.000000
 atom   Al27  aluminum  -3.826500   -7.653000    3.826500
 atom   Al28  aluminum  -7.653000   -3.826500    3.826500
 atom   Al29  aluminum  -7.653000   -7.653000   -7.653000
 atom   Al30  aluminum  -3.826500   -3.826500   -7.653000
 atom   Al31  aluminum  -3.826500   -7.653000   -3.826500
 atom   Al32  aluminum  -7.653000   -3.826500   -3.826500

Make sure you understand what the commands in the file do. You will need the Al.xml pseudopotential file.

Now, lets create the input file for a ground state calculation. You could call it gs.i. First, you need to force Qball to use complex wave-functions with the force_complex variable.

 set force_complex_wf ON

This is necessary since in TDDFT the wave-functions are always complex.

Then we load the atoms of the aluminum supercell, simply by putting the name of the file

 al32.sys

Now we need to add the proton to the system. First you will need a pseudopotential for hydrogen, you can find it here. Place the proton at coordinates 0.00000 1.91325 1.91325 using the atom command. To add an atom without electrons we have to append a + sign to the name of the atom, for example call it "+proton".

Now add the standard commands to set a ground state calculation, using an energy cutoff of 30 Rydberg, a preconditioner cutoff of 4 Rydberg, and a threshold of 1e-6 for 5 steps.

Clone this wiki locally