Header Ads Widget

Ab initio Calculations Using Siesta Code

Last Posts

10/recent/ticker-posts

How to calculate the total energy of Silicon using ASE interface

 

The ASE (Atomic Simulation Environment)  interface s a set of tools and Python modules for setting up, manipulating, running, visualizing and analyzing atomistic simulations. To install it click on the following link:

How to download and install the Atomic Simulation Environment ASE

The ASE interface create the input file and do the calculation using only a python script.

We will take the example of Silicon

First we need to add the path for vasp executable and path for pseudopotentials as follows:

#------- Siesta-ase Path -----
export ASE_SIESTA_COMMAND="/home/algerien1970/abinitio/siesta-4.1-b4/bin/siesta < PREFIX.fdf > PREFIX.out"

export SIESTA_PP_PATH=/home/algerien1970/abinitio/siesta-4.1-b4/mypps

#---------------------------------------------------------

 

The directoriy mypps will contain the psudopotentials. For silicon we need the file Si.gga.psf

You can download the psf file for Si from the following link and rename it

Si.gga.psf


Calculation

algerien1970@linux-kq57:~/abinitio/vasp-ase-tutorials/Si> conda activate ase
(ase) algerien1970@linux-kq57:~/abinitio/vasp-ase-tutorials> mkdir Si 

(ase) algerien1970@linux-kq57:~/abinitio/vasp-ase-tutorials> cd Si

 

Si.py script

from ase import Atoms
from ase.calculators.siesta import Siesta
from ase.units import Ry

a0 = 5.43
bulk = Atoms('Si2', [(0, 0, 0),
(0.25, 0.25, 0.25)],
pbc=True)
b = a0 / 2
bulk.set_cell([(0, b, b),
(b, 0, b),
(b, b, 0)], scale_atoms=True)

calc = Siesta(label='Si',
xc='PBE',
mesh_cutoff=200 * Ry,
energy_shift=0.01 * Ry,
basis_set='DZ',
kpts=[10, 10, 10],
fdf_arguments={'DM.MixingWeight': 0.1,
'MaxSCFIterations': 100},
)
bulk.calc = calc
e = bulk.get_potential_energy()


(ase) algerien1970@linux-kq57:~/abinitio/vasp-ase-tutorials/Si> chmod +x Si.py

(ase) algerien1970@linux-kq57:~/abinitio/vasp-ase-tutorials/mg-hcp> python Si.py

Job completed

Post a Comment

0 Comments