|Deletions are marked like this.||Additions are marked like this.|
|Line 218:||Line 218:|
|Specifying the basis set
To specify a customized basis set you can use the method explained in "Setting a general FDFEntry".
As an example we will specify a split type
triple zeta - triple polarized (TZTP) basis for Au. The valence states of Au are 5d and 6s and a TZTP basis
set will therefore consists of the following orbitals: l=0: 3, l=1: 3, l=2: 3 and the basis set
will therefore consist of 3*(2*0+1) + 3*(2*1+1) + 3*(2*2+1) = 27 basis functions per Au atom.
The basis set can be defined by::
value = [['Au',2,'split',0.00], #label, number of l-shells (here l=0 and l=2)
[0.00,0.00,0.00], #rc of basis functions. 0.00 => determined by PAO.EnergyShift
ASE interface to the SIESTA total energy package
- 1 Introduction
- 2 Requirements
- 3 SIESTA Calculator
- 3.1 Setting up the atomic configuration
- 3.2 The SIESTA calculator
- 4 SIESTA pseudopotential database
- 5 Examples
A script siesta.run must be in the path. This script runs the SIESTA executable. Modify the example siesta.run to match your installation of SIESTA.
A small pseudopotential database for running the examples can be installed like this:
gunzip SIESTA_pspotDB.tar.gz cat SIESTA_pspotDB.tar.gz | tar xvf - setenv SIESTA_PSPOT_DATABASE "/your/current/directory/SIESTA_pspotDB"
This section describes the python ASE interface to the SIESTA packages.
The atoms for SIESTA are defined via the ASE ListOfAtoms object.
A ListOfAtoms object is a collection of atoms. The ASE implementation of a ListOfAtoms can be used like this:
from ASE import Atom, ListOfAtoms atoms = ListOfAtoms([Atom('C', (0, 0, 0)), ... Atom('O', (0, 0, 1.0))],periodic=1) atoms.SetUnitCell((10,10,10))
This will define a CO molecule, with a CO distance of 1A, in a cubic 10Ax10Ax10A unitcell.
For more details of the ListOfAtoms class see listofatoms in the ASE manual.
The atoms defined here can be attached to a SIESTA calculator by using:
alternatively, one can attach the atoms to a calculator by using:
If you do not specify the periodic keyword, then defining the atoms, SIESTA will run a calculation without periodic boundary conditions (Molecular calculation) and SIESTA will ignore any unitcell. SIESTA will define box large enough to accommodate the molecule defined in ListOfAtoms.
Siesta specific keywords:
|NumberPulay||int||2||Number of steps between each Pulay density mixing|
|MixingWeight||float||0.1||Pulay mixing weight|
|Tolerance||float||1e-5||Accuracy of convergence|
|SolutionMethod||str||diagon||Matrix diagonalization or order-N|
|SaveHS||bool||True||Save Hamiltonian matrix|
|UseSaveDM||bool||False||Reused saved density matrix|
|keep_siesta_defaults||bool||False||Use siesta own defaults instead of the ones listed above|
A corresponding method exists for these keywords:
You can set a general FDF entry using the method:
General DFT calculators keywords:
|kT||float||0.1||Width of Fermi-distribution|
The method SetBZKPoints(kpts) can be used to define the k-points in the BZ. You can specify a 10x10x10 Monkhorst-Pack 3dimensional set simple by using SetBZKpoint((10,10,10)).
This is the only allowed form at the moment.
The method SetPseudopotentialPath(element,path) can be used to set the pseudopotentials for element, either specified as atomic symbol or number.
The directory path must contain a file named VPSOUT containing the pseudopotential.
One can use the method SetSpinPolarized(True) to tell SIESTA that the calculation should be spin-polarized.
One also need to specify an initial magnetic moment for the atoms. You can do this in the construction of the atoms, by using:
>>> from ASE import Atom, ListOfAtoms >>> atoms = ListOfAtoms([Atom('O', (0, 0, 0),magmom=1.0), ... Atom('O', (0, 0, 1.2),magmom=1.0)])
This can also be set using the ListOfAtoms method SetMagneticMoments((1,1)) or setting the SetMagneticMoment method on each atom.
This will define a initial total magnetic moment of 2 Bohr magneton, for the O2 molecule, this being also the self-consistent result.
Using the keyword ghostatoms or the method:
ghost atoms can be added to the SIESTA basis set: The orbitals are generated corresponding to the position of the ghost atoms. ghost_atoms is a nomal ASE ListOfAtoms. The method:
will return a ASE ListOfAtoms coresponding to the ghost atoms.
The method SetFDFEntry(entry) can be used to define a general FDF entry for SIESTA. As an example, using:
value = [[10.,0.0,0.0,0.0],[0.0,10.,0.0,0.0],[0.0,0.0,10.,0.0]] self.SetFDFEntry("kgrid_Monkhorst_Pack",value=value)
The EnergyShift can be set using:
>>> calc.SetFDFEntry('PAO.EnergyShift','0.05 eV')
This parameter should in general be set lower than the default value of 0.2Rydberg
The GridCellSampling can be set using:
value = [[0.0,0.5,0.5], [0.5,0.0,0.5], [0.5,0.5,0.0]] calc.SetFDFEntry('GridCellSampling',value=value)
This will reduce the "egg-box" effect on the energy and forces.
To specify a customized basis set you can use the method explained in "Setting a general FDFEntry". As an example we will specify a split type triple zeta - triple polarized (TZTP) basis for Au. The valence states of Au are 5d and 6s and a TZTP basis set will therefore consists of the following orbitals: l=0: 3, l=1: 3, l=2: 3 and the basis set will therefore consist of 3*(2*0+1) + 3*(2*1+1) + 3*(2*2+1) = 27 basis functions per Au atom.
- The basis set can be defined by::
- value = [['Au',2,'split',0.00], #label, number of l-shells (here l=0 and l=2)
- [0,3,'P',3], #l,nzeta,'P'(opt):pol.functions,npolzeta [0.00,0.00,0.00], #rc of basis functions. 0.00 => determined by PAO.EnergyShift [2,3], #l,nzeta [0.00,0.00,0.00]] #rc
If you want to restart a calculation or read specific information from an old calculation, one have to access the information via the atoms, using:
atoms = SIESTA.ReadAtoms('oldfile')
Now you can get the calculator, attached to the atoms:
calc = atoms.GetCalculator()
In the ASE SIESTA pseudopotential page you can find a local small database of pseudopotentials. You can download or add pseudopotentials to this database.