How to run with the same pseudos in SIESTA and ABINIT -215.78 Siesta (DZP) Abinit (13.005 Ha) Free Energy (eV) -215.79 -215.80 -215.81 -215.82 5.30 5.35 5.40 5.45 Lattice constant (Ang) 5.50 Objectives Run examples with the same pseudos (same decomposition in local part and Kleinman-Bylander projectors) in SIESTA and ABINIT. Compare total energies Download the last versions of both codes, SIESTA and ABINIT Regarding the ABINIT code, you can download the required version from: http://personales.unican.es/junqueraj/Abinit.tar.gz But the merge of the relevant subroutines into the main trunk will be done soon Regarding Siesta, the code is available at the usual web site: http://www.icmab.es/siesta A few modifications to be done before running: SIESTA Edit the file atom.F in the Src directory I. E N E R G Y F U N C T I ON A L F OR A D I E L E C T R I C I N SI D E A N E L E C T R I C 1. Replace “nrval”I 1.byEN “nrwf” KBgen ER G Yin Fthe U Ncall C T I to ONschro_eq A L FOR Ainside D I EL the EC Tsubroutine R I C I N SI D E A N EL Cit e . (file atom.F) I . E N E R G Y F U N C T I ON A L F OR A D I E L E C T R I C I N SI D E A N E L E C T R 1 i f ( er ef kb( i kb, l ) . ge. 1. 0d3) t hen Cit e . nnodes=i kb +1 i f ( er efnpr kb(i n=l i kb, l ) . ge. 1. 0d3) t hen cal l schr , r 1. of 0d3) i , vps( 1, l ) , ve, s, dr di , i f ( er ef kb(o_eq( i kb, lZval ) . ge. t hen nnodes=i kb . nnodes=i kb nr wf , l , a, b, nnodes, npr i n, npr i n=l +1 . npr i n=l +1 er ef kb( i kb, l ) , r phi ( 1, i kb) ) Cit e1 . cal l schr Zval Zval , r of, ri of, vps( 1,1,l l) ),,ve, s,drdrdidi, , cal lo_eq( schr o_eq( i , vps( ve, s, i f ( nkbl ( l ) . eq. 1) t hen . nr, wf , lwf , a, n, . nr , l ,b, a, nnodes, b, nnodes,npr npr i n, cal l in ghost ( Zval rto of i ghost , vps( : , inside l ) , vl ocal , subroutine KBgen (file 2. Replace “nrval” by “nrwf” the call the . er ef ikb( i kb, l ) , r phi ( 1, i kb) ) . er, ef kb( . ve, s, dr di , nr wf l , a, b, nrkb, wf ,l ) , r phi ( 1, i kb) ) atom.F) . eri ef kb( i (kb, ) , r 1) phi t(hen : , i kb) , i ghost ) f ( nkbl l ) .l eq. el se(cal i f ( nkbl l ) l. eq. 1)( Zval t hen ghost , r of i , vps( : , l ) , vl ocal , ( Zval r of : ,wfl ,) , vl ocal , .cal l ghost ve, s, dr di ,,nr wf ,i l ,, vps( a, b, nr r eal ( dp) , par amet er : : Rmax_kb_def aul t = 60. 0d0 . ve, s, drerdief,kb( ( : ,w i fkb) . nr iwkb, f , ll ,) ,a,r phi b, nr , , i ghost ) el se . er ef kb( i kb, l ) , r phi ( : , i kb) , i ghost ) el se ( dp) , par amet er : : to Rmax_kb_def aul t (file = 60.atom.F) 0d0 3. Increase the default ofr eal Rmax_kb_default 60.0 bohrs 1 2 ealY(.-H. dp)Shin, , par am : :J. R max_kb_def = 60. 0d0 G. rLee, and J.etYer . Son, Am. Ceram. Soc.,aul 95,t 2773 (2012). Definition of the Kleinman-Bylander projectors X. Gonze et al., Phys. Rev. B 44, 8503 (1991) The normalized Kleinman-Bylander projectors are given by where and Note that these are the eigenstates of the semilocal pseudopotential (screened by the pseudovalence charge density). are the radial part of the wave function multiplied by , For the sake of simplicity, we assume here only one projector per angular momentum shell. If more than one is used, they must be orthogonalized Definition of the Kleinman-Bylander projectors (old choice in SIESTA for the atomic eigenstates) s - shell p - shell d - shell f - shell ul PS (r) 1,0 In the standard version of Siesta, the Schrödinger equation for the isolated atom while generating the KB projectors is solved inside a box whose size is determined by nrval. This is usually a very large radius (of the order of 120 bohrs) 0,5 0,0 0 10 Rmax_KB 20 30 radius (bohr) 40 Then, this wave functions is normalized inside a sphere of a much smaller radius, determined by 50 Rmax_KB (default value = 6.0 bohr) Definition of the Kleinman-Bylander projectors (new choice in SIESTA for the atomic eigenstates) 0,8 s - shell p - shell d - shell f - shell 0,6 0,4 ul PS (r) In the new version of Siesta, everything is consistent, and the Schrödinger equation and the normalization are solved with respect the same boundary conditions 0,2 0,0 0 10 20 30 40 radius (bohr) 50 60 Rmax_KB Almost no change in total energies observed, but the Kleinman-Bylander energies might be very different, specially for unbounded orbitals A few modifications to be done before running: ABINIT Edit the file src/65_psp/psp5nl.F90 1. Uncomment the last two lines ofT comparing I . E for N E Rthe G Y sake FU N C I ON A L F OR Kleinman-Bylander A D I E L E C T R I C I N SI D E energies and cosines with the ones obtained with SIESTA Cit e1 . ! DEBUG wr i t e( st d_out , * ) ’ EKB=’ , ( ekb( i q) , i q=1, 4) wr i t e( st d_out , * ) ’ COSKB=’ , ( ckb( i q) , i q=1, 4) ! ENDDEBUG i f ( nkbl ( l ) . eq. 1) t hen cal enabling l ghost ( Zval of i , vps( : , l ) , vl ocal , 2. Remember to compile the code the, rFOX library . ve, s, dr di , nr wf , l , a, b, nr wf , . er ef kb( i kb, l ) , r phi ( : , i kb) , i ghost ) el se ./configure --with-trio-flavor=netcdf+etsf_io+fox r eal ( dp) , par amet er : : Rmax_kb_def aul t = 60. 0d0 Examples to run SIESTA and ABINIT with the same pseudos 1. Visit the web page: http://personales.unican.es/junqueraj and follow the links: Teaching Métodos Computacionales en Estructura de la Materia Hand-on sessions Pseudos 2. Download the Pseudos and input files for both codes 3. Untar the ball file $ tar –xvf Siesta-Abinit.tar This will generate a directory called Comparison-Siesta-Abinit with 4 directories: $ cd Comparison-Siesta-Abinit $ ls -ltr $ Si (example for a covalent semiconductor, LDA) $ Al (example for a sp-metal, LDA) $ Au (example for a noble metal, includes d-orbital, LDA) $ Fe (example for a transition metal, includes NLCC, GGA) Examples to run SIESTA and ABINIT with the same pseudos In every subdirectory it can be found: $ cd Si $ ls –ltr $ Pseudo (files to generate and test the pseudopotential) $ Optimized-Basis (files to optimize the basis set) $ Runsiesta (files to run Siesta) $ Runabinit (files to run Abinit) How to generate and test a norm-conserving pseudopotential Generate the pseudopotential using the ATM code as usual, following the notes in the Tutorial “How to generate a norm conserving pseudopotential” Copy the input file directory I . Ein N Ethe R G Ycorresponding F U N C T I ON A L F atom/Tutorial/PS_Generation OR A D I E L E C T R I C I N SI D E A N E L E CT R I C FI EL D and run Cit e1 . $ . . / . . / Ut i l s/ pg. sh Si . t m2. i np ==> Out put dat a i n di r ect or y Si . t m2 ==> Pseudopot ent i al i n Si . t m2. vps and Si . t m2. psf ( and maybe i n Si . t m2. xml ) i f ( nkbl ( l ) . eq. 1) t hen cal l ghost ( Zval , r of i , vps( : , l ) , vl ocal , The pseudopotentials will be on the same parent directory: . ve, s, dr di , nr wf , l , a, b, nr wf , .vps test )the pseudopotential) . (unformatted) er ef kb( i kb, l ) ,(required r phi ( : , i kb)to , i ghost el se .psf (formatted) .xml (inr eal XML format) (required to run Abinit) ( dp) , par amet er : : Rmax_kb_def aul t = 60. 0d0 Remember to test the pseudopotential using the ATM code as usual, following the notes in the Tutorial “How to test the transferability of a norm conserving pseudopotential” 1 G. Lee, Y .-H. Shin, and J. Y . Son, J. A m. Ceram. Soc., 95, 2773 (2012). Running the energy versus lattice constant curve in SIESTA Run the energy versus lattice constant curve in Siesta as usual. You can use both the .psf or the .xml pseudopotential. Follow the rules given in the tutorial “Lattice constant, bulk modulus, and equilibrium energy of solids” The input file has been prepared for you (file Si.fdf). Since we are interested in compare the performance of the basis set, it is important to converge all the rest of approximations (Mesh Cutoff, k-point grid, etc.) as much as possible 2 I . E N Ewe R G Ywould F U N C T I be ON Aable L F O R to A Dwrite I EL EC Ta RIC I N SI D E A N called E L E C T R I Si.siesta.latcon.dat) C FI EL D . At the end, file (here that looks like this: Cit e1 . # Lat t i ce Const ant ( Ang) 5. 30 5. 32 5. 34 5. 36 5. 38 5. 40 5. 42 5. 44 5. 46 5. 48 Fr ee Ener gy ( eV) - 215. 790381 - 215. 802337 - 215. 811082 - 215. 816643 - 215. 819095 - 215. 818374 - 215. 814586 - 215. 808022 - 215. 798710 - 215. 786727 These data have been obtained with a double-zeta plus polarization basis set, optimized at the theoretical lattice constant with a pressure of 0.05 GPa Running the energy versus cutoff energy in ABINIT To check the equivalent cutoff energy in Abinit: 1. We run the same system (same lattice vectors and internal coordinates) at the same level of approximations (same exchange and correlation functional, Monkhorst-Pack mesh etc.) at a given lattice constant. Here it has been written for you (file Si.input.convergence) Diamond structure at the lattice constant that minimizes the energy in SIESTA 6 × 6 × 6 Monkhorst-Pack mesh Ceperley-Alder (LDA) functional Running the energy versus cutoff energy in ABINIT To check the equivalent cutoff energy in Abinit: 1. We run the same system (same lattice vectors and internal coordinates) at the same level of approximations (same exchange and correlation functional, Monkhorst-Pack mesh etc.) at a given lattice constant. Here it has been written for you (file Si.input.convergence) 2. Change the cutoff energy for the plane waves $ mor e Si . f i l es $ mor e Si . f i l es Si . i nput . conver gence Si . i nput . conver gence Si . out 3. Edit the .files file and select Si . out Si i Si o i the input file and theSipseudo t 1x file (in XML format) Si o Si . xml t 1x Si . xml $ abi ni t < Si . f i l es > Si . l og & 4. Run the code $ abi ni t < Si . f i l es > Si . l og & 1 G. Lee, Y .-H. Shin, and J. Y . Son, J. A m. Ceram. Soc., 95, 2773 (2012). Running the energy versus cutoff energy in ABINIT: bulk Si (covalent semiconductor) Write the total energy as a function of the cutoff energy and edit the corresponding file that should look like this Equivalent PW cutoff a DZP basis set at 5.38 Å Running the energy versus lattice constant curve in ABINIT 1. Same input as before but… … setting the plane wave cutoff to the equivalent one to a DZP basis set … and changing the lattice constant embracing the minimum 2. Change in the .files the name of the input file $ mor e Si . f i l es Si . i nput . conver gence Si . out Si i Si o t 1x Si . xml 3. Run the code $ abi ni t < Si . f i l es > Si . l og & Running the energy versus lattice constant curve in ABINIT Write the total energy as a function of the lattice constant and edit the corresponding file that should look like this Comparing the pseudopotential in SIESTA and ABINIT: bulk Si (covalent semiconductor) To be totally sure that we have run SIESTA and ABINIT with the same peudopotential operator, i.e. with the same decomposition in local part and Kleinman-Bylander projectors: 1. Edit one of the output files in SIESTA and search for the following lines: 2. Edit the log file in ABINIT and search for the following lines: The Kleinman-Bylander energies and cosines should be the same upto numerical roundoff errors Note: In SIESTA they are written in Ry and in ABINIT they are in Ha. Comparing the energy versus lattice constant in SIESTA and ABINIT: bulk Si (covalent semiconductor) -215.78 Siesta (DZP) Abinit (13.005 Ha) Free Energy (eV) -215.79 -215.80 -215.81 -215.82 5.30 5.35 5.40 5.45 Lattice constant (Ang) 5.50 Comparing the pseudopotential in SIESTA and ABINIT: bulk Al (sp metal) To be totally sure that we have run SIESTA and ABINIT with the same peudopotential operator, i.e. with the same decomposition in local part and Kleinman-Bylander projectors: Comparing the pseudopotential in SIESTA and ABINIT: bulk Al (sp metal) For the case of metallic system, besides the k-point sampling we have to pay particular attention to the occupation option SIESTA ABINIT Default: Fermi-Dirac Also, as explained in the Tutorial “Convergence of electronic and structural properties of a metal with respect to the k-point sampling: bulk Al” we should look at the Free Energy and not to the Kohn-Sham energy Running the energy versus cutoff energy in ABINIT: bulk Al (a sp metal) Lattice constant 3.97 Å -56,9 Free Energy (eV) -57,0 -57,1 DZP -57,2 0 5 10 20 15 Cutoff energy (Ha) 25 30 Comparing the energy versus lattice constant in SIESTA and ABINIT: bulk Al (sp metal) Basis set of Siesta: DZP optimized with a pressure of 0.001 GPa at the theoretical lattice constant of 3.97 Å) Plane wave cutoff in Abinit: 8.97 Ha -57.14 Siesta (DZP) Abinit (8.97 Ha) Free Energy (eV) -57.15 -57.16 -57.17 -57.18 3.85 3.90 4.00 3.95 4.05 Lattice constant (Ang) 4.10 Comparing the pseudopotential in SIESTA and ABINIT: bulk Au (a noble metal) To be totally sure that we have run SIESTA and ABINIT with the same peudopotential operator, i.e. with the same decomposition in local part and Kleinman-Bylander projectors: Running the energy versus cutoff energy in ABINIT: bulk Au (a noble metal) Lattice constant 4.08 Å -903.6 -903.8 Free Energy (eV) -904.0 -904.2 -904.4 DZP -904.6 -904.8 -905.0 20 30 40 Cutoff energy (Ha) 50 60 Comparing the energy versus lattice constant in SIESTA and ABINIT: bulk Au (a noble metal) Basis set of Siesta: DZP optimized with a pressure of 0.02 GPa at the theoretical lattice constant of 4.08 Å Plane wave cutoff in Abinit: 17.432 Ha -904.66 Siesta (DZP) Abinit (17.432 Ha) Free Energy (eV) -904.67 -904.68 -904.69 -904.70 4.00 4.10 4.05 Lattice constant (Ang) 4.15 Comparing the pseudopotential in SIESTA and ABINIT: bulk Fe (a magnetic transition metal) To be totally sure that we have run SIESTA and ABINIT with the same peudopotential operator, i.e. with the same decomposition in local part and Kleinman-Bylander projectors: Comparing the pseudopotential in SIESTA and ABINIT: bulk Fe (a magnetic transition metal) For the case of metallic system, besides the k-point sampling we have to pay particular attention to the occupation option. Now, besides: - The system is spin polarized - We use a GGA functional - We include non-linear partial core corrections in the pseudo SIESTA ABINIT Running the energy versus cutoff energy in ABINIT: bulk Fe (a magnetic transition metal) Lattice constant 2.87 Å -765.0 Free Energy (eV) -770.0 -775.0 -780.0 20 DZP 30 40 50 Cutoff energy (Ha) 60 Comparing the energy versus lattice constant in SIESTA and ABINIT: bulk Fe(magnetic transition metal) Basis set of Siesta: DZP optimized without pressure at the experimental lattice constant of 2.87 Å Plane wave cutoff in Abinit: 34.82 Ha -782.48 Siesta (DZP) Abinit (34.82 Ha) Free Energy (eV) -782.50 -782.52 -782.54 -782.56 -782.58 -782.60 2.75 2.80 2.90 2.85 2.95 Lattice constant (Ang) 3,00