110 likes | 213 Views
How to optimize automatically the parameters that determine the quality of the basis. Alberto Garc ía. Javier Junquera. Optimization of the parameters that define the basis set: the Simplex code. E Tot = E Tot. Set of parameters. SIMPLEX MINIMIZATION ALGORITHM. Isolated atom
E N D
How to optimize automatically the parameters that determine the quality of the basis Alberto García Javier Junquera
Optimizationof the parametersthatdefine the basis set: the Simplex code ETot = ETot Set of parameters SIMPLEX MINIMIZATION ALGORITHM Isolated atom Kohn-Sham Hamiltonian + Pseudopotential Extra charge Confinement potential Full DFT calculation of the system for which the basis is to be optimized (solid, molecule,...) Basis set J. Junquera et al. Phys. Rev. B 64, 235111 (2001)
Compiling the Simplex code to automatically optimize the basis set Assumingthatyouhavedownloaded and unpackedthe Siesta distribution in a directory ~/siesta, gotothe ~/siesta/Util/Optimizerdirectory $cd ~/siesta/Util/Optimizer and type $ make Thiswill compile the simplex usingthesamearch.make file as theoneyouto compile siesta
Compiling the Simplex code to automatically optimize the basis set Create a directorytorunthe simplex forthedesiredsystem (in this particular case, thewatermolecule), and copythere Thepseudopotential files The Siesta input file, that in this case will be calledTEMPLATE A file withthelist of variables overwhichtooptimize, and theirranges of variability, calledVARS A file withthetunableoperationalparameters, calledPARAMS The script file which defines theoperationsthat are to be carriedout, calledrun_script.sh
The TEMPLATE file Forthemeaning of these input variables, readthe Siesta Manual In this particular example A softconfinementpotentialwill be usedfor default foralltheatomshells Default valuefortheprefactor of thesoftconfinement (forallatoms and shells) Some variables are notdefined, butkept as variables (with a leading $). Those are the variables thatwill be optimized in the Simplex minimization. Theymightchange, dependingonyour particular problem Default valuefortheinnerradius of thesoftconfinement (forallatoms and shells): a fraction of theouterconfinementradiusdeterminedbytheenergyshift
The VARS file The TEMPLATE file Both files define the variables thatwill be optimized in the Simplex minimization Match thenamesthatyou use in the TEMPLATE (withouttheleading ‘$’) withthose in the VARS file DO NOT leaveanyblanklines in the VARS (noteven at theend).
The VARS file The TEMPLATE file Minimumvalueforthis variable Maximumvalueforthis variable Startingvalue (optional) Ifthestartingvalueismissing, a randomstartingpoint in theappropriaterangeischosen.
The PARAMS file Tunableoperationalparametersfortheoptimizationalgorithm are definedhere it uses a two-levelapproach, withamoeba-likeiterationsfollowedbyperiodicrestartswithnew simplex hyper-tetrahedra of progressivelysmallersizes Initialcriteria Defines thesize of theinitialhyper-tetrahedron
The PARAMS file Tunableoperationalparametersfortheoptimizationalgorithm are definedhere it uses a two-levelapproach, withamoeba-likeiterationsfollowedbyperiodicrestartswithnew simplex hyper-tetrahedra of progressivelysmallersizes Stoppingcriteria a minimum fractionalsizeforthehyper-tetrahedron. and a fractionalenergytolerance (comparedtothedifferencesbetweenthehighest and lowestenergies of thevertices)
To run an optimization $ ~/siesta/Util/Optimizer/simplex > simplex.out & The driver program (simplex) callthe script run_script.sh The script can performsubstitutionsonsuitabletemplate files. Theuser has nothingto do at thislevel. $ tail -f simplex.out First:itdumpstheinformation of the VARS and PARAMS files Second:itbuildstheinitial simplex and computes values of theenergies at thevertices of theinitial simplex Third:it computes thefractionalenergytolerance and checksfortheconvergencecriteria Fourth:ifnot converged, anamoeba-likeiterationsisperformed, searchingfortheminimum and producing simplex hyper-tetrahedra of progressivelysmallersizes
At the end of a successful minimization: the final.sed file Itcontainstheoptimizedvalues of theparameters $ more final.sed They can be foundalso at theend of the output file afterrunning simplex $ tailsimplex.out